/// <summary> /// Thêm mới tài sản /// </summary> /// <param name="ts"></param> /// <returns></returns> public bool InsertTaiSan(DAL.HOSO_TAISAN ts) { try { dataContext.HOSO_TAISANs.InsertOnSubmit(ts); Save(); return(true); } catch { return(false); } }
public void UpdateTaiSan(DAL.HOSO_TAISAN hsts) { DAL.HOSO_TAISAN taisan = GetTaiSan(hsts.PR_KEY); if (taisan != null) { taisan.SoLuong = hsts.SoLuong; taisan.MaDonViTinh = hsts.MaDonViTinh; taisan.GHI_CHU = hsts.GHI_CHU; taisan.MA_VTHH = hsts.MA_VTHH; taisan.NGAY_NHAN = hsts.NGAY_NHAN; taisan.TINH_TRANG = hsts.TINH_TRANG; taisan.TepTinDinhKem = hsts.TepTinDinhKem; Save(); } }