Exemplo n.º 1
0
 public BLLResult Insert(string MaVL, string TenVL, string MaNCC, decimal SoLuong, string DonviTinh, decimal GiaMua, decimal GiaLe, decimal GiaSi, decimal SoLuongBanSi, string MaTinhTrang, string MaKM, decimal SoLuongToiThieu, string GhiChu)
 {
     try
     {
         QLVLXD.DLL.VatLieu vl = new QLVLXD.DLL.VatLieu();
         vl.TenVL           = TenVL;
         vl.MaVL            = MaVL;
         vl.MaNCC           = MaNCC;
         vl.SoLuong         = SoLuong;
         vl.DVT_Goc         = DonviTinh;
         vl.GiaMua          = GiaMua;
         vl.GiaBanLe        = GiaLe;
         vl.GiaBanSi        = GiaSi;
         vl.SoLuongBanSi    = SoLuongBanSi;
         vl.MaTinhTrang     = MaTinhTrang;
         vl.MaKM            = MaKM;
         vl.SoLuongToiThieu = SoLuongToiThieu;
         vl.GhiChu          = GhiChu;
         vl.Live            = "True";
         DB.VatLieus.InsertOnSubmit(vl);
         DB.SubmitChanges();
         return(new BLLResult((int)BLLResultType.S_ADD));
     }
     catch
     {
         return(new BLLResult(10000741));
     }
 }
Exemplo n.º 2
0
 public BLLResult Insert(string MaVL, string TenVL, string MaNCC, decimal SoLuong, string DonviTinh, decimal GiaMua, decimal GiaBan, string GhiChu)
 {
     try
     {
         QLVLXD.DLL.VatLieu vl = new QLVLXD.DLL.VatLieu();
         vl.TenVL   = TenVL;
         vl.MaVL    = MaVL;
         vl.MaNCC   = MaNCC;
         vl.SoLuong = SoLuong;
         vl.MaDVT   = DonviTinh;
         vl.GiaMua  = GiaMua;
         vl.GiaBan  = GiaBan;
         vl.GhiChu  = GhiChu;
         DB.VatLieus.InsertOnSubmit(vl);
         DB.SubmitChanges();
         return(new BLLResult((int)BLLResultType.S_ADD));
     }
     catch
     {
         return(new BLLResult(0));
     }
 }