Exemplo n.º 1
0
 public bool insertHieuXe(Entity_HieuXe _hx)
 {
     try
     {
         string   strSQL  = "SP_INSERT_HIEUXE";
         string[] pNames  = { "@maHx", "@tenHx" };
         object[] pValues = { _hx.MaHx, _hx.TenHx };
         int      count   = con.ExecuteStoredProcedure(strSQL, pNames, pValues);
         if (count >= 0)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch
     {
         return(false);
     }
 }
Exemplo n.º 2
0
 public bool insertKhachHang(Entity_KhachHang _kh)
 {
     try
     {
         const string strSQL  = "SP_INSERT_KHACHHANG";
         string[]     pNames  = { "@id", "@ten", "@sdt", "@email", "@diaChi", "@ngaySinh", "@gender", "@congNo" };
         object[]     pValues = { _kh.KhId, _kh.Ten, _kh.Sdt, _kh.Email, _kh.DiaChi, _kh.NgaySinh, _kh.GioiTinh, _kh.CongNo };
         int          count   = con.ExecuteStoredProcedure(strSQL, pNames, pValues);
         if (count >= 0)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch
     {
         return(false);
     }
 }
Exemplo n.º 3
0
 public bool insertDongXe(Entity_DongXe _dx)
 {
     try
     {
         const string strSQL  = "SP_INSERT_DONGXE";
         string[]     pNames  = { "@id", "@hieuXe", "@tskt" };
         object[]     pValues = { _dx.DongXeId, _dx.HieuXe, _dx.Tskt };
         int          count   = con.ExecuteStoredProcedure(strSQL, pNames, pValues);
         if (count >= 0)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch
     {
         return(false);
     }
 }
Exemplo n.º 4
0
 public bool insertXe(Entity_Xe _xe)
 {
     try
     {
         const string strSQL  = "SP_INSERT_XE";
         string[]     pNames  = { "@bs", "@userId", "@ngayTN", "@dongXeId", "@mau", "@mota", "@mauTrong", "@namXX", "@xuatXu" };
         object[]     pValues = { _xe.BienSo, _xe.User_id, _xe.NgayTn, _xe.DongXeId, _xe.MauXe, _xe.MoTa, _xe.MauNoiThat, _xe.NamSx, _xe.XuatSu };
         int          count   = con.ExecuteStoredProcedure(strSQL, pNames, pValues);
         if (count >= 0)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch
     {
         return(false);
     }
 }
Exemplo n.º 5
0
 public bool insertCTPSC(Entity_CTPSC _ct)
 {
     try
     {
         const string strSQL  = "SP_INSERT_CTPSC";
         string[]     pNames  = { "@maPsc", "@maVt", "@sl" };
         object[]     pValues = { _ct.MaPsc, _ct.MaVt, _ct.SoLuong };
         int          count   = con.ExecuteStoredProcedure(strSQL, pNames, pValues);
         if (count >= 0)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch
     {
         return(false);
     }
 }
Exemplo n.º 6
0
 public bool insertUser(Entity_User us)
 {
     try
     {
         string   strSQL  = "SP_REGISTER";
         string[] pNames  = { "@username", "@email", "@pass", "@role", "@gender", "@birthday", "@full_name", "@phone", "@direction" };
         object[] pValues = { us.Username, us.Email, us.Pass, us.Role, us.Gender, us.Birthday, us.FullName, us.Phone, us.Direction };
         int      count   = con.ExecuteStoredProcedure(strSQL, pNames, pValues);
         if (count >= 0)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch
     {
         return(false);
     }
 }
Exemplo n.º 7
0
 public bool insertVatTu(Entity_VatTu _vt)
 {
     try
     {
         const string strSQL  = "SP_INSERT_VATTU";
         string[]     pNames  = { "@maVt", "@tenVt", "@donGia", "@sl" };
         object[]     pValues = { _vt.MaVt, _vt.TenVt, _vt.DonGia, _vt.SoLuong };
         int          count   = con.ExecuteStoredProcedure(strSQL, pNames, pValues);
         if (count >= 0)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch
     {
         return(false);
     }
 }
Exemplo n.º 8
0
 public bool insertPSC(Entity_PhieuSuaChua _psc)
 {
     try
     {
         const string strSQL  = "SP_INSERT_PSC";
         string[]     pNames  = { "@maPsc", "@bs", "@uid" };
         object[]     pValues = { _psc.MaPsc, _psc.BienSo, _psc.User_id };
         int          count   = con.ExecuteStoredProcedure(strSQL, pNames, pValues);
         if (count >= 0)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch
     {
         return(false);
     }
 }
Exemplo n.º 9
0
 public bool delObject(string obj)
 {
     try
     {
         const string strSQL  = "SP_DEL_NHACUNGCAP";
         string[]     pNames  = { "@id" };
         object[]     pValues = { obj };
         int          count   = con.ExecuteStoredProcedure(strSQL, pNames, pValues);
         if (count >= 0)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch
     {
         return(false);
     }
 }
Exemplo n.º 10
0
 public bool insertHoaDon(Entity_PhieuThanhToan _ptt)
 {
     try
     {
         const string strSQL  = "SP_INSERT_HOADON";
         string[]     pNames  = { "@maPtt", "@maPsc" };
         object[]     pValues = { _ptt.MaPtt, _ptt.MaPsc };
         int          count   = con.ExecuteStoredProcedure(strSQL, pNames, pValues);
         if (count >= 0)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch
     {
         return(false);
     }
 }