| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using HySoft.Common;
- namespace HySoft.BaseCallCenter.Web.sysmanage
- {
- public partial class configedit : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- if (!IsPostBack) {
- //初始化方法
- if (Request.QueryString["action"].ToString() == "Edit") {
- getSystrmConfig(Request.QueryString["param"].ToString());
- }
-
- }
- }
- /// <summary>
- /// 初始化参数方法
- /// </summary>
- /// <param name="fla"></param>
- private void getSystrmConfig(string fla)
- {
- if (!string.IsNullOrEmpty(fla)) {
- HySoft.BaseCallCenter.Model.T_Sys_SystemConfig systemConfigModel = new BLL.T_Sys_SystemConfig().GetModel(Convert.ToInt32(fla));
- if (systemConfigModel != null) {
- txtSystemCode.Text = systemConfigModel.F_ParamCode;
- txtSystemName.Text = systemConfigModel.F_ParamDes;
- txtSystemValue.Text = systemConfigModel.F_ParamValue;
- txtId.Value = systemConfigModel.F_ParamId.ToString();
- }
- }
- }
- /// <summary>
- /// 保存参数设置的信息
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- protected void btnSubmit_Click(object sender, EventArgs e)
- {
- //try
- //{
- // int res = 0;
- // bool flage = false;
- // HySoft.BaseCallCenter.Model.T_Sys_SystemConfig systemConfigModel = new Model.T_Sys_SystemConfig();
- // HySoft.BaseCallCenter.BLL.T_Sys_SystemConfig systemConfigBll = new BLL.T_Sys_SystemConfig();
- // HySoft.BaseCallCenter.BLL.T_OrderBase orderBaseBll = new BLL.T_OrderBase();
- // if (Request.QueryString["action"] == "Add")
- // {
- // systemConfigModel.F_ParamCode = orderBaseBll.GetNewOrderCode("F_ParamCode", "F_ParamId", "T_Sys_SystemConfig");
- // }
- // else {
- // systemConfigModel.F_ParamCode =new BLL.T_Sys_SystemConfig().GetModel(Convert.ToInt32(Request.QueryString["param"])).F_ParamCode;
- // }
- // if (!string.IsNullOrEmpty(txtSystemName.Text))
- // {
- // systemConfigModel.F_ParamDes = txtSystemName.Text;
- // }
- // else {
- // MessageBoxToWindow("参数名称不为空!", "提示", "catch");
- // }
- // if (!string.IsNullOrEmpty(txtSystemValue.Text))
- // {
- // systemConfigModel.F_ParamValue = txtSystemValue.Text;
- // }
- // else
- // {
- // MessageBoxToWindow("参数值不为空!", "提示", "catch");
- // }
-
- // systemConfigModel.F_State = 0;
- // if (Request.QueryString["action"] == "Add")
- // {
- // res = systemConfigBll.Add(systemConfigModel);
- // if (res > 0)
- // {
- // MessageBoxToWindow("新增成功", "新增提示", "success");
- // }
- // else
- // {
- // MessageBoxToWindow("新增失败", "新增提示!", "error");
- // }
- // }
- // if (Request.QueryString["action"] == "Edit")
- // {
- // systemConfigModel.F_ParamId = Convert.ToInt32(Request.QueryString["param"]);
- // flage = systemConfigBll.Update(systemConfigModel);
- // if (flage)
- // {
- // MessageBoxToWindow("修改成功", "修改提示!", "success");
- // }
- // else
- // {
- // MessageBoxToWindow("修改失败", "修改提示!", "error");
- // }
- // }
- //}
- //catch (Exception ex) {
- // SysLog.WriteLog(ex);
- // MessageBoxToWindow("异常提示!" + ex.Message, "提示", "catch");
- //}
- }
- #region 弹出对话框
- /// <summary>
- /// 弹出对话框
- /// </summary>
- /// <param name="title"></param>
- /// <param name="content"></param>
- /// <param name="type"></param>
- public void MessageBoxToWindow(string title, string content, string type)
- {
- string script = "";
- switch (type)
- {
- case "error"://失败
- type = "error";
- script = "<script type='text/javascript'> $.ligerDialog.alert('" + title + "','" + content + "','" + type + "');</script>";
- break;
- case "success"://成功
- type = "info";
- script = "<script type='text/javascript'> $.ligerDialog.alert('" + title + "','" + content + "','" + type + "',CloseThis);</script>";
- break;
- case "catch"://异常
- type = "warning";
- script = "<script type='text/javascript'> $.ligerDialog.alert('" + title + "','" + content + "','" + type + "');</script>";
- break;
- default:
- type = "question";
- break;
- }
- ClientScript.RegisterClientScriptBlock(this.GetType(), "", script);
- }
- #endregion
- }
- }
|