public CoreResult Update(int?userId = null, bool checkPermission = false) { using (TaiSanProvider provider = new TaiSanProvider()) { return(provider.Update(this, userId, checkPermission)); } }
public CoreResult Exist() { CheckValidEntity(); using (TaiSanProvider provider = new TaiSanProvider()) { return(provider.Exist(AssetsID)); } }
public CoreResult Delete(int?userId = null, bool checkPermission = false) { CheckValidEntity(); using (TaiSanProvider provider = new TaiSanProvider()) { return(provider.Delete(AssetsID, userId, checkPermission)); } }
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) } }; } }