)>}]
شركة التطبيقات المتكاملة لتصميم وبرمجة البرمجيات الخاصة ش.ش.و.
Integrated Applications Programming Company
Home » Code Library » ServiceRequestAdministrativeIssue (Ia.Ftn.Cl.Models)

Public general use code classes and xml files that we've compiled and used over the years:

Service Request Administrative Issue Entity Framework class for Fixed Telecommunications Network (FTN) entity model.

    1: using System;
    2: using System.ComponentModel.DataAnnotations;
    3: using System.ComponentModel.DataAnnotations.Schema;
    4: using System.Linq;
    5: using System.Threading;
    6: using System.Threading.Tasks;
    7:  
    8: namespace Ia.Ftn.Cl.Models
    9: {
   10:     ////////////////////////////////////////////////////////////////////////////
   11:  
   12:     /// <summary publish="true">
   13:     /// Service Request Administrative Issue Entity Framework class for Fixed Telecommunications Network (FTN) entity model.
   14:     /// </summary>
   15:     /// 
   16:     /// <remarks> 
   17:     /// Copyright © 2019-2021 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
   18:     ///
   19:     /// This library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
   20:     /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
   21:     ///
   22:     /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
   23:     /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
   24:     /// 
   25:     /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
   26:     /// 
   27:     /// Copyright notice: This notice may not be removed or altered from any source distribution.
   28:     /// </remarks> 
   29:     public class ServiceRequestAdministrativeIssue
   30:     {
   31:         /// <summary/>
   32:         public ServiceRequestAdministrativeIssue() { }
   33:  
   34:         /// <summary/>
   35:         [Key, DatabaseGenerated(DatabaseGeneratedOption.None)]
   36:         public string Id { get; set; }
   37:  
   38:         /// <summary/>
   39:         public string Service { get; set; }
   40:  
   41:         /// <summary/>
   42:         public int Type { get; set; }
   43:  
   44:         /// <summary/>
   45:         public string Value { get; set; }
   46:  
   47:         /// <summary/>
   48:         public DateTime Created { get; set; }
   49:  
   50:         /// <summary/>
   51:         public DateTime Updated { get; set; }
   52:  
   53:         /// <summary/>
   54:         [ForeignKey("StaffIdentityUser_Id")]
   55:         public virtual StaffIdentityUser StaffIdentityUser { get; set; }
   56:  
   57:         ////////////////////////////////////////////////////////////////////////////
   58:  
   59:         /// <summary>
   60:         ///
   61:         /// </summary>
   62:         public bool Update(ServiceRequestAdministrativeIssue serviceRequestAdministrativeIssue)
   63:         {
   64:             // below: this will not update Id, Created
   65:             bool updated;
   66:  
   67:             updated = false;
   68:  
   69:             if (this.Service != serviceRequestAdministrativeIssue.Service) { this.Service = serviceRequestAdministrativeIssue.Service; updated = true; }
   70:             if (this.Type != serviceRequestAdministrativeIssue.Type) { this.Type = serviceRequestAdministrativeIssue.Type; updated = true; }
   71:             if (this.Value != serviceRequestAdministrativeIssue.Value) { this.Value = serviceRequestAdministrativeIssue.Value; updated = true; }
   72:  
   73:             if (this.StaffIdentityUser.Id != serviceRequestAdministrativeIssue.StaffIdentityUser.Id) { this.StaffIdentityUser.Id = serviceRequestAdministrativeIssue.StaffIdentityUser.Id; updated = true; }
   74:  
   75:             if (updated) this.Updated = DateTime.UtcNow.AddHours(3);
   76:  
   77:             return updated;
   78:         }
   79:  
   80:         ////////////////////////////////////////////////////////////////////////////
   81:         ////////////////////////////////////////////////////////////////////////////
   82:  
   83:         /// <summary>
   84:         ///
   85:         /// </summary>
   86:         public string ToSimpleTextString()
   87:         {
   88:             return Ia.Ftn.Cl.Models.Data.ServiceRequestAdministrativeIssue.ToSimpleTextString(this);
   89:         }
   90:  
   91:         ////////////////////////////////////////////////////////////////////////////
   92:         ////////////////////////////////////////////////////////////////////////////
   93:     }
   94:  
   95:     ////////////////////////////////////////////////////////////////////////////
   96:     ////////////////////////////////////////////////////////////////////////////
   97: }