private ServiceDTO Map(tblService tblService)
 {
     if (tblService == null) return null;
     return new ServiceDTO()
                {
                    MasterId = tblService.id,
                    Name = tblService.Name,
                    Code = tblService.Code,
                    StatusId = tblService.IM_Status,
                    DateLastUpdated = tblService.IM_DateLastUpdated,
                    Cost = tblService.Cost.HasValue?tblService.Cost.Value:0m,
                    DateCreated = tblService.IM_DateCreated,
                    Description = tblService.Description
                };
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Create a new tblService object.
 /// </summary>
 /// <param name="id">Initial value of the id property.</param>
 /// <param name="name">Initial value of the Name property.</param>
 /// <param name="iM_DateCreated">Initial value of the IM_DateCreated property.</param>
 /// <param name="iM_DateLastUpdated">Initial value of the IM_DateLastUpdated property.</param>
 /// <param name="iM_Status">Initial value of the IM_Status property.</param>
 public static tblService CreatetblService(global::System.Guid id, global::System.String name, global::System.DateTime iM_DateCreated, global::System.DateTime iM_DateLastUpdated, global::System.Int32 iM_Status)
 {
     tblService tblService = new tblService();
     tblService.id = id;
     tblService.Name = name;
     tblService.IM_DateCreated = iM_DateCreated;
     tblService.IM_DateLastUpdated = iM_DateLastUpdated;
     tblService.IM_Status = iM_Status;
     return tblService;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the tblService EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTotblService(tblService tblService)
 {
     base.AddObject("tblService", tblService);
 }