コード例 #1
0
    protected void BtnSave_Click(object sender, EventArgs e)
    {
        AdmUser cont = new AdmUser();

        CFun.GetPageData <AdmUser>(cont, this);
        //cont.GroupIdList = CFun.RequestPamStr("gname");
        string GroupIdList  = CFun.RequestPamStr("gname");
        string platformList = CFun.RequestPamStr("platformname");

        cont.GroupIdList = "," + GroupIdList + ',';
        if (cont.Ld == 0)
        {
            cont.CreateDate = DateTime.Now;
        }
        cont.LastDate = DateTime.Now;

        if (TxtUPass.Text != "")
        {
            cont.UPassword = CFun.MD5(TxtUPass.Text);
        }

        if (new BllAdmUser().InsertorUpdateitem(cont))
        {
            BllAdmActHistory.SaveLog(CurrentUId, (int)EnumCCActiveClass.客服人员管理, cont.Ld.Value, "");
            CFun.AlertMegT("保存成功!", "closeFlowPanel", "");
        }
        else
        {
            CFun.AlertMegT("发生错误,请稍后再试!", "back", "");
        }
    }
コード例 #2
0
    protected void BtnSave_Click(object sender, EventArgs e)
    {
        bool         error     = false;
        AdmUserGroup usergroup = new AdmUserGroup();

        CFun.GetPageData <AdmUserGroup>(usergroup, this);
        AdmGroupRoleList cont    = new AdmGroupRoleList();
        string           KeyCode = CFun.RequestPamStr("mname");

        if (usergroup.Ld == 0)
        {
            usergroup.CreateDate = DateTime.Now;
        }
        usergroup.LastDate = DateTime.Now;

        if (new BllAdmUserGroup().InsertorUpdateitem(usergroup))
        {
            int GroupId = usergroup.GroupId.Value;
            new BllAdmGroupRoleList().DeleteItemByGroupId(GroupId);
            cont.GroupId = GroupId;
            cont.Ld      = 0;

            if (KeyCode != null)
            {
                string[] ss = KeyCode.Trim().Split(new char[] { ',' });
                if (ss.Length > 0)
                {
                    for (int i = 0; i < ss.Length; i++)
                    {
                        cont.KeyCode = ss[i];
                        error        = new BllAdmGroupRoleList().InsertorUpdateitem(cont);
                    }
                }
            }
            error = true;
        }

        if (error)
        {
            BllAdmActHistory.SaveLog(CurrentUId, (int)EnumCCActiveClass.权限组管理, usergroup.Ld.Value, "");
            CFun.AlertMegT("保存成功!", "closeFlowPanel", "");
        }
        else
        {
            CFun.AlertMegT("发生错误,请稍后再试!", "back", "");
        }
    }