Exemplo n.º 1
0
        protected void getListItem()
        {
            if (this.ddl_accountNo_listItem == null)
            {
                this.ddl_accountNo_listItem = new List <ListItem>();
                this.ddl_accountNo_listItem.Add(new ListItem()
                {
                    Text = "- 請輸入會科代碼或名稱 -", Value = ""
                });
                List <AccountItemViewModel.XXX_EP_ACC_COMB_V> accCombVList = this.accountItemSvc.getAccCombVList();
                foreach (var c in accCombVList)
                {
                    this.ddl_accountNo_listItem.Add(new ListItem()
                    {
                        Text = c.ACC_COMB_2_NAME + " - (" + c.ACC_COMB_2 + ")", Value = c.ACC_COMB_2
                    });
                }
            }

            if (this.ddl_cashApply_listItem == null)
            {
                this.ddl_cashApply_listItem = new List <ListItem>();
                this.ddl_cashApply_listItem.Add(new ListItem()
                {
                    Text = "- 請選擇 -", Value = ""
                });
                AccountItemViewModel.CashApplyTypeListResult cashApplyListRet = this.accountItemSvc.getCashApplyTypeList();

                if (!cashApplyListRet.list.Exists(x => x.key == "tempPayment_writeOff"))
                {
                    cashApplyListRet.list.Add(new AccountItemViewModel.CashApplyType()
                    {
                        key = "tempPayment_writeOff", name = "暫支款沖銷"
                    });
                }


                foreach (var c in cashApplyListRet.list)
                {
                    this.ddl_cashApply_listItem.Add(new ListItem()
                    {
                        Text = c.name, Value = c.key
                    });
                }
            }
        }
Exemplo n.º 2
0
        protected void init()
        {
            this.mv_paymentItemSetting.SetActiveView(this.vw_paymentItemSetting_list);

            this.clearForm();

            /* init cash apply type */
            AccountItemViewModel.CashApplyTypeListResult cashApplyListRet = this.accountItemSvc.getCashApplyTypeList();

            if (!cashApplyListRet.list.Exists(x => x.key == "tempPayment_writeOff"))
            {
                cashApplyListRet.list.Add(new AccountItemViewModel.CashApplyType()
                {
                    key = "tempPayment_writeOff", name = "暫支款沖銷"
                });
            }



            if (cashApplyListRet.success)
            {
                List <ListItem> cashApplyOptions = new List <ListItem>();
                cashApplyOptions.Add(new ListItem()
                {
                    Text = "- 請選擇 -", Value = ""
                });
                foreach (var c in cashApplyListRet.list)
                {
                    cashApplyOptions.Add(new ListItem()
                    {
                        Text = c.name, Value = c.key
                    });
                }

                this.ddl_paymentItemSetting_type.DataSource = cashApplyOptions;
                this.ddl_paymentItemSetting_type.DataBind();

                this.ddl_paymentItemSetting_filter_cashApply.DataSource = cashApplyOptions;
                this.ddl_paymentItemSetting_filter_cashApply.DataBind();
            }



            /* account item */

            List <ListItem> accCombVListOptions = new List <ListItem>();

            accCombVListOptions.Add(new ListItem()
            {
                Text = "- 請輸入會科代碼或名稱 -", Value = ""
            });

            List <AccountItemViewModel.XXX_EP_ACC_COMB_V> accCombVList = this.accountItemSvc.getAccCombVList();

            foreach (var c in accCombVList)
            {
                accCombVListOptions.Add(new ListItem()
                {
                    Text = c.ACC_COMB_2_NAME + " - (" + c.ACC_COMB_2 + ")", Value = c.ACC_COMB_2
                });
            }

            this.ddl_paymentItemSetting_accountItem.DataSource = accCombVListOptions;
            this.ddl_paymentItemSetting_accountItem.DataBind();

            this.reloadAccountList();
        }
Exemplo n.º 3
0
        protected void edit_init()
        {
            this.mv_paymentItemSetting.SetActiveView(this.vw_paymentItemSetting_edit);

            string id = Request.QueryString["id"] as string;

            if (string.IsNullOrEmpty(id))
            {
                Response.Redirect("PaymentItemSetting.aspx");
                return;
            }

            long id_long = 0;

            if (!long.TryParse(id, out id_long))
            {
                Response.Redirect("PaymentItemSetting.aspx");
                return;
            }

            AccountItemViewModel.AccountItemTaxRateSettingResult acc_ret = this.accountItemSvc.getAccountItemTaxRateSetting(id_long);

            if (!acc_ret.success)
            {
                this.lt_paymentItemSetting_msg.Text = UtilitySvc.alertMsg(acc_ret.resultException.ToString());
                return;
            }


            AccountItemViewModel.CashApplyTypeListResult cashApplyListRet = this.accountItemSvc.getCashApplyTypeList();

            if (!cashApplyListRet.list.Exists(x => x.key == "tempPayment_writeOff"))
            {
                cashApplyListRet.list.Add(new AccountItemViewModel.CashApplyType()
                {
                    key = "tempPayment_writeOff", name = "暫支款沖銷"
                });
            }

            List <ListItem> cashApplyOptions = new List <ListItem>();

            cashApplyOptions.Add(new ListItem()
            {
                Text = "- 請選擇 -", Value = ""
            });
            foreach (var c in cashApplyListRet.list)
            {
                cashApplyOptions.Add(new ListItem()
                {
                    Text = c.name, Value = c.key
                });
            }

            this.ddl_paymentItemSetting_form_applyTypeKey.DataSource = cashApplyOptions;
            this.ddl_paymentItemSetting_form_applyTypeKey.DataBind();

            this.ddl_paymentItemSetting_form_applyTypeKey.SelectedValue = acc_ret.acc.applyTypeKey;

            this.txt_paymentItemSetting_form_itemName.Text = acc_ret.acc.accountName;



            List <ListItem> accCombVListOptions = new List <ListItem>();

            accCombVListOptions.Add(new ListItem()
            {
                Text = "- 請輸入會科代碼或名稱 -", Value = ""
            });

            List <AccountItemViewModel.XXX_EP_ACC_COMB_V> accCombVList = this.accountItemSvc.getAccCombVList();

            foreach (var c in accCombVList)
            {
                accCombVListOptions.Add(new ListItem()
                {
                    Text = c.ACC_COMB_2_NAME + " - (" + c.ACC_COMB_2 + ")", Value = c.ACC_COMB_2
                });
            }


            this.ddl_paymentItemSetting_form_accountNo.DataSource = accCombVListOptions;
            this.ddl_paymentItemSetting_form_accountNo.DataBind();
            this.ddl_paymentItemSetting_form_accountNo.SelectedValue   = acc_ret.acc.accountNo;
            this.txt_paymentItemSetting_form_itemName.Text             = acc_ret.acc.itemName;
            this.txt_paymentItemSetting_form_taxRate.Text              = acc_ret.acc.taxRate.ToString();
            this.txt_paymentItemSetting_form_foreignIncomeTaxRate.Text = acc_ret.acc.foreignIncomeTaxRate.ToString();
            this.txt_paymentItemSetting_form_localIncomeTaxRate.Text   = acc_ret.acc.localIncomeTaxRate.ToString();
            this.txt_paymentItemSetting_form_secondNHITaxRate.Text     = acc_ret.acc.secondNHITaxRate.ToString();
            this.txt_paymentItemSetting_form_code.Text = acc_ret.acc.code;
            this.chk_paymentItemSetting_form_needCountersign.Checked = acc_ret.acc.needCountersign;
            this.txt_paymentItemSetting_form_memo.Text = acc_ret.acc.memo;

            return;
        }
Exemplo n.º 4
0
 public AccountItemViewModel.CashApplyTypeListResult getCashApplyTypeList()
 {
     AccountItemViewModel.CashApplyTypeListResult ret = this.accountItemSvc.getCashApplyTypeList();
     return(ret);
 }