Exemple #1
0
 public FormMARKETING(MASTER.FormMARKETING _frm, int Type, RMS.COMMON.MASTER.RMS_MARKETING obj)
 {
     InitializeComponent();
     this.frm     = _frm;
     this.Type    = Type;
     txtKODE.Text = GETKODE();
     if (Type == 1)
     {
         LOAD_DATA(obj);
     }
 }
Exemple #2
0
        void LOAD_DATA(RMS.COMMON.MASTER.RMS_MARKETING obj)
        {
            txtKODE.Enabled = false;
            DataTable dt = b.CARI_BYKODE(obj);

            if (dt.Rows.Count > 0)
            {
                txtKODE.Text   = dt.Rows[0]["KODE"].ToString();
                txtNAMA.Text   = dt.Rows[0]["NAMA"].ToString();
                txtALAMAT.Text = dt.Rows[0]["ALAMAT"].ToString();
                txtTLP.Text    = dt.Rows[0]["TELEPON"].ToString();
                txtEMAIL.Text  = dt.Rows[0]["EMAIL"].ToString();
            }
        }
Exemple #3
0
 public void DELETE(RMS.COMMON.MASTER.RMS_MARKETING 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("@KODE", MySqlDbType.VarChar, obj.KODE));
             dt = db.Commands[0].ExecuteDataTable();
         }
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
Exemple #4
0
 public DataTable CARI_BYNAMA(RMS.COMMON.MASTER.RMS_MARKETING 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("@NAMA", MySqlDbType.VarChar, obj.NAMA));
             dt = db.Commands[0].ExecuteDataTable();
         }
         return dt;
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
Exemple #5
0
 public void UPDATE(RMS.COMMON.MASTER.RMS_MARKETING 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("@KODE", MySqlDbType.VarChar, obj.KODE));
             db.Commands[0].Parameters.Add(new Parameter("@NAMA", 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);
     }
 }
Exemple #6
0
 public DataTable SEARCH_BYNAMA(RMS.COMMON.MASTER.RMS_MARKETING obj)
 {
     return(p.SEARCH_BYNAMA(obj));
 }
Exemple #7
0
 public DataTable CARI_BYNAMA(RMS.COMMON.MASTER.RMS_MARKETING obj)
 {
     return(p.CARI_BYNAMA(obj));
 }
Exemple #8
0
 public void DELETE(RMS.COMMON.MASTER.RMS_MARKETING obj)
 {
     p.DELETE(obj);
 }
Exemple #9
0
 public void UPDATE(RMS.COMMON.MASTER.RMS_MARKETING obj)
 {
     p.UPDATE(obj);
 }
Exemple #10
0
 public void INSERT(RMS.COMMON.MASTER.RMS_MARKETING obj)
 {
     p.INSERT(obj);
 }
Exemple #11
0
 public void GET_DATA_MARKETING(RMS.COMMON.MASTER.RMS_MARKETING obj)
 {
     txtIDMARKETING.Text   = obj.ID.ToString();
     txtKODEMARKETING.Text = obj.KODE;
     txtNAMAMARKETING.Text = obj.NAMA;
 }