public FormSALES(MASTER.FormSALES _frm, int Type, RMS.COMMON.MASTER.RMS_SALES obj) { InitializeComponent(); this.frm = _frm; this.Type = Type; if (Type == 1) { LOAD_DATA(obj); } }
void LOAD_DATA(RMS.COMMON.MASTER.RMS_SALES obj) { txtKODE.Enabled = false; DataTable dt = b.CARI_BYKODE(obj); if (dt.Rows.Count > 0) { txtKODE.Text = dt.Rows[0]["KODESALES"].ToString(); txtNAMA.Text = dt.Rows[0]["NAMASALES"].ToString(); txtALAMAT.Text = dt.Rows[0]["ALAMAT"].ToString(); txtTLP.Text = dt.Rows[0]["TELEPON"].ToString(); txtEMAIL.Text = dt.Rows[0]["EMAIL"].ToString(); } }
public void DELETE(RMS.COMMON.MASTER.RMS_SALES obj) { try { using (Database db = new Database()) { DataTable dt = new DataTable(); db.Commands.Add(db.CreateCommand(QUERY_DELETE)); db.Commands[0].Parameters.Add(new Parameter("@KODESALES", MySqlDbType.VarChar, obj.KODE)); dt = db.Commands[0].ExecuteDataTable(); } } catch (Exception ex) { throw new Exception(ex.Message); } }
public DataTable CARI_BYNAMA(RMS.COMMON.MASTER.RMS_SALES obj) { DataTable dt = new DataTable(); try { using (Database db = new Database()) { db.Commands.Add(db.CreateCommand(QUERY_CARI_BYNAME)); db.Commands[0].Parameters.Add(new Parameter("@NAMASALES", MySqlDbType.VarChar, obj.NAMA)); dt = db.Commands[0].ExecuteDataTable(); } return(dt); } catch (Exception ex) { throw new Exception(ex.Message); } }
public void UPDATE(RMS.COMMON.MASTER.RMS_SALES obj) { try { using (Database db = new Database()) { DataTable dt = new DataTable(); db.Commands.Add(db.CreateCommand(QUERY_UPDATE)); db.Commands[0].Parameters.Add(new Parameter("@KODESALES", MySqlDbType.VarChar, obj.KODE)); db.Commands[0].Parameters.Add(new Parameter("@NAMASALES", MySqlDbType.VarChar, obj.NAMA)); db.Commands[0].Parameters.Add(new Parameter("@ALAMAT", MySqlDbType.VarChar, obj.ALAMAT)); db.Commands[0].Parameters.Add(new Parameter("@TELEPON", MySqlDbType.VarChar, obj.TELP)); db.Commands[0].Parameters.Add(new Parameter("@EMAIL", MySqlDbType.VarChar, obj.EMAIL)); dt = db.Commands[0].ExecuteDataTable(); } } catch (Exception ex) { throw new Exception(ex.Message); } }
public DataTable SEARCH_BYNAMA(RMS.COMMON.MASTER.RMS_SALES obj) { return(p.SEARCH_BYNAMA(obj)); }
public DataTable CARI_BYNAMA(RMS.COMMON.MASTER.RMS_SALES obj) { return(p.CARI_BYNAMA(obj)); }
public void DELETE(RMS.COMMON.MASTER.RMS_SALES obj) { p.DELETE(obj); }
public void UPDATE(RMS.COMMON.MASTER.RMS_SALES obj) { p.UPDATE(obj); }
public void INSERT(RMS.COMMON.MASTER.RMS_SALES obj) { p.INSERT(obj); }