📄 customerchange.ascx.cs
字号:
namespace CRM.Web.Controls
{
using System;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
/// <summary>
/// CustomerChange 的摘要说明。
/// </summary>
public class CustomerChange : CRM.Web.Utility.UserControlBase
{
protected System.Web.UI.WebControls.DropDownList EmployeeList1;
protected System.Web.UI.WebControls.DropDownList EmployeeList2;
protected System.Web.UI.WebControls.Button CustomerChange_Submit;
protected System.Web.UI.WebControls.Label Msg;
protected CRM.Model.UserPower power;
protected CRM.Model.Parameter parms;
private void Page_Load(object sender, System.EventArgs e)
{
this.parms = base.GetRequestParm();
this.power = base.GetUserPower(this.parms);
this.EmployeeList1.DataSource = BLL.SysUser.GetEmployee();
this.EmployeeList2.DataSource = BLL.SysUser.GetEmployee();
this.EmployeeList1.DataTextField = "TrueName";
this.EmployeeList2.DataTextField = "TrueName";
this.EmployeeList1.DataValueField = "UserId";;
this.EmployeeList2.DataValueField = "UserId";
this.EmployeeList1.DataBind();
this.EmployeeList2.DataBind();
}
#region 页面导航
protected void GetWebNavigate()
{
this.Response.Write(base.InitWebNavigate(this.parms));
}
#endregion
#region Web 窗体设计器生成的代码
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器
/// 修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.CustomerChange_Submit.Click += new System.EventHandler(this.CustomerChange_Submit_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
private void CustomerChange_Submit_Click(object sender, System.EventArgs e)
{
if (this.EmployeeList1.SelectedValue == this.EmployeeList2.SelectedValue)
{this.Msg.Text = "对不起,对同一个业务员的业务转移非法!";}
else
{
try
{
BLL.SysUser.CustomerChange(this.EmployeeList1.SelectedValue,this.EmployeeList2.SelectedValue);
base.WirteSysLog(null,"客户转移","1","客户转移");
this.Msg.Text = "恭喜您,客户转移成功!";
}
catch
{
base.WirteSysLog(null,"客户转移","0","客户转移");
this.Msg.Text = "对不起,客户转移失败!";
}
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -