public string Luu() { var kq = ""; var toLotMP = new ToLotMoPhang(); toLotMP.ID = View.ID; toLotMP.Ten = View.Ten; toLotMP.MaNhaCungCap = View.MaNhaCungCap; toLotMP.TenNhaCungCap = View.TenNhaCungCap; toLotMP.GiaMuaTo = View.GiaMuaTo; toLotMP.ThuTu = View.ThuTu; switch (View.TinhTrangForm) { case FormStateS.Edit: kq = ToLotMoPhang.Sua(toLotMP); break; case FormStateS.New: kq = ToLotMoPhang.Them(toLotMP); break; } return(kq); }
public void TrinhBayToBoi() { if (View.ID <= 0) { return; } var toLotMoPhang = ToLotMoPhang.DocTheoId(View.ID); View.ID = toLotMoPhang.ID; View.Ten = toLotMoPhang.Ten; View.MaNhaCungCap = toLotMoPhang.MaNhaCungCap; View.TenNhaCungCap = toLotMoPhang.TenNhaCungCap; View.GiaMuaTo = toLotMoPhang.GiaMuaTo; View.ThuTu = toLotMoPhang.ThuTu; }
public decimal ThanhTien_ThPh() { decimal kq = 0; var dongCuon = DongCuonMoPhang.DocTheoId(View.IdThanhPhamChon); if (View.IdToLotChon <= 0) { return(0);//Không thể không có nhũ } var loXo = ToLotMoPhang.DocTheoId(View.IdToLotChon); var giaDongCuon = new GiaDongCuonMoPhang(View.SoLuong, View.SoToDoi, dongCuon, loXo, this.TyLeMarkUp()); kq = giaDongCuon.ThanhTienSales(); return(kq); }
//Thêm ngoài Implement public List <ToLotMoPhang> ToLotMoPhangS() { return(ToLotMoPhang.DocTatCa()); }
public List <ToLotMoPhang> LoXoDongCuonS() { return(ToLotMoPhang.DocTatCa()); }