コード例 #1
0
ファイル: Calendar.cs プロジェクト: khanhlive/PrivateProject
 public Calendar Get(int key)
 {
     using (LichCongTacProvider provider = new LichCongTacProvider())
     {
         return(provider.Get(key));
     }
 }
コード例 #2
0
ファイル: Calendar.cs プロジェクト: khanhlive/PrivateProject
 public CoreResult Get()
 {
     using (LichCongTacProvider provider = new LichCongTacProvider())
     {
         var entity = provider.Get(this.CalendarID);
         if (entity != null)
         {
             #region Assign value
             this.CalendarID    = entity.CalendarID;
             this.CalendarDate  = entity.CalendarDate;
             this.employeesID   = entity.employeesID;
             this.DepartmentsID = entity.DepartmentsID;
             this.TimeFrom      = entity.TimeFrom;
             this.TimeTo        = entity.TimeTo;
             this.Description   = entity.Description;
             this.isActivity    = entity.isActivity;
             #endregion
             return(provider.GetResultFromStatusCode(CoreStatusCode.OK, ActionType.Get));
         }
         else
         {
             return(provider.GetResultFromStatusCode(CoreStatusCode.Failed, ActionType.Get));
         }
     }
 }