57 lines
1.6 KiB
C#
57 lines
1.6 KiB
C#
|
|
using System;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.Linq;
|
|||
|
|
using System.Web;
|
|||
|
|
using System.Web.UI;
|
|||
|
|
using System.Web.UI.WebControls;
|
|||
|
|
|
|||
|
|
public partial class SystemManage_xcx : System.Web.UI.Page
|
|||
|
|
{
|
|||
|
|
protected void Page_Load(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
if (!Page.IsPostBack)
|
|||
|
|
{
|
|||
|
|
string id = Request.QueryString["ID"];
|
|||
|
|
if (string.IsNullOrEmpty(id))
|
|||
|
|
id = ZWL.Common.PublicMethod.GetSessionValue("UserID");
|
|||
|
|
ZWL.BLL.ERPUser bll = new ZWL.BLL.ERPUser();
|
|||
|
|
string xcxs = bll.GetXCX(id);
|
|||
|
|
|
|||
|
|
foreach (string value in xcxs.Split(new char[] { ',' },StringSplitOptions.RemoveEmptyEntries))
|
|||
|
|
{
|
|||
|
|
for (int i = 0; i < CheckBoxList1.Items.Count; i++)
|
|||
|
|
{
|
|||
|
|
if (CheckBoxList1.Items[i].Value == value)
|
|||
|
|
{
|
|||
|
|
CheckBoxList1.Items[i].Selected = true;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
protected void btn_upload_Click(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
string id = Request.QueryString["ID"];
|
|||
|
|
if (string.IsNullOrEmpty(id))
|
|||
|
|
id = ZWL.Common.PublicMethod.GetSessionValue("UserID");
|
|||
|
|
|
|||
|
|
string xcxs = "";
|
|||
|
|
foreach (ListItem li in CheckBoxList1.Items)
|
|||
|
|
{
|
|||
|
|
if (li.Selected == true)
|
|||
|
|
{
|
|||
|
|
xcxs += li.Value + ",";
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
bool flag = new ZWL.BLL.ERPUser().SetXCX(id, xcxs);
|
|||
|
|
if (flag)
|
|||
|
|
{
|
|||
|
|
lbl_pic.Text = "修改成功";
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
lbl_pic.Text = "修改失败";
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|