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(); }