UU跑腿标准版

configedit.aspx.cs 5.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. using System.Web.UI;
  6. using System.Web.UI.WebControls;
  7. using HySoft.Common;
  8. namespace HySoft.BaseCallCenter.Web.sysmanage
  9. {
  10. public partial class configedit : System.Web.UI.Page
  11. {
  12. protected void Page_Load(object sender, EventArgs e)
  13. {
  14. if (!IsPostBack) {
  15. //初始化方法
  16. if (Request.QueryString["action"].ToString() == "Edit") {
  17. getSystrmConfig(Request.QueryString["param"].ToString());
  18. }
  19. }
  20. }
  21. /// <summary>
  22. /// 初始化参数方法
  23. /// </summary>
  24. /// <param name="fla"></param>
  25. private void getSystrmConfig(string fla)
  26. {
  27. if (!string.IsNullOrEmpty(fla)) {
  28. HySoft.BaseCallCenter.Model.T_Sys_SystemConfig systemConfigModel = new BLL.T_Sys_SystemConfig().GetModel(Convert.ToInt32(fla));
  29. if (systemConfigModel != null) {
  30. txtSystemCode.Text = systemConfigModel.F_ParamCode;
  31. txtSystemName.Text = systemConfigModel.F_ParamDes;
  32. txtSystemValue.Text = systemConfigModel.F_ParamValue;
  33. txtId.Value = systemConfigModel.F_ParamId.ToString();
  34. }
  35. }
  36. }
  37. /// <summary>
  38. /// 保存参数设置的信息
  39. /// </summary>
  40. /// <param name="sender"></param>
  41. /// <param name="e"></param>
  42. protected void btnSubmit_Click(object sender, EventArgs e)
  43. {
  44. //try
  45. //{
  46. // int res = 0;
  47. // bool flage = false;
  48. // HySoft.BaseCallCenter.Model.T_Sys_SystemConfig systemConfigModel = new Model.T_Sys_SystemConfig();
  49. // HySoft.BaseCallCenter.BLL.T_Sys_SystemConfig systemConfigBll = new BLL.T_Sys_SystemConfig();
  50. // HySoft.BaseCallCenter.BLL.T_OrderBase orderBaseBll = new BLL.T_OrderBase();
  51. // if (Request.QueryString["action"] == "Add")
  52. // {
  53. // systemConfigModel.F_ParamCode = orderBaseBll.GetNewOrderCode("F_ParamCode", "F_ParamId", "T_Sys_SystemConfig");
  54. // }
  55. // else {
  56. // systemConfigModel.F_ParamCode =new BLL.T_Sys_SystemConfig().GetModel(Convert.ToInt32(Request.QueryString["param"])).F_ParamCode;
  57. // }
  58. // if (!string.IsNullOrEmpty(txtSystemName.Text))
  59. // {
  60. // systemConfigModel.F_ParamDes = txtSystemName.Text;
  61. // }
  62. // else {
  63. // MessageBoxToWindow("参数名称不为空!", "提示", "catch");
  64. // }
  65. // if (!string.IsNullOrEmpty(txtSystemValue.Text))
  66. // {
  67. // systemConfigModel.F_ParamValue = txtSystemValue.Text;
  68. // }
  69. // else
  70. // {
  71. // MessageBoxToWindow("参数值不为空!", "提示", "catch");
  72. // }
  73. // systemConfigModel.F_State = 0;
  74. // if (Request.QueryString["action"] == "Add")
  75. // {
  76. // res = systemConfigBll.Add(systemConfigModel);
  77. // if (res > 0)
  78. // {
  79. // MessageBoxToWindow("新增成功", "新增提示", "success");
  80. // }
  81. // else
  82. // {
  83. // MessageBoxToWindow("新增失败", "新增提示!", "error");
  84. // }
  85. // }
  86. // if (Request.QueryString["action"] == "Edit")
  87. // {
  88. // systemConfigModel.F_ParamId = Convert.ToInt32(Request.QueryString["param"]);
  89. // flage = systemConfigBll.Update(systemConfigModel);
  90. // if (flage)
  91. // {
  92. // MessageBoxToWindow("修改成功", "修改提示!", "success");
  93. // }
  94. // else
  95. // {
  96. // MessageBoxToWindow("修改失败", "修改提示!", "error");
  97. // }
  98. // }
  99. //}
  100. //catch (Exception ex) {
  101. // SysLog.WriteLog(ex);
  102. // MessageBoxToWindow("异常提示!" + ex.Message, "提示", "catch");
  103. //}
  104. }
  105. #region 弹出对话框
  106. /// <summary>
  107. /// 弹出对话框
  108. /// </summary>
  109. /// <param name="title"></param>
  110. /// <param name="content"></param>
  111. /// <param name="type"></param>
  112. public void MessageBoxToWindow(string title, string content, string type)
  113. {
  114. string script = "";
  115. switch (type)
  116. {
  117. case "error"://失败
  118. type = "error";
  119. script = "<script type='text/javascript'> $.ligerDialog.alert('" + title + "','" + content + "','" + type + "');</script>";
  120. break;
  121. case "success"://成功
  122. type = "info";
  123. script = "<script type='text/javascript'> $.ligerDialog.alert('" + title + "','" + content + "','" + type + "',CloseThis);</script>";
  124. break;
  125. case "catch"://异常
  126. type = "warning";
  127. script = "<script type='text/javascript'> $.ligerDialog.alert('" + title + "','" + content + "','" + type + "');</script>";
  128. break;
  129. default:
  130. type = "question";
  131. break;
  132. }
  133. ClientScript.RegisterClientScriptBlock(this.GetType(), "", script);
  134. }
  135. #endregion
  136. }
  137. }