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

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.Model
    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:         public string UserId { get; set; }
   55:  
   56:         ////////////////////////////////////////////////////////////////////////////
   57:  
   58:         /// <summary>
   59:         ///
   60:         /// </summary>
   61:         public bool Update(ServiceRequestAdministrativeIssue serviceRequestAdministrativeIssue)
   62:         {
   63:             // below: this will not update Id, Created
   64:             bool updated;
   65:  
   66:             updated = false;
   67:  
   68:             if (this.Service != serviceRequestAdministrativeIssue.Service) { this.Service = serviceRequestAdministrativeIssue.Service; updated = true; }
   69:             if (this.Type != serviceRequestAdministrativeIssue.Type) { this.Type = serviceRequestAdministrativeIssue.Type; updated = true; }
   70:             if (this.Value != serviceRequestAdministrativeIssue.Value) { this.Value = serviceRequestAdministrativeIssue.Value; updated = true; }
   71:  
   72:             if (this.UserId != serviceRequestAdministrativeIssue.UserId) { this.UserId = serviceRequestAdministrativeIssue.UserId; updated = true; }
   73:  
   74:             if (updated) this.Updated = DateTime.UtcNow.AddHours(3);
   75:  
   76:             return updated;
   77:         }
   78:  
   79:         ////////////////////////////////////////////////////////////////////////////
   80:         ////////////////////////////////////////////////////////////////////////////
   81:  
   82:         /// <summary>
   83:         ///
   84:         /// </summary>
   85:         public string ToSimpleTextString()
   86:         {
   87:             return Ia.Ftn.Cl.Model.Data.ServiceRequestAdministrativeIssue.ToSimpleTextString(this);
   88:         }
   89:  
   90:         ////////////////////////////////////////////////////////////////////////////
   91:         ////////////////////////////////////////////////////////////////////////////
   92:     }
   93:  
   94:     ////////////////////////////////////////////////////////////////////////////
   95:     ////////////////////////////////////////////////////////////////////////////
   96: }