protected void Save_Btn_Click(object sender, EventArgs e)
        {
            M_UserInfo   mu      = buser.SelReturnModel(UserID);
            M_User_Plat  upMod   = upBll.SelReturnModel(UserID);
            M_Plat_Group gpMod   = gpBll.SelReturnModel(DataConvert.CLng(PlatGroup_DP.SelectedValue));
            M_Plat_Comp  compMod = compBll.SelReturnModel(Convert.ToInt32(PlatComp_DP.SelectedValue));

            if (upMod == null)
            {
                upMod            = upBll.NewUser(mu, compMod);
                upMod.Plat_Group = PlatGroup_DP.SelectedValue;
                upBll.Insert(upMod);
            }
            else
            {
                upMod.CompID = compMod.ID;
                upMod.Status = 1;
                upBll.UpdateByID(upMod);
            }
            if (gpMod != null)
            {
                gpBll.AddMember(UserID.ToString(), gpMod.ID);
            }
            function.WriteSuccessMsg("操作成功", Request.RawUrl);
        }
Пример #2
0
        protected void UpPlat_B_Click(object sender, EventArgs e)
        {
            M_UserInfo  mu      = buser.SelReturnModel(UserID);
            M_User_Plat upMod   = upBll.SelReturnModel(UserID);
            M_Plat_Comp compMod = new M_Plat_Comp();
            B_Plat_Comp compBll = new B_Plat_Comp();

            if (upMod == null)
            {
                //------------------------------------
                upMod          = new M_User_Plat();
                upMod.UserID   = mu.UserID;
                upMod.TrueName = B_User.GetUserName(mu.HoneyName, mu.TrueName, mu.UserName);
                upMod.Post     = "";
                upMod.Status   = 1;
                //----------------------------------------
                compBll.CreateByUser(upMod);
                upBll.Insert(upMod);
            }
            else
            {
                if (upMod.CompID == 0)//兼容之前的逻辑
                {
                    compBll.CreateByUser(upMod);
                }
                upMod.Status = 1;
                upBll.UpdateByID(upMod);
            }
            ShowPlatInfo(upMod.UserID);
            function.WriteSuccessMsg("操作成功,你现在可以为该用户指定公司");
        }
Пример #3
0
        protected void Save_Btn_Click(object sender, EventArgs e)
        {
            M_UserInfo mu = buser.GetLogin();

            mu.HoneyName   = TrueName_T2.Text;
            mu.UserFace    = SFile_Up.SaveFile();
            userMod        = userBll.SelReturnModel(mu.UserID);
            userMod.Mobile = Mobile_T2.Text;
            userMod.Post   = Post_T2.Text;
            userBll.UpdateByID(userMod);
            buser.UpdateByID(mu);
            function.WriteSuccessMsg("操作成功");
        }
Пример #4
0
        private void EditPlatInfo(int UserID)
        {
            M_User_Plat platmodel = PlatBll.SelReturnModel(UserID);

            if (platmodel != null)
            {
                platmodel.TrueName = tbTrueName_T.Text;
                platmodel.CompID   = Convert.ToInt32(tbCompName_D.SelectedValue);
                platmodel.Post     = tbPost_T.Text;
                platmodel.Mobile   = tbPhone_T.Text;
                platmodel.Status   = 1;
                PlatBll.UpdateByID(platmodel);
            }
        }
Пример #5
0
        protected void BatAdd_Btn_Click(object sender, EventArgs e)
        {
            M_Plat_Comp compMod = compBll.SelReturnModel(CompID);

            string[] ids = UserIDS_Hid.Value.Split(",".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
            for (int i = 0; i < ids.Length; i++)
            {
                int         uid   = DataConvert.CLng(ids[i]);
                M_User_Plat upMod = upBll.SelReturnModel(uid);
                if (upMod == null)
                {
                    M_UserInfo newmu = buser.SelReturnModel(uid);
                    upMod = upBll.NewUser(newmu, compMod);
                    upBll.Insert(upMod);
                }
                else
                {
                    upMod.CompID = CompID; upBll.UpdateByID(upMod);
                }
            }
            MyBind();
        }