//保存 protected void btnSubmit_Click(object sender, EventArgs e) { ChkAdminLevel("order_config", DTEnums.ActionEnum.Edit.ToString()); //检查权限 BLL.orderconfig bll = new BLL.orderconfig(); Model.orderconfig model = bll.loadConfig(); try { if (anonymous.Checked == true) { model.anonymous = 1; } else { model.anonymous = 0; } model.taxtype = Utils.StrToInt(taxtype.SelectedValue, 1); model.taxamount = Utils.StrToDecimal(taxamount.Text.Trim(), 0); model.confirmmsg = Utils.StrToInt(confirmmsg.SelectedValue, 0); model.confirmcallindex = confirmcallindex.Text; model.expressmsg = Utils.StrToInt(expressmsg.SelectedValue, 0); model.expresscallindex = expresscallindex.Text; model.completemsg = Utils.StrToInt(completemsg.SelectedValue, 0); model.completecallindex = completecallindex.Text; bll.saveConifg(model); AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改订单配置信息"); //记录日志 JscriptMsg("修改订单配置成功!", "order_config.aspx"); } catch { JscriptMsg("文件写入失败,请检查是否有权限!", string.Empty); } }
//儲存 protected void btnSubmit_Click(object sender, EventArgs e) { ChkAdminLevelEdit("sys_quan", "Edit"); //ChkAdminLevel("order_config", TWEnums.ActionEnum.Edit.ToString()); //檢查許可權 BLL.orderconfig bll = new BLL.orderconfig(); Model.orderconfig model = bll.loadConfig(); try { model.maned = Utils.StrToInt(maned.Text, 0); model.zhekou = Utils.StrToInt(zhekou.Text, 0); model.quanguan = Utils.StrToDecimal(quanguan.Text.Trim(), 0); model.yunfei = Utils.StrToInt(yunfei.Text, 0); model.yunmian = Utils.StrToInt(yunmian.Text, 0); model.mebegin = Utils.StrToDateTime(mebegin.Text); model.meend = Utils.StrToDateTime(meend.Text); model.metype = Utils.StrToInt(metype.SelectedValue, 0); model.zkjin = Utils.StrToInt(zkjin.Text, 0); model.qgbegin = Utils.StrToDateTime(qgbegin.Text); model.qgend = Utils.StrToDateTime(qgend.Text); model.qgtype = Utils.StrToInt(qgtype.SelectedValue, 0); model.quanguanjin = Utils.StrToInt(quanguanjin.Text, 0); bll.saveConifg(model); AddAdminLog(TWEnums.ActionEnum.Edit.ToString(), "修改折扣設定資料"); //記錄日誌 JscriptMsg("修改折扣設定成功!", "order_config.aspx"); } catch { JscriptMsg("檔寫入失敗,請檢查是否有許可權!", string.Empty); } }
private void ShowInfo() { BLL.orderconfig bll = new BLL.orderconfig(); Model.orderconfig model = bll.loadConfig(); if (model.anonymous == 1) { anonymous.Checked = true; } else { anonymous.Checked = false; } taxtype.SelectedValue = model.taxtype.ToString(); taxamount.Text = model.taxamount.ToString(); confirmmsg.SelectedValue = model.confirmmsg.ToString(); confirmcallindex.Text = model.confirmcallindex; expressmsg.SelectedValue = model.expressmsg.ToString(); expresscallindex.Text = model.expresscallindex; completemsg.SelectedValue = model.completemsg.ToString(); completecallindex.Text = model.completecallindex; kuaidiapi.Text = model.kuaidiapi; kuaidikey.Text = model.kuaidikey; kuaidishow.SelectedValue = model.kuaidishow.ToString(); kuaidimuti.SelectedValue = model.kuaidimuti.ToString(); kuaidiorder.SelectedValue = model.kuaidiorder; }
/// <summary> /// 写入站点配置文件 /// </summary> public Model.orderconfig saveConifg(Model.orderconfig model, string configFilePath) { lock (lockHelper) { SerializationHelper.Save(model, configFilePath); } return(model); }
/// <summary> /// 读取用户配置文件 /// </summary> public Model.orderconfig loadConfig() { Model.orderconfig model = CacheHelper.Get <Model.orderconfig>(PLKeys.CACHE_ORDER_CONFIG); if (model == null) { CacheHelper.Insert(PLKeys.CACHE_ORDER_CONFIG, dal.loadConfig(Utils.GetXmlMapPath(PLKeys.FILE_ORDER_XML_CONFING)), Utils.GetXmlMapPath(PLKeys.FILE_ORDER_XML_CONFING)); model = CacheHelper.Get <Model.orderconfig>(PLKeys.CACHE_ORDER_CONFIG); } return(model); }
/// <summary> /// 读取用户配置文件 /// </summary> public Model.orderconfig loadConfig() { Model.orderconfig model = _Cache.Get <Model.orderconfig>(Vincent._DTcms.DTKeys.CACHE_ORDER_CONFIG); if (model == null) { _Cache.Insert(Vincent._DTcms.DTKeys.CACHE_ORDER_CONFIG, dal.loadConfig(Vincent._DTcms.Utils.GetXmlMapPath(Vincent._DTcms.DTKeys.FILE_ORDER_XML_CONFING)), Vincent._DTcms.Utils.GetXmlMapPath(Vincent._DTcms.DTKeys.FILE_ORDER_XML_CONFING)); model = _Cache.Get <Model.orderconfig>(Vincent._DTcms.DTKeys.CACHE_ORDER_CONFIG); } return(model); }
private void ShowInfo() { BLL.orderconfig bll = new BLL.orderconfig(); Model.orderconfig model = bll.loadConfig(); if (model.anonymous == 1) { anonymous.Checked = true; } else { anonymous.Checked = false; } confirmmsg.SelectedValue = model.confirmmsg.ToString(); confirmcallindex.Text = model.confirmcallindex; expressmsg.SelectedValue = model.expressmsg.ToString(); expresscallindex.Text = model.expresscallindex; completemsg.SelectedValue = model.completemsg.ToString(); completecallindex.Text = model.completecallindex; }
private void ShowInfo() { BLL.orderconfig bll = new BLL.orderconfig(); Model.orderconfig model = bll.loadConfig(); maned.Text = model.maned.ToString(); zhekou.Text = model.zhekou.ToString(); quanguan.Text = model.quanguan.ToString(); yunfei.Text = model.yunfei.ToString(); yunmian.Text = model.yunmian.ToString(); mebegin.Text = model.mebegin.GetValueOrDefault().ToString("yyyy-MM-dd"); meend.Text = model.meend.GetValueOrDefault().ToString("yyyy-MM-dd"); metype.SelectedValue = model.metype.ToString(); zkjin.Text = model.zkjin.ToString(); qgbegin.Text = model.qgbegin.GetValueOrDefault().ToString("yyyy-MM-dd"); qgend.Text = model.qgend.GetValueOrDefault().ToString("yyyy-MM-dd"); qgtype.SelectedValue = model.qgtype.ToString(); quanguanjin.Text = model.quanguanjin.ToString(); }
//保存 protected void btnSubmit_Click(object sender, EventArgs e) { ChkAdminLevel("order_config", DTEnums.ActionEnum.Edit.ToString()); //检查权限 BLL.orderconfig bll = new BLL.orderconfig(); Model.orderconfig model = bll.loadConfig(); try { if (anonymous.Checked == true) { model.anonymous = 1; } else { model.anonymous = 0; } model.confirmmsg = Utils.StrToInt(confirmmsg.SelectedValue, 0); model.confirmcallindex = confirmcallindex.Text; model.expressmsg = Utils.StrToInt(expressmsg.SelectedValue, 0); model.expresscallindex = expresscallindex.Text; model.completemsg = Utils.StrToInt(completemsg.SelectedValue, 0); model.completecallindex = completecallindex.Text; model.kuaidiapi = kuaidiapi.Text; model.kuaidikey = kuaidikey.Text; model.kuaidishow = Utils.StrToInt(kuaidishow.SelectedValue, 3); model.kuaidimuti = Utils.StrToInt(kuaidimuti.SelectedValue, 1); model.kuaidiorder = kuaidiorder.SelectedValue; bll.saveConifg(model); AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改订单配置信息"); //记录日志 JscriptMsg("修改订单配置成功!", "order_config.aspx", "Success"); } catch { JscriptMsg("文件写入失败,请检查是否有权限!", "", "Error"); } }
/// <summary> /// 保存用户配置文件 /// </summary> public Model.orderconfig saveConifg(Model.orderconfig model) { return(dal.saveConifg(model, Utils.GetXmlMapPath(PLKeys.FILE_ORDER_XML_CONFING))); }
/// <summary> /// 保存用户配置文件 /// </summary> public Model.orderconfig saveConifg(Model.orderconfig model) { return(dal.saveConifg(model, Vincent._DTcms.Utils.GetXmlMapPath(Vincent._DTcms.DTKeys.FILE_ORDER_XML_CONFING))); }