Exemplo n.º 1
0
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     this.ChkAdminLevel(nameof(order_config), DTEnums.ActionEnum.Edit.ToString());
     Rain.BLL.orderconfig   orderconfig = new Rain.BLL.orderconfig();
     Rain.Model.orderconfig model       = orderconfig.loadConfig();
     try
     {
         model.anonymous         = !this.anonymous.Checked ? 0 : 1;
         model.taxtype           = Utils.StrToInt(this.taxtype.SelectedValue, 1);
         model.taxamount         = Utils.StrToDecimal(this.taxamount.Text.Trim(), new Decimal(0));
         model.confirmmsg        = Utils.StrToInt(this.confirmmsg.SelectedValue, 0);
         model.confirmcallindex  = this.confirmcallindex.Text;
         model.expressmsg        = Utils.StrToInt(this.expressmsg.SelectedValue, 0);
         model.expresscallindex  = this.expresscallindex.Text;
         model.completemsg       = Utils.StrToInt(this.completemsg.SelectedValue, 0);
         model.completecallindex = this.completecallindex.Text;
         orderconfig.saveConifg(model);
         this.AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改订单配置信息");
         this.JscriptMsg("修改订单配置成功!", "order_config.aspx");
     }
     catch
     {
         this.JscriptMsg("文件写入失败,请检查是否有权限!", string.Empty);
     }
 }
Exemplo n.º 2
0
        private void ShowInfo()
        {
            Rain.Model.orderconfig orderconfig = new Rain.BLL.orderconfig().loadConfig();
            this.anonymous.Checked = orderconfig.anonymous == 1;
            RadioButtonList taxtype = this.taxtype;
            int             num     = orderconfig.taxtype;
            string          str1    = num.ToString();

            taxtype.SelectedValue = str1;
            this.taxamount.Text   = orderconfig.taxamount.ToString();
            RadioButtonList confirmmsg = this.confirmmsg;

            num = orderconfig.confirmmsg;
            string str2 = num.ToString();

            confirmmsg.SelectedValue   = str2;
            this.confirmcallindex.Text = orderconfig.confirmcallindex;
            RadioButtonList expressmsg = this.expressmsg;

            num = orderconfig.expressmsg;
            string str3 = num.ToString();

            expressmsg.SelectedValue   = str3;
            this.expresscallindex.Text = orderconfig.expresscallindex;
            RadioButtonList completemsg = this.completemsg;

            num = orderconfig.completemsg;
            string str4 = num.ToString();

            completemsg.SelectedValue   = str4;
            this.completecallindex.Text = orderconfig.completecallindex;
        }
Exemplo n.º 3
0
        protected Decimal get_order_taxamount(Decimal total_amount)
        {
            Rain.Model.orderconfig orderconfig = new Rain.BLL.orderconfig().loadConfig();
            Decimal num = orderconfig.taxamount;

            if (orderconfig.taxtype == 1)
            {
                num = num * total_amount / new Decimal(100);
            }
            return(num);
        }