コード例 #1
0
        public void GET_DATA_AGENT(RMS.COMMON.MASTER.RMS_PRICELIST obj)
        {
            txtKODEAGENT.Text = obj.KODEAGENT;
            txtNAMAAGENT.Text = obj.NAMAAGENT;
            c.IDAGENT = obj.IDAGENT;

        }
コード例 #2
0
        public DataTable SELECTSCANRATE(RMS.COMMON.MASTER.RMS_PRICELIST obj)
        {
            DataTable dt = new DataTable();

            try
            {
                using (Database db = new Database())
                {
                    if (!string.IsNullOrEmpty(obj.NAMATERUSAN.ToString()))
                    {
                        db.Commands.Add(db.CreateCommand(QUERY_SELECTSCANRATETERUSAN));
                        db.Commands[0].Parameters.Add(new Parameter("@NAMATERUSAN", MySqlDbType.VarChar, obj.NAMATERUSAN));
                    }
                    else
                    {
                        db.Commands.Add(db.CreateCommand(QUERY_SELECTSCANRATE));
                    }
                    db.Commands[0].Parameters.Add(new Parameter("@IDSERVICE", MySqlDbType.VarChar, obj.IDSERVICE));
                    db.Commands[0].Parameters.Add(new Parameter("@IDHANDLING", MySqlDbType.VarChar, obj.IDHANDLING));
                    db.Commands[0].Parameters.Add(new Parameter("@IDASAL", MySqlDbType.VarChar, obj.IDASAL));
                    db.Commands[0].Parameters.Add(new Parameter("@IDTUJUAN", MySqlDbType.VarChar, obj.IDTUJUAN));
                    db.Commands[0].Parameters.Add(new Parameter("@NAMACUSTOMER", MySqlDbType.VarChar, obj.NAMACUSTOMER));
                    db.Commands[0].Parameters.Add(new Parameter("@ISAKTIF", MySqlDbType.Int32, obj.ISAKTIF));
                    dt = db.Commands[0].ExecuteDataTable();
                }
                return(dt);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
コード例 #3
0
 public void UPDATE(RMS.COMMON.MASTER.RMS_PRICELIST 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("@IDPRICELIST", MySqlDbType.Int32, obj.IDPRICELIST));
             db.Commands[0].Parameters.Add(new Parameter("@IDLAYANAN", MySqlDbType.Int32, obj.IDSERVICE));
             db.Commands[0].Parameters.Add(new Parameter("@KOTAASAL", MySqlDbType.Int32, obj.IDASAL));
             db.Commands[0].Parameters.Add(new Parameter("@IDKOTA", MySqlDbType.Int32, obj.IDTUJUAN));
             if (obj.IDTERUSAN == 0)
             {
                 db.Commands[0].Parameters.Add(new Parameter("@IDTERUSAN", MySqlDbType.Int32, null));
             }
             else
             {
                 db.Commands[0].Parameters.Add(new Parameter("@IDTERUSAN", MySqlDbType.Int32, obj.IDTERUSAN));
             }
             db.Commands[0].Parameters.Add(new Parameter("@IDHANDLING", MySqlDbType.Int32, obj.IDHANDLING));
             db.Commands[0].Parameters.Add(new Parameter("@CHARGE", MySqlDbType.Float, obj.CHARGE));
             db.Commands[0].Parameters.Add(new Parameter("@RC", MySqlDbType.Float, obj.RC));
             db.Commands[0].Parameters.Add(new Parameter("@DURASIWAKTU", MySqlDbType.VarChar, obj.DURASIWAKTU));
             db.Commands[0].Parameters.Add(new Parameter("@ISAKTIF", MySqlDbType.Int32, obj.ISAKTIF));
             dt = db.Commands[0].ExecuteDataTable();
         }
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
コード例 #4
0
        public void GET_DATA_KOTATERUSAN(RMS.COMMON.MASTER.RMS_PRICELIST obj)
        {
          
            txtKODETERUSAN.Text = obj.KODEATERUSAN;
            txtNAMATERUSAN.Text = obj.NAMATERUSAN;
            
            c.IDTERUSAN = obj.IDTERUSAN;


        }
コード例 #5
0
        public FormPRICELIST(MASTER.FormPRICELIST _frm, int Type, RMS.COMMON.MASTER.RMS_PRICELIST obj)
        {
            InitializeComponent();
            this.frm = _frm;
            this.Type = Type;

            if (Type == 1)
            {
                //  LOAD_DATA(obj);
            }
            loadCOMBO();
        }
コード例 #6
0
 public void DELETE(RMS.COMMON.MASTER.RMS_PRICELIST 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("@IDPRICELIST", MySqlDbType.VarChar, obj.IDPRICELIST));
             dt = db.Commands[0].ExecuteDataTable();
         }
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
コード例 #7
0
        public DataTable CARI_BYKODE(RMS.COMMON.MASTER.RMS_PRICELIST obj)
        {
            DataTable dt = new DataTable();

            try
            {
                using (Database db = new Database())
                {
                    db.Commands.Add(db.CreateCommand(QUERY_CARI_BYKODE));
                    db.Commands[0].Parameters.Add(new Parameter("@KODECUSTOMER", MySqlDbType.VarChar, obj.KODECUSTOMER));
                    dt = db.Commands[0].ExecuteDataTable();
                }
                return(dt);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
コード例 #8
0
        public DataTable SEARCH_BYNAMA(RMS.COMMON.MASTER.RMS_PRICELIST obj)
        {
            DataTable dt = new DataTable();

            try
            {
                using (Database db = new Database())
                {
                    db.Commands.Add(db.CreateCommand(QUERY_SEARCH_BYNAME));
                    // db.Commands[0].Parameters.Add(new Parameter("@NAMAAGENT", MySqlDbType.VarChar, obj.NAMA));
                    dt = db.Commands[0].ExecuteDataTable();
                }
                return(dt);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
コード例 #9
0
        public void GET_DATA_KOTA(RMS.COMMON.MASTER.RMS_PRICELIST obj, string _namaField)
        {
            if (_namaField == "ORIGIN")
            {
                //txtKODEORIGIN.Text = obj.;
                txtKODEORIGIN.Text = obj.KODEAREAASAL;
                txtNAMAORIGIN.Text = obj.NAMAASAL;
                c.IDASAL = obj.IDASAL;
               

            }
            else
            {
                txtKODEDESTINATION.Text = obj.KODEAREATUJUAN;
                txtNAMADESTINATION.Text = obj.NAMATUJUAN;
                c.IDTUJUAN = obj.IDTUJUAN;
            }


        }
コード例 #10
0
        public DataTable SELECT(RMS.COMMON.MASTER.RMS_PRICELIST obj)
        {
            DataTable dt = new DataTable();

            try
            {
                using (Database db = new Database())
                {
                    db.Commands.Add(db.CreateCommand(QUERY_SELECT));
                    db.Commands[0].Parameters.Add(new Parameter("@IDSERVICE", MySqlDbType.VarChar, obj.IDSERVICE));
                    db.Commands[0].Parameters.Add(new Parameter("@IDHANDLING", MySqlDbType.VarChar, obj.IDHANDLING));
                    db.Commands[0].Parameters.Add(new Parameter("@IDASAL", MySqlDbType.VarChar, obj.IDASAL));
                    db.Commands[0].Parameters.Add(new Parameter("@IDTUJUAN", MySqlDbType.VarChar, obj.IDTUJUAN));

                    dt = db.Commands[0].ExecuteDataTable();
                }
                return(dt);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
コード例 #11
0
 public DataTable CARI_BYKODE_UPDATE(RMS.COMMON.MASTER.RMS_PRICELIST obj)
 {
     return(p.CARI_BYKODE_UPDATE(obj));
 }
コード例 #12
0
 public void INSERT(RMS.COMMON.MASTER.RMS_PRICELIST obj)
 {
     p.INSERT(obj);
 }
コード例 #13
0
 public void UPDATE(RMS.COMMON.MASTER.RMS_PRICELIST obj)
 {
     p.UPDATE(obj);
 }
コード例 #14
0
 public void DELETE(RMS.COMMON.MASTER.RMS_PRICELIST obj)
 {
     p.DELETE(obj);
 }
コード例 #15
0
 public DataTable SELECTSCANRATE(RMS.COMMON.MASTER.RMS_PRICELIST obj)
 {
     return(p.SELECTSCANRATE(obj));
 }
コード例 #16
0
 public DataTable SEARCH_BYNAMA(RMS.COMMON.MASTER.RMS_PRICELIST obj)
 {
     return(p.SEARCH_BYNAMA(obj));
 }
コード例 #17
0
 public DataTable CARI_BYNAMA(RMS.COMMON.MASTER.RMS_PRICELIST obj)
 {
     return(p.CARI_BYNAME(obj));
 }