Пример #1
0
        public void suaHSX(EC_tb_Hangsx hsx)
        {
            string sql = (@"UPDATE tb_Hangsx
            SET tenhang =N'" + hsx.TENHANG + "' where  mahang =N'" + hsx.MAHANG + "'");

            cn.ExcuteNonQuery(sql);
        }
 public void themoihsx(EC_tb_Hangsx hsx)
 {
     if (!hsxsql.kiemtraHSX(hsx.MAHANG))
     {
         hsxsql.themmoiHSX(hsx);
     }
     else
     {
         MessageBox.Show("Mã này đã tồn tại,xin chọn Mã khác", "Chú Ý", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }
Пример #3
0
 public void xoaHSX(EC_tb_Hangsx hsx)
 {
     cn.ExcuteNonQuery("DELETE FROM [tb_Hangsx] WHERE [mahang] = N'" + hsx.MAHANG + "'");
 }
Пример #4
0
 public void themmoiHSX(EC_tb_Hangsx hsx)
 {
     cn.ExcuteNonQuery(@"INSERT INTO tb_Hangsx
               (mahang, tenhang) VALUES   (N'" + hsx.MAHANG + "',N'" + hsx.TENHANG + "')");
 }
 public void xoahsx(EC_tb_Hangsx hsx)
 {
     hsxsql.xoaHSX(hsx);
 }
 public void suahsx(EC_tb_Hangsx hsx)
 {
     hsxsql.suaHSX(hsx);
 }