| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- namespace HySoft.BaseCallCenter.Web.customermanage
- {
- public partial class customerlabelmodify : System.Web.UI.Page
- {
- private BLL.T_Sys_DictionaryValue dicBLL = new BLL.T_Sys_DictionaryValue();
- protected void Page_Load(object sender, EventArgs e)
- {
- if (!IsPostBack)
- {
- var action = Common.CommonRequest.GetString("action");
- switch (action)
- {
- case "edit":
- Modify();
- break;
- default:
- break;
- }
- }
- }
- private void Modify()
- {
- var labelId = Common.CommonRequest.GetInt("labelId", 0);
- if (labelId > 0)
- {
- var label = new BLL.T_Sys_DictionaryValue().GetModel(labelId);
- this.hiddLabelId.Value = label.F_DictionaryValueId.ToString();
- this.txtLabelName.Text = label.F_Name;
- }
- }
- protected void btnSubmit_Click(object sender, EventArgs e)
- {
- var labelId = 0;
- var labelSort = 0;
- int.TryParse(hiddLabelId.Value, out labelId);
- var labelName = txtLabelName.Text;
- var labelDescription = txtLabelDescription.Text;
- int.TryParse(txtLabelSort.Text, out labelSort);
- if (labelId > 0)
- {
- var model = dicBLL.GetModel(labelId);
- model.F_Name = labelName;
- dicBLL.Update(model);
- }
- else
- {
- dicBLL.Add(new Model.T_Sys_DictionaryValue
- {
- F_Name = labelName,
- F_DictionaryFlag = "KHBQ",
- F_Describe = labelDescription,
- F_State = "1",
- F_Sort = labelSort,
- F_ValueCode = ""
- });
- }
- }
- }
- }
|