public CoreResult Get(int xuatkhoid) { try { using (XuatKhoProvider provider = new XuatKhoProvider()) { XuatKho entity = provider.Get(xuatkhoid); if (entity != null) { #region Assign value this.XuatKhoID = entity.XuatKhoID; this.DepartmentsID_KhoX = entity.DepartmentsID_KhoX; this.LoaiPhieuXuat = entity.LoaiPhieuXuat; this.DepartmentsID_NoiNhan = entity.DepartmentsID_NoiNhan; this.patientsID = entity.patientsID; this.NguoiNhan = entity.NguoiNhan; this.NoiDungXuat = entity.NoiDungXuat; this.NgayXuat = entity.NgayXuat; this.NgayCT = entity.NgayCT; this.SoCT = entity.SoCT; this.Duyet_status = entity.Duyet_status; this.Duyet_employeesID = entity.Duyet_employeesID; this.Duyet_Date = entity.Duyet_Date; this.userIDCreated = entity.userIDCreated; this.dateCreated = entity.dateCreated; this.dateUpdated = entity.dateUpdated; this.userIDUpdated = entity.userIDUpdated; this.NumberUpdated = entity.NumberUpdated; #endregion return(provider.GetResultFromStatusCode(CoreStatusCode.OK, ActionType.Get)); } else { return(provider.GetResultFromStatusCode(CoreStatusCode.Failed, ActionType.Get)); } } } catch (Exception e) { throw e; } }