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); } }
public void xoaHSX(EC_tb_Hangsx hsx) { cn.ExcuteNonQuery("DELETE FROM [tb_Hangsx] WHERE [mahang] = N'" + hsx.MAHANG + "'"); }
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); }