Пример #1
0
 public CoreResult Update(int?userId = null, bool checkPermission = false)
 {
     using (TaiSanProvider provider = new TaiSanProvider())
     {
         return(provider.Update(this, userId, checkPermission));
     }
 }
Пример #2
0
 public CoreResult Exist()
 {
     CheckValidEntity();
     using (TaiSanProvider provider = new TaiSanProvider())
     {
         return(provider.Exist(AssetsID));
     }
 }
Пример #3
0
 public CoreResult Delete(int?userId = null, bool checkPermission = false)
 {
     CheckValidEntity();
     using (TaiSanProvider provider = new TaiSanProvider())
     {
         return(provider.Delete(AssetsID, userId, checkPermission));
     }
 }
Пример #4
0
 public CoreResult Get()
 {
     CheckValidEntity();
     using (TaiSanProvider provider = new TaiSanProvider())
     {
         var entity = provider.Get(AssetsID);
         if (entity != null)
         {
             #region Set Value
             AssetsCateID  = entity.AssetsCateID;
             CompanyID     = entity.CompanyID;
             DepartmentsID = entity.DepartmentsID;
             NgayNhap      = entity.NgayNhap;
             TinhTrangNhap = entity.TinhTrangNhap;
             SoNamDaSD     = entity.SoNamDaSD;
             NamSanXuat    = entity.NamSanXuat;
             DonGiaNhap    = entity.DonGiaNhap;
             deleted       = entity.deleted;
             userIDCreated = entity.userIDCreated;
             dateCreated   = entity.dateCreated;
             dateUpdated   = entity.dateUpdated;
             userIDUpdated = entity.userIDUpdated;
             NumberUpdated = entity.NumberUpdated;
             #endregion
             return(new CoreResult {
                 StatusCode = CoreStatusCode.OK, Message = provider.GetMessageByCoreStatusCode(CoreStatusCode.OK, ActionType.Get)
             });
         }
         else
         {
             return new CoreResult {
                        StatusCode = CoreStatusCode.Failed, Message = provider.GetMessageByCoreStatusCode(CoreStatusCode.Failed, ActionType.Get)
             }
         };
     }
 }