private void setErf()
 {
     jim = xC.manDB.jimDB.selectByPk1(jobId);
     erf.expenses_refund_id     = txtId.Text;
     erf.expense_clear_cash_id  = "";
     erf.expenses_pay_detail_id = pdid;
     erf.job_id               = jim.job_import_id;
     erf.desc1                = txtDesc.Text;
     erf.amount               = txtRefund.Text.Replace("$", "").Replace(",", "");
     erf.active               = "1";
     erf.remark               = txtRemark.Text;
     erf.date_create          = "";
     erf.date_modi            = "";
     erf.date_cancel          = "";
     erf.user_create          = "";
     erf.user_modi            = "";
     erf.user_cancel          = "";
     erf.status_page          = "1";
     erf.status_appv          = "0";
     erf.status_doc           = "0";
     erf.ecc_doc              = erfId;
     erf.job_code             = jim.job_import_code;
     erf.pay_staff_id         = cboStaff.SelectedItem != null ? ((ComboBoxItem)(cboStaff.SelectedItem)).Value : "";
     erf.expenses_refund_date = xC.datetoDB(txtErfDate.Text);
 }
Exemplo n.º 2
0
        private void initConfig()
        {
            fEdit  = new Font(xC.iniC.grdViewFontName, xC.grdViewFontSize, FontStyle.Regular);
            fEditB = new Font(xC.iniC.grdViewFontName, xC.grdViewFontSize, FontStyle.Bold);

            C1ThemeController.ApplicationTheme = xC.iniC.themeApplication;
            theme1.Theme = C1ThemeController.ApplicationTheme;
            theme1.SetTheme(sB, "BeigeOne");

            sB1.Text = "";
            cop      = new Company();
            cop      = xC.xtDB.copDB.selectByCode1("001");
            //bll = new Billing();
            cus = new Customer();
            jim = new JobImport();
            bll = new Billing();
            stt = new C1SuperTooltip();
            sep = new C1SuperErrorProvider();

            txtCusNameT.KeyUp += TxtCusNameT_KeyUp;

            initGrfJob();
            initGrfBill();
            initGrfBillD();
        }
Exemplo n.º 3
0
        private void initConfig()
        {
            fEdit  = new Font(xC.iniC.grdViewFontName, xC.grdViewFontSize, FontStyle.Regular);
            fEditB = new Font(xC.iniC.grdViewFontName, xC.grdViewFontSize, FontStyle.Bold);

            C1ThemeController.ApplicationTheme = xC.iniC.themeApplication;
            theme1.Theme = C1ThemeController.ApplicationTheme;
            theme1.SetTheme(sB, "BeigeOne");

            DateTime pytDate = DateTime.Now;

            txtPytDate.Value = pytDate.Year.ToString() + "-" + pytDate.ToString("MM-dd");

            btnSave.Click += BtnSave_Click;

            sB1.Text = "";
            cop      = new Company();
            cop      = xC.xtDB.copDB.selectByCode1("001");
            //bll = new Billing();
            cus = new Customer();
            jim = new JobImport();
            bll = new Billing();
            pyt = new Payment();
            stt = new C1SuperTooltip();
            sep = new C1SuperErrorProvider();

            txtCusNameT.KeyUp += TxtCusNameT_KeyUp;

            initGrfJob();
            initGrfBill();
            initGrfBillD();
            initGrfPay();
        }
Exemplo n.º 4
0
        private void initConfig()
        {
            jim    = new JobImport();
            expnpd = new ExpensesPayDetail();
            ecc    = new ExpensesClearCash();
            erf    = new ExpensesRefund();
            xC.xtDB.stfDB.setCboStaff(cboStaff, userId);
            xC.setCboYear(cboYear);
            jim = xC.manDB.jimDB.selectByPk1(jobId);
            ecc = xC.accDB.eccDB.selectByPk1(eccDoc);
            txtJobCode.Value = jim.job_import_code;

            DateTime erfDate = DateTime.Now;

            txtErfDate.Value = erfDate.Year.ToString() + "-" + erfDate.ToString("MM-dd");

            btnSave.Click += BtnSave_Click;

            initGrfErf();
            setGrfErf();
            setControlEcc(eccDoc);
            if (!eccDoc.Equals(""))
            {
                grfErf.Enabled = false;
            }
        }
Exemplo n.º 5
0
        private void initConfig()
        {
            fEdit  = new Font(xC.iniC.grdViewFontName, xC.grdViewFontSize, FontStyle.Regular);
            fEditB = new Font(xC.iniC.grdViewFontName, xC.grdViewFontSize, FontStyle.Bold);

            C1ThemeController.ApplicationTheme = xC.iniC.themeApplication;
            theme1.Theme = C1ThemeController.ApplicationTheme;
            theme1.SetTheme(sB, "BeigeOne");

            txtJobCode.KeyUp       += TxtJobCode_KeyUp;
            btnTaxSave.Click       += BtnTaxSave_Click;
            txtNum.ValueChanged    += TxtNum_ValueChanged;
            txtPayerTaxNameT.KeyUp += TxtPayerTaxNameT_KeyUp;


            tax = new Tax();
            jim = new JobImport();
            DateTime jobDate = DateTime.Now;

            txtPayerTaxDate.Value = jobDate.Year.ToString() + "-" + jobDate.ToString("MM-dd");
            txtTaxDate.Value      = jobDate.Year.ToString() + "-" + jobDate.ToString("MM-dd");
            sB1.Text     = "";
            txtNum.Value = 1;

            initGrfTax();
            initGrfTaxJob();
            setGrfTax("");
        }
Exemplo n.º 6
0
        private void initConfig()
        {
            jim   = new JobImport();
            expnD = new ExpensesDraw();
            xC.xtDB.stfDB.setCboStaff(cboStaff, "");
            initGrfExpnD();

            txtJobCode.KeyUp += TxtJobCode_KeyUp;
        }
Exemplo n.º 7
0
 private void TxtJobCode_KeyUp(object sender, KeyEventArgs e)
 {
     //throw new NotImplementedException();
     if (e.KeyCode == Keys.Enter)
     {
         txtJobCode.Text = txtJobCode.Text.Replace(xC.FixJobCode, "");
         jim             = xC.manDB.jimDB.selectByJobCode(txtJobCode.Text);
         txtID.Value     = jim.job_import_id;
         setGrfExpnD(txtID.Text);
     }
 }
Exemplo n.º 8
0
        private void GrfJob_DoubleClick(object sender, EventArgs e)
        {
            //throw new NotImplementedException();
            cus            = xC.sCus;
            jim            = new JobImport();
            jim            = xC.manDB.jimDB.selectByPk1(grfJob[grfJob.Row, colID].ToString());
            txtJobId.Value = jim.job_import_id;
            //txtCusNameT.Value = cus.cust_name_t;
            txtJobCode.Value = jim.job_import_code;

            setGrfBillView(jim.job_import_id);
        }
Exemplo n.º 9
0
 private void TxtJobCode_KeyUp(object sender, KeyEventArgs e)
 {
     //throw new NotImplementedException();
     if (e.KeyCode == Keys.Enter)
     {
         txtJobCode.Text  = txtJobCode.Text.Replace(xC.FixJobCode, "");
         jim              = xC.manDB.jimDB.selectByJobCode(txtJobCode.Text);
         txtJobCode.Value = xC.FixJobCode + jim.job_import_code;
         txtJobId.Value   = jim.job_import_id;
         txtJobAmt.Value  = xC.accDB.expnpdDB.selectSumPayAmtByJobIdStfIdNoClear(txtJobId.Text, cboStaff.SelectedItem != null ? ((ComboBoxItem)(cboStaff.SelectedItem)).Value : "");
         setGrfExpnPd(txtJobId.Text, cboStaff.SelectedItem != null ? ((ComboBoxItem)(cboStaff.SelectedItem)).Value : "");
     }
 }
Exemplo n.º 10
0
        private void initConfig()
        {
            jim = new JobImport();
            ecc = new ExpensesClearCash();
            xC.setCboYear(cboYear);
            chkAppvWait.Checked = true;

            initGrfEcc();
            initGrfEccD();
            initGrPd();
            initGrDd();
            initGrfRefund();
            setGrfEcc();
        }
Exemplo n.º 11
0
        private void setControl(String id)
        {
            Items itm = new Items();

            expnpd = new ExpensesPayDetail();
            ecc    = new ExpensesClearCash();
            JobImport jim = new JobImport();

            ecc    = xC.accDB.eccDB.selectByPk1(id);
            expnpd = xC.accDB.expnpdDB.selectByPk1(pdid);
            if (ecc.expense_clear_cash_id.Equals(""))
            {
                jim = xC.manDB.jimDB.selectByJobCode(jobcode);
            }
            txtItmNamePd.Value = itmPd;
            txtId.Value        = ecc.expense_clear_cash_id;
            txtJobId.Value     = ecc.job_id.Equals("") ? jim.job_import_id : ecc.job_id;
            txtJobCode.Value   = ecc.job_code.Equals("") ? jobcode : ecc.job_code;
            txtPdId.Value      = ecc.expenses_pay_detail_id.Equals("") ? pdid : ecc.expenses_pay_detail_id;
            txtStfId.Value     = ecc.staff_id.Equals("") ? xC.userId : ecc.staff_id;
            txtddId.Value      = ecc.expenses_draw_detail_id.Equals("") ? expnpd.expenses_draw_detail_id : ecc.expenses_draw_detail_id;
            //txtdid.Value = ecc.expenses_draw_id.Equals("") ? jim.job_import_id : ecc.expenses_draw_id;
            int row = 0, chk = 0;

            if (int.TryParse(rowno, out chk))
            {
                txtRow.Value = chk;
            }
            else
            {
                txtRow.Value = ecc.row1;
            }
            //chk++;

            txtReceiptNo.Value   = ecc.receipt_no;
            txtReceiptDate.Value = ecc.receipt_date;
            txtItmId.Value       = ecc.item_id;
            txtItmCode.Value     = ecc.item_code;
            txtItmNameT.Value    = ecc.item_name_t;

            txtPayAmt.Value      = ecc.pay_amount;
            txtPayCusId.Value    = ecc.pay_to_cus_id;
            txtPayCusNameT.Value = ecc.pay_to_cus_name_t;

            //txtItmCode.Value = ecc.item_code;

            setImages(txtId.Text);
        }
Exemplo n.º 12
0
        private void initConfig()
        {
            fEdit  = new Font(xC.iniC.grdViewFontName, xC.grdViewFontSize, FontStyle.Regular);
            fEditB = new Font(xC.iniC.grdViewFontName, xC.grdViewFontSize, FontStyle.Bold);

            C1ThemeController.ApplicationTheme = xC.iniC.themeApplication;
            theme1.Theme = C1ThemeController.ApplicationTheme;
            theme1.SetTheme(sB, "BeigeOne");
            theme1.SetTheme(tC1, "Office2010Green");

            //btnNew.Click += BtnNew_Click;
            txtCusNameT1.KeyUp += TxtCusNameT1_KeyUp;
            btnCashOk.Click    += BtnCashOk_Click;
            btnBNew.Click      += BtnBNew_Click;
            btnBSave.Click     += BtnBSave_Click;
            btnPrnRcp.Click    += BtnPrnRcp_Click;
            btnPrnCover.Click  += BtnPrnCover_Click;

            DateTime billDate = DateTime.Now;

            txtBillDate.Value = billDate.Year.ToString() + "-" + billDate.ToString("MM-dd");

            sB1.Text       = "";
            cop            = new Company();
            cop            = xC.xtDB.copDB.selectByCode1("001");
            bll            = new Billing();
            cus            = new Customer();
            jim            = new JobImport();
            bllC           = new BillingCover();
            stt            = new C1SuperTooltip();
            sep            = new C1SuperErrorProvider();
            txtBIvat.Value = cop.vat;
            txtBEvat.Value = cop.vat;
            txtEvat.Value  = cop.vat;

            //stt.BackgroundGradient = C1.Win.C1SuperTooltip.BackgroundGradient.Gold;

            //chkAll.Checked = true;
            //xC.setCboYear(cboYear);
            initGrfJob();
            initGrfDrawView();
            initGrfBill();
            initGrfCover();
            tC1.SelectedTab = tabMake;
            tC2.SelectedTab = tabDraw;
            //setGrfDeptH();
        }
Exemplo n.º 13
0
 private void TxtJobCode_KeyUp(object sender, KeyEventArgs e)
 {
     //throw new NotImplementedException();
     if (e.KeyCode == Keys.Enter)
     {
         JobImport jim = xC.manDB.jimDB.selectByJobCode(txtJobCode.Text.Replace(xC.FixJobCode, ""));
         if (!jim.job_import_id.Equals(""))
         {
             jobId = jim.job_import_id;
             imp   = xC.iniDB.cusDB.selectByPk1(jim.imp_id);
             setKeyUpF2Imp1(imp);
             txtJobCode.Value = "IMP" + jim.job_import_code;
             setGrfDeptH1();
             txtAmtOnhandJob.Value = xC.accDB.expnddDB.selectPayAmountByStf(xC.userId, jim.job_import_id);
         }
     }
 }
Exemplo n.º 14
0
 private void BtnSave_Click(object sender, EventArgs e)
 {
     //throw new NotImplementedException();
     if (MessageBox.Show("ต้องการ บันทึกช้อมูล ", "", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2) == DialogResult.OK)
     {
         setExpensesDraw();
         String re  = xC.accDB.expndDB.insertExpenseDraw(expnD, xC.user.staff_id);
         int    chk = 0;
         if (int.TryParse(re, out chk))
         {
             JobImport jim = new JobImport();
             jim = xC.manDB.jimDB.selectByPk1(jobId);
             if (flagNew.Equals("new"))
             {
                 setExpensesDrawDetail(re, jim.cust_id);
             }
             else
             {
                 setExpensesDrawDetail(txtID.Text, jim.cust_id);
             }
             txtID.Value = re;
             if (flagaction == flagAction.autoappv)
             {
                 re = "";
                 re = xC.updateDrawSendToApprove(txtID.Text);
                 if (int.TryParse(re, out chk))
                 {
                     re = "";
                     re = xC.accDB.expndDB.updateStatusApprove(txtID.Text);
                     if (int.TryParse(re, out chk))
                     {
                         Close();
                     }
                 }
             }
             btnSave.Image = Resources.accept_database24;
         }
         else
         {
             btnSave.Image = Resources.accept_database24;
         }
         setGrfDeptH();
         //setGrdView();
         //this.Dispose();
     }
 }
Exemplo n.º 15
0
        private void initConfig()
        {
            jim = new JobImport();
            //fEdit = grdView.Font;
            fEdit  = new Font(xC.iniC.grdViewFontName, xC.grdViewFontSize, FontStyle.Regular);
            fEditB = new Font(xC.iniC.grdViewFontName, xC.grdViewFontSize, FontStyle.Bold);
            initGrfView();
            C1ThemeController.ApplicationTheme = xC.iniC.themeApplication;
            theme1.Theme = C1ThemeController.ApplicationTheme;
            theme1.SetTheme(panel1, theme1.Theme);

            cboYear.SelectedIndexChanged += CboYear_SelectedIndexChanged;
            //ContextMenu custommenu = new ContextMenu();
            //custommenu.MenuItems.Add("&ยกเลิก", new EventHandler(ContextMenu_void));
            //custommenu.MenuItems.Add("&ยกเลิก";
            //grdView.ContextMenu = custommenu;
        }
        private void initConfig()
        {
            jim = new JobImport();
            ecc = new ExpensesClearCash();
            xC.setCboYear(cboYear);
            xC.xtDB.stfDB.setCboStaff(cboStaff, "");
            chkAppvWait.Checked = true;

            cboStaff.SelectedItemChanged += CboStaff_SelectedItemChanged;
            btnRefund.Click += BtnRefund_Click;
            btnDNew.Click   += BtnDNew_Click;
            btnCal.Click    += BtnCal_Click;
            btnSave.Click   += BtnSave_Click;

            initGrfEcc();
            initGrPd();
        }
        private void initConfig()
        {
            jim    = new JobImport();
            expnpd = new ExpensesPayDetail();
            ecc    = new ExpensesClearCash();
            erf    = new ExpensesRefund();
            xC.xtDB.stfDB.setCboStaff(cboStaff, userId);

            jim = xC.manDB.jimDB.selectByPk1(jobId);
            ecc = xC.accDB.eccDB.selectByPk1(erfId);
            txtJobCode.Value = jim.job_import_code;

            DateTime erfDate = DateTime.Now;

            txtErfDate.Value = erfDate.Year.ToString() + "-" + erfDate.ToString("MM-dd");

            btnSave.Click += BtnSave_Click;
            setControl(erfId);
        }
Exemplo n.º 18
0
        private void initConfig()
        {
            jim    = new JobImport();
            expnpd = new ExpensesPayDetail();
            xC.xtDB.stfDB.setCboStaff(cboStaff, xC.userId);

            initGrfExpnD();
            initGrfEcc();

            txtUserAmt.Value = xC.accDB.expnpdDB.selectSumPayAmtByJobIdStfIdNoClear("", xC.userId);

            btnDNew.Click   += BtnDNew_Click;
            btnDoc.Click    += BtnDoc_Click;
            btnSave.Click   += BtnSave_Click;
            btnRefund.Click += BtnRefund_Click;
            cboStaff.SelectedItemChanged += CboStaff_SelectedItemChanged;
            txtJobCode.KeyUp             += TxtJobCode_KeyUp;

            setGrfExpnPd(txtJobId.Text, cboStaff.SelectedItem != null ? ((ComboBoxItem)(cboStaff.SelectedItem)).Value : "");
        }
Exemplo n.º 19
0
 private void TxtJobCode_KeyUp(object sender, KeyEventArgs e)
 {
     //throw new NotImplementedException();
     if (e.KeyCode == Keys.Enter)
     {
         txtJobCode.Text  = txtJobCode.Text.Replace(xC.FixJobCode, "");
         jim              = xC.manDB.jimDB.selectByJobCode(txtJobCode.Text);
         txtJobId.Value   = jim.job_import_id;
         txtJobCode.Value = xC.FixJobCode + jim.job_import_code;
         Customer cus = new Customer();
         cus = xC.iniDB.cusDB.selectByPk1(jim.cust_id);
         txtCusTaxId.Value    = cus.cust_id;
         txtCusTaxNameT.Value = cus.cust_name_t;
         Company cop = new Company();
         cop = xC.xtDB.copDB.selectByCode1("001");
         txtAgentTaxNameT.Value = cop.comp_name_t;
         txtAgentTaxId.Value    = cop.comp_id;
         setGrfTaxJob(txtJobId.Text);
     }
 }
Exemplo n.º 20
0
        public void setJobImport(String jobNo)
        {
            String    year = DateTime.Now.Year.ToString();
            String    date = DateTime.Now.ToString("yyyy-MM-dd");
            JobImport jim  = new JobImport();

            DataTable     dtJob    = new DataTable();
            DataTable     dtJob4   = new DataTable();
            DataTable     dtJob3   = new DataTable();
            DataTable     dtJobInv = new DataTable();
            CustomerDB    cusDB    = new CustomerDB(conn);
            String        impId    = "";
            JobImportDB   jimDB    = new JobImportDB(conn);
            JobImportBlDB jblDB    = new JobImportBlDB(conn);

            dtJob = selectJobNoImport(jobNo);
            if (dtJob.Rows.Count > 0)
            {
                impId               = cusDB.selectImpIdByCodeLike1(dtJob.Rows[0]["importer"].ToString());
                jim.job_import_id   = "";
                jim.job_import_code = "";
                jim.job_import_date = date;
                jim.cust_id         = "";
                jim.imp_id          = impId;
                jim.transport_mode  = dtJob.Rows[0]["transmode"].ToString().Trim();
                jim.staff_id        = conn.user.staff_id;
                jim.entry_type_id   = "";
                jim.privi_id        = "";
                jim.ref_1           = "";
                jim.ref_2           = "";
                jim.ref_3           = "";
                jim.ref_4           = "";
                jim.ref_5           = "";
                jim.ref_edi         = "";
                jim.imp_entry       = "";
                jim.edi_response    = "";
                jim.tax_method_id   = "";
                jim.check_exam_id   = "";
                jim.inv_date        = "";
                jim.tax_amt         = "";
                jim.insr_date       = "";
                jim.insr_id         = "";
                jim.policy_no       = "";
                jim.premium         = "";
                jim.policy_date     = "";
                jim.policy_clause   = "";
                jim.job_year        = year;
                jim.date_create     = "";
                jim.date_modi       = "";
                jim.date_cancel     = "";
                jim.user_create     = "";
                jim.user_modi       = "";
                jim.user_cancel     = "";
                jim.active          = "1";
                jim.remark3         = "";
                jim.remark1         = "";
                jim.remark2         = "";
                jim.jobno           = dtJob.Rows[0]["jobno"].ToString().Trim();
                jim.job_date        = conn.dateMiotoDB(dtJob.Rows[0]["jobdate"].ToString().Trim());
                jim.imp_date        = conn.dateMiotoDB(dtJob.Rows[0]["imdate"].ToString().Trim());
                jim.bl              = dtJob.Rows[0]["bl"].ToString().Trim();
                String jimId = jimDB.insertJobImport(jim);
                int    chk   = 0;
                if (int.TryParse(jimId, out chk))
                {
                    JobImportBl jbl = new JobImportBl();
                    jbl.job_import_bl_id = "";
                    jbl.job_import_id    = jimId;
                    jbl.forwarder_id     = "";
                    jbl.mbl_mawb         = "";
                    jbl.hbl_hawb         = dtJob.Rows[0]["housebl"].ToString().Trim();
                    jbl.m_vessel         = dtJob.Rows[0]["vslname"].ToString().Trim();
                    jbl.f_vessel         = "";
                    jbl.etd         = "";
                    jbl.eta         = "";
                    jbl.port_imp_id = "";

                    jbl.terminal_id      = "";
                    jbl.marsk            = "";
                    jbl.description      = "";
                    jbl.gw               = dtJob.Rows[0]["grsww"].ToString().Trim();
                    jbl.gw_unit_id       = dtJob.Rows[0]["grswwunit"].ToString().Trim();
                    jbl.packages_total   = dtJob.Rows[0]["nopkg"].ToString().Trim();
                    jbl.unit_package1_id = dtJob.Rows[0]["pkgunit"].ToString().Trim();
                    jbl.total_con20      = "";
                    jbl.total_con40      = "";
                    jbl.volume1          = "";

                    jbl.port_of_loading_id  = "";
                    jbl.date_check_exam     = "";
                    jbl.date_delivery       = "";
                    jbl.date_tofac          = "";
                    jbl.truck_id            = "";
                    jbl.car_number          = "";
                    jbl.tranfer_with_job_id = "";
                    jbl.truck_cop_id        = "";
                    jbl.status_doc_forrow   = "";
                    jbl.doc_forrow          = "";

                    jbl.date_doc_forrow        = "";
                    jbl.status_job_forrow      = "";
                    jbl.job_forrow_description = "";
                    jbl.date_finish_job_forrow = "";
                    jbl.status_oth_job         = "";
                    jbl.delivery_remark        = "";
                    jbl.container_yard         = "";
                    jbl.date_create            = "";
                    jbl.date_modi   = "";
                    jbl.date_cancel = "";

                    jbl.user_create = "";
                    jbl.user_modi   = "";
                    jbl.user_cancel = "";
                    jbl.active      = "1";
                    jbl.remark      = "";
                    jbl.oth_job_no  = "";
                    jbl.fwdCode     = "";
                    jbl.fwdCode     = "";

                    jbl.ugwCode  = "";
                    jbl.ugwNameT = "";
                    jbl.utpCode  = "";
                    jbl.utpNameT = "";
                    jbl.polCode  = "";
                    jbl.polNameT = "";
                    jbl.tmnCode  = "";
                    jbl.tmnNameT = "";
                    jblDB.insertJobImportBl(jbl);
                }
            }
        }