示例#1
0
        public DataTable CreateTbNCC(EC_NhaCC _ncc)
        {
            string sqlquery = "SELECT * FROM tb_NCC where mancc like N'%{0}%' and tenncc like N'%{1}%' and diachi like N'%{2}%' and lienhe like N'%{3}%'";

            sqlquery = string.Format(sqlquery, _ncc.MaNhaCC, _ncc.TenNhaCC, _ncc.DiaChi, _ncc.DienThoai);
            return(Connect.CreateTable(sqlquery));
        }
示例#2
0
        public void UpdateNhaCC(EC_NhaCC _nhacc)
        {
            string sqlquery = (@"UPDATE    tb_NCC
                    SET tenncc =N'{0}', diachi =N'{1}', lienhe =N'{2}' where mancc=N'{3}'");

            sqlquery = string.Format(sqlquery, _nhacc.TenNhaCC, _nhacc.DiaChi, _nhacc.DienThoai, _nhacc.MaNhaCC);
            Connect.ExcuteNonQuery(sqlquery);
        }
示例#3
0
        public void AddNhaCC(EC_NhaCC _nhacc)
        {
            string sqlquery = (@"INSERT INTO tb_NCC
                      (mancc, tenncc, diachi,lienhe) 
                VALUES   (N'{0}',N'{1}',N'{2}',N'{3}')");

            sqlquery = string.Format(sqlquery, _nhacc.MaNhaCC, _nhacc.TenNhaCC, _nhacc.DiaChi, _nhacc.DienThoai);
            Connect.ExcuteNonQuery(sqlquery);
        }
示例#4
0
 public void AddNhaCC(EC_NhaCC _nhacc)
 {
     if (!sqlnhacc.CheckNhaCC(_nhacc.MaNhaCC))
     {
         sqlnhacc.AddNhaCC(_nhacc);
     }
     else
     {
         MessageBox.Show("Mã này đã tồn tại,xin chọn Mã khác", "Chú Ý", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }
示例#5
0
 public void DeleteNhaCC(EC_NhaCC _nhacc)
 {
     sqlnhacc.DeleteNhaCC(_nhacc);
 }
示例#6
0
 public void UpdateNhaCC(EC_NhaCC _nhacc)
 {
     sqlnhacc.UpdateNhaCC(_nhacc);
 }
示例#7
0
 public DataTable CreateTbNCC(EC_NhaCC _ncc)
 {
     return(sqlnhacc.CreateTbNCC(_ncc));
 }
示例#8
0
 public void DeleteNhaCC(EC_NhaCC _nhacc)
 {
     Connect.ExcuteNonQuery("DELETE FROM [tb_NCC] WHERE mancc=N'" + _nhacc.MaNhaCC + "'");
 }