public Calendar Get(int key) { using (LichCongTacProvider provider = new LichCongTacProvider()) { return(provider.Get(key)); } }
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)); } } }