Exemple #1
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("批量同意完成");
        }
    //取消申请
    protected void Cancel_B_Click(object sender, EventArgs e)
    {
        int id = DataConverter.CLng(ualyId_Hid.Value);

        ualyBll.ChangeByIDS(id.ToString(), (int)ZLEnum.ConStatus.Recycle);
        function.WriteSuccessMsg("操作成功!");
    }
Exemple #3
0
        protected void BatAgree_Btn_Click(object sender, EventArgs e)
        {
            string ids = Request.Form["idchk"];
            //修改公司状态,并更正名称
            DataTable dt = ualyBll.CompCert_Sel((int)ZLEnum.ConStatus.UnAudit, ids);

            foreach (DataRow dr in dt.Rows)
            {
                int compID = DataConvert.CLng(JsonHelper.GetVal(DataConvert.CStr(dr["UserRemind"]), "compid"));
                compMod           = compBll.SelReturnModel(compID);
                compMod.CompName  = DataConvert.CStr(dr["Remind"]);
                compMod.CompShort = JsonHelper.GetVal(DataConvert.CStr(dr["UserRemind"]), "compshort");
                compMod.Telephone = JsonHelper.GetVal(DataConvert.CStr(dr["UserRemind"]), "telephone");
                compMod.Mobile    = JsonHelper.GetVal(DataConvert.CStr(dr["UserRemind"]), "mobile");
                compMod.Status    = 1;
                compBll.UpdateByID(compMod);
            }
            ualyBll.ChangeByIDS(ids, (int)ZLEnum.ConStatus.Audited);
            function.WriteSuccessMsg("批量同意完成");
        }
        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();
        }