Exemplo n.º 1
0
 public CoreResult Exist()
 {
     using (XuatKhoProvider provider = new XuatKhoProvider())
     {
         return(provider.Exist(this.XuatKhoID));
     }
 }
Exemplo n.º 2
0
 public CoreResult Update(int?userId = default(int?), bool checkPermission = false)
 {
     using (XuatKhoProvider provider = new XuatKhoProvider())
     {
         return(provider.Update(this, userId, checkPermission));
     }
 }
Exemplo n.º 3
0
 public CoreResult DeleteChiTiet(int[] xuatkhochitietIDs, int?userId = default(int?), bool checkPermission = false)
 {
     using (XuatKhoProvider provider = new XuatKhoProvider())
     {
         return(provider.DeleteChiTiet(xuatkhochitietIDs, userId, checkPermission));
     }
 }
Exemplo n.º 4
0
        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;
            }
        }