public bool UpdGiam(KhuyenMaiObj kmObj) { cmd.CommandText = "Update SUKIEN set giam ='" + kmObj.Giam + "' Where mask = '" + kmObj.MaKhuyenmai + "'"; cmd.CommandType = CommandType.Text; cmd.Connection = con.Connection; try { con.OpenConn(); cmd.ExecuteNonQuery(); return(true); } catch (Exception ex) { string mex = ex.Message; cmd.Dispose(); con.CloseConn(); } return(false); }
public bool AddDataKm(KhuyenMaiObj kmObj) { cmd.CommandText = "Insert into SUKIEN values ('" + kmObj.MaKhuyenmai + "',N'" + kmObj.TenKhuyenMai + "',N'" + kmObj.NoiDung + "','" + kmObj.Giam + "')"; cmd.CommandType = CommandType.Text; cmd.Connection = con.Connection; try { con.OpenConn(); cmd.ExecuteNonQuery(); con.CloseConn(); return(true); } catch (Exception ex) { string mex = ex.Message; cmd.Dispose(); con.CloseConn(); } return(false); }
public bool UpdDataGiam(KhuyenMaiObj kmObj) { return(kmMod.UpdGiam(kmObj)); }
public bool updDateKm(KhuyenMaiObj kmObj) { return(kmMod.UpdDataKm(kmObj)); }
public bool addDataKm(KhuyenMaiObj kmObj) { return(kmMod.AddDataKm(kmObj)); }