protected void btnSave_OnClick(object sender, EventArgs e)
        {
            try
            {
                Model.costconfig model = new Model.costconfig();
                model.loan_fee_rate           = Utils.StrToDecimal(txt_loan_fee_rate.Text.Trim(), 0) / 100;
                model.loan_fee_rate_bank      = Utils.StrToDecimal(txt_loan_fee_rate_bank.Text.Trim(), 0) / 100;
                model.bond_fee_rate           = Utils.StrToDecimal(txt_bond_fee_rate.Text.Trim(), 0) / 100;
                model.bond_fee_rate_bank      = Utils.StrToDecimal(txt_bond_fee_rate_bank.Text.Trim(), 0) / 100;
                model.earlier_pay             = Utils.StrToDecimal(txt_earlier_pay.Text.Trim(), 0) / 100;
                model.overtime_pay            = Utils.StrToDecimal(txt_overtime_pay.Text.Trim(), 0) / 100;
                model.overtime_cost           = Utils.StrToDecimal(txt_overtime_cost.Text.Trim(), 0) / 1000;
                model.overtime_cost2          = Utils.StrToDecimal(txt_overtime_cost2.Text.Trim(), 0) / 1000;
                model.overtime_cost_bank      = Utils.StrToDecimal(txt_overtime_cost_bank.Text.Trim(), 0) / 1000;
                model.recharge_lowest         = Utils.StrToDecimal(txt_recharge_lowest.Text.Trim(), 0);
                model.withdraw                = Utils.StrToDecimal(txt_withdraw.Text.Trim(), 0);
                model.static_withdraw         = Utils.StrToDecimal(txt_static_withdraw.Text.Trim(), 0) / 100;
                model.recharge_fee_rate       = Utils.StrToDecimal(txt_recharge_fee_rate.Text.Trim(), 0) / 1000;
                model.recharge_fee_rate_quick = Utils.StrToDecimal(txt_recharge_fee_rate_quick.Text.Trim(), 0) / 1000;

                new BLL.cost_config().saveConifg(model);
                AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改费用配置信息"); //记录日志
                JscriptMsg("修改费用配置成功!", "cost_config.aspx", "Success");
                ConfigLoader.CleanCache();
            }
            catch
            {
                JscriptMsg("文件写入失败,请检查是否有权限!", "", "Error");
            }
        }
Example #2
0
 /// <summary>
 /// 写入站点配置文件
 /// </summary>
 public Model.costconfig saveConifg(Model.costconfig model, string configFilePath)
 {
     lock (lockHelper)
     {
         SerializationHelper.Save(model, configFilePath);
     }
     return(model);
 }
Example #3
0
 /// <summary>
 ///  读取用户配置文件
 /// </summary>
 public Model.costconfig loadConfig()
 {
     Model.costconfig model = CacheHelper.Get <Model.costconfig>(DTKeys.CACHE_COST_CONFIG);
     if (model == null)
     {
         CacheHelper.Insert(DTKeys.CACHE_COST_CONFIG, dal.loadConfig(Utils.GetXmlMapPath(DTKeys.FILE_COST_XML_CONFING)),
                            Utils.GetXmlMapPath(DTKeys.FILE_COST_XML_CONFING));
         model = CacheHelper.Get <Model.costconfig>(DTKeys.CACHE_COST_CONFIG);
     }
     return(model);
 }
Example #4
0
 public ManagePage()
 {
     this.Load += new EventHandler(ManagePage_Load);
     siteConfig = new BLL.siteconfig().loadConfig();
     Costconfig = new BLL.cost_config().loadConfig();
 }
Example #5
0
 /// <summary>
 ///  保存用户配置文件
 /// </summary>
 public Model.costconfig saveConifg(Model.costconfig model)
 {
     return(dal.saveConifg(model, Utils.GetXmlMapPath(DTKeys.FILE_COST_XML_CONFING)));
 }