)>}]
شركة التطبيقات المتكاملة لتصميم وبرمجة البرمجيات الخاصة ش.ش.و.
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:     /// </remarks> 
   19:     public class ServiceRequestAdministrativeIssue
   20:     {
   21:         /// <summary/>
   22:         public ServiceRequestAdministrativeIssue() { }
   23:  
   24:         /// <summary/>
   25:         [Key, DatabaseGenerated(DatabaseGeneratedOption.None)]
   26:         public string Id { get; set; }
   27:  
   28:         /// <summary/>
   29:         public string Service { get; set; }
   30:  
   31:         /// <summary/>
   32:         public int Type { get; set; }
   33:  
   34:         /// <summary/>
   35:         public string Value { get; set; }
   36:  
   37:         /// <summary/>
   38:         public DateTime Created { get; set; }
   39:  
   40:         /// <summary/>
   41:         public DateTime Updated { get; set; }
   42:  
   43:         /// <summary/>
   44:         [ForeignKey("StaffIdentityUser_Id")]
   45:         public virtual StaffIdentityUser StaffIdentityUser { get; set; }
   46:  
   47:         ////////////////////////////////////////////////////////////////////////////
   48:  
   49:         /// <summary>
   50:         ///
   51:         /// </summary>
   52:         public bool Update(ServiceRequestAdministrativeIssue serviceRequestAdministrativeIssue)
   53:         {
   54:             // below: this will not update Id, Created
   55:             bool updated;
   56:  
   57:             updated = false;
   58:  
   59:             if (this.Service != serviceRequestAdministrativeIssue.Service) { this.Service = serviceRequestAdministrativeIssue.Service; updated = true; }
   60:             if (this.Type != serviceRequestAdministrativeIssue.Type) { this.Type = serviceRequestAdministrativeIssue.Type; updated = true; }
   61:             if (this.Value != serviceRequestAdministrativeIssue.Value) { this.Value = serviceRequestAdministrativeIssue.Value; updated = true; }
   62:  
   63:             if (this.StaffIdentityUser.Id != serviceRequestAdministrativeIssue.StaffIdentityUser.Id) { this.StaffIdentityUser.Id = serviceRequestAdministrativeIssue.StaffIdentityUser.Id; updated = true; }
   64:  
   65:             if (updated) this.Updated = DateTime.UtcNow.AddHours(3);
   66:  
   67:             return updated;
   68:         }
   69:  
   70:         ////////////////////////////////////////////////////////////////////////////
   71:         ////////////////////////////////////////////////////////////////////////////
   72:  
   73:         /// <summary>
   74:         ///
   75:         /// </summary>
   76:         public string ToSimpleTextString()
   77:         {
   78:             return Ia.Ftn.Cl.Models.Data.ServiceRequestAdministrativeIssue.ToSimpleTextString(this);
   79:         }
   80:  
   81:         ////////////////////////////////////////////////////////////////////////////
   82:         ////////////////////////////////////////////////////////////////////////////
   83:     }
   84:  
   85:     ////////////////////////////////////////////////////////////////////////////
   86:     ////////////////////////////////////////////////////////////////////////////
   87: }