protected void Save_Btn_Click(object sender, EventArgs e)
        {
            string telephone = Telephone_T.Text.Replace(" ", "");
            string mobile    = Mobile_T.Text.Replace(" ", "");

            if (string.IsNullOrEmpty(telephone) && string.IsNullOrEmpty(mobile))
            {
                function.Script(this, "alert('电话和手机不能同时为空!');");
                return;
            }
            upMod = B_User_Plat.GetLogin();
            JObject json = new JObject();

            json.Add("mail", Mails_T.Text);
            json.Add("mobile", mobile);
            json.Add("telephone", telephone);
            json.Add("compid", upMod.CompID);
            json.Add("compshort", CompShort_T.Text);
            ualyMod            = new M_Common_UserApply();
            ualyMod.ZType      = "plat_compcert";
            ualyMod.UserID     = upMod.UserID;
            ualyMod.UserName   = upMod.UserName;
            ualyMod.Remind     = CompName_T.Text;
            ualyMod.UserRemind = JsonConvert.SerializeObject(json);
            ualyBll.Insert(ualyMod);
            function.WriteSuccessMsg("申请已提交,请等待管理员审核", "/Plat/");
        }
Exemplo n.º 2
0
        protected void BatAgree_Btn_Click(object sender, EventArgs e)
        {
            string ids = Request.Form["idchk"];
            //修改公司状态,并更正名称
            DataTable dt = ualyBll.Search(ztype, ids, "", (int)ZLEnum.ConStatus.UnAudit, 0);

            foreach (DataRow dr in dt.Rows)
            {
                M_Common_UserApply ualyMod = new M_Common_UserApply().GetModelFromReader(dr);
                M_UserInfo         mu      = buser.SelReturnModel(ualyMod.UserID);
                //-------------创建公司和用户
                M_User_Plat upMod   = upBll.NewUser(mu);
                M_Plat_Comp compMod = compBll.CreateByUser(upMod);
                compMod.CompName  = ualyMod.CompName;
                compMod.CompShort = ualyMod.Info1;
                compMod.Telephone = ualyMod.Mobile;
                compMod.Mobile    = ualyMod.Mobile;
                compMod.Status    = 1;
                compBll.UpdateByID(compMod);
                upBll.Insert(upMod);
                //-------------创建部门
                DataTable userDT = GetUserDT();
                NewByUserDT(compMod, userDT);
            }
            ualyBll.ChangeByIDS(ids, (int)ZLEnum.ConStatus.Audited);
            function.WriteSuccessMsg("批量同意完成");
        }
        //申请加入公司(一张表用于存其)//ZL_Plat_JoinCompApply
        protected void AddComp_Btn_Click(object sender, EventArgs e)
        {
            M_User_Plat upMod = B_User_Plat.GetLogin();
            //记录用户信息并写入
            M_Common_UserApply ualyMod = new M_Common_UserApply();
            B_Common_UserApply ualyBll = new B_Common_UserApply();

            ualyMod.UserID   = upMod.UserID;
            ualyMod.ZType    = "plat_joincomp";
            ualyMod.UserName = upMod.UserName + "(" + upMod.TrueName + ")";
            ualyMod.Remind   = CompID.ToString();
            ualyMod.IP       = IPScaner.GetUserIP();
            ualyBll.Insert(ualyMod);
            function.WriteSuccessMsg("申请成功,请等待管理员审核", "/Plat/");
        }
Exemplo n.º 4
0
        protected void Save_Btn_Click(object sender, EventArgs e)
        {
            M_UserInfo         mu     = buser.GetLogin();
            M_Common_UserApply alyMod = new M_Common_UserApply("plat_applyopen");

            alyMod.UserID   = mu.UserID;
            alyMod.UserName = mu.UserName;
            alyMod.Remind   = UserRemind_T.Text;
            alyMod.CompName = CompName_T.Text;
            alyMod.Info1    = CompShort_T.Text;
            alyMod.Contact  = Contact_T.Text;
            alyMod.Email    = Email_T.Text;
            alyMod.Mobile   = Mobile_T.Text;
            alyMod.QQ       = QQ_T.Text;
            alyBll.Insert(alyMod);
            function.WriteSuccessMsg("您已经成功申请,系统审核后会以电子邮件通知您");
        }
Exemplo n.º 5
0
    public void MyBind()
    {
        M_UserInfo mu = buser.GetLogin();

        if (ualyBll.JoinComp_Exist(mu.UserID))
        {
            comp_tab.Visible = true;
            //申请信息
            DataTable dt = ualyBll.Search("plat_joincomp", "", "", (int)ZLEnum.ConStatus.UnAudit, mu.UserID);
            ualyMod = ualyBll.SelReturnModel(DataConverter.CLng(dt.Rows[0]["ID"]));
            //申请加入的公司信息
            int compid = DataConverter.CLng(ualyMod.Remind);
            compId_Hid.Value = compid.ToString();
            ualyId_Hid.Value = ualyMod.ID.ToString();
            M_Plat_Comp compMod = compBll.SelReturnModel(compid);
            BindComp(compMod);
            Apply_B.Visible    = false;
            apply_div.Visible  = false;
            cancel_div.Visible = true;
            Mess_L.Text        = "您已提交申请,请等候公司管理员审核";
        }
        else
        {
            M_User_Plat upMod = B_User_Plat.GetLogin();
            if (upMod != null)
            {
                M_Plat_Comp compMod = compBll.SelReturnModel(upMod.CompID);
                if (compMod.Status == 1)
                {
                    Mess_L.Text = "您已加入了[ " + compMod.CompName + " ]";
                    BindComp(compMod);
                    comp_tab.Visible   = true;
                    Apply_B.Visible    = false;
                    apply_div.Visible  = false;
                    cancel_div.Visible = true;
                    Cancel_B.Visible   = false;
                }
            }
        }
    }
        protected void EGV_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            int id = DataConvert.CLng(e.CommandArgument);

            ualyMod = ualyBll.SelReturnModel(id);
            switch (e.CommandName)
            {
            case "agree":
            {
                upMod = B_User_Plat.GetLogin();
                DBCenter.UpdateSQL("ZL_User_Plat", "CompID=" + upMod.CompID + ",Plat_Role=''", "UserID=" + ualyMod.UserID);
                ualyBll.ChangeByIDS(id.ToString(), (int)ZLEnum.ConStatus.Audited);
            }
            break;

            case "reject":
            {
                ualyBll.ChangeByIDS(id.ToString(), (int)ZLEnum.ConStatus.Reject);
            }
            break;
            }
            MyBind();
        }