//het co ban // //sua kho private void btnSua_Click(object sender, EventArgs e) { try { DTO_Kho sv = new DTO_Kho(txtMaKho.Text, txtTenKho.Text); BUS_Kho.Sua_kho(sv); DialogResult dr = MessageBox.Show("Sua thanh Cong", "Thông Báo", MessageBoxButtons.OK); loaddata(); if (dr == DialogResult.OK) { loaddata(); } } catch (Exception ex) { MessageBox.Show("Sua không thành công!\n" + ex.Message); } }
//them //sua //xoa public static void Them_kho(DTO_Kho nv) { DAO_Kho.Themkho(nv); }
public static void Sua_kho(DTO_Kho nv) { DAO_Kho.Suakho(nv); }
//SUA public static void Suakho(DTO_Kho gv) { con = DAO_KetNoiDB.OpenConnect(); SqlHelper.ExecuteNonQuery(con, "PR_SUA_KHO", gv.MaKho, gv.TenKho); DAO_KetNoiDB.CloseConnect(con); }