private void BoardMemberInfoDefaultDisplay() { LBLFounderCode.Visible = false; long lBoardSequenceID = long.Parse(Session["BoardMemberID"].ToString()); //LBLBoardGreetings.Text= BoardInfoBusiness BoardMemberPersonalInfoDisplay = new BoardInfoBusiness(); CounsellorInfoEntity BoardMemberPersonalInfo = new CounsellorInfoEntity(); BoardMemberPersonalInfo = BoardMemberPersonalInfoDisplay.GetBoardPersonInfoByCounsellorID(lBoardSequenceID); LBLBoardMemberName.Text = BoardMemberPersonalInfo.scounsellorName; if (BoardMemberPersonalInfo.scounsellorSex == "男") { LBLBoardMemberSex.Text = "先生"; } else if (BoardMemberPersonalInfo.scounsellorSex == "女") { LBLBoardMemberSex.Text = "女生"; } else { LBLBoardMemberSex.Text = BoardMemberPersonalInfo.scounsellorSex; } BoardInfoBusiness BoardInfo = new BoardInfoBusiness(); long lBoardID = BoardInfo.GetBoardMemberIDBySequence(lBoardSequenceID); BoardInfoEntity BoardMemberInfo = new BoardInfoEntity(); BoardMemberInfo = BoardInfo.GetBoardInfoBySequenceID(lBoardSequenceID); LBLBoardSecretKEY.Text = BoardMemberInfo.boardSecretKey; LBLBoardSequenceID.Text = BoardMemberInfo.boadrMemberSequenceID.ToString(); if (!IsPostBack) { TBBoardPassword.Text = BoardMemberInfo.boardMemberLoginPassword; } if (lBoardID % 100 != 67) { LBLFounderCode.Visible = true; LBLFounderCode.Text = "欢迎您,创始人" + lBoardID.ToString(); } else { LBLBoardSequenceID.Visible = false; } }
public BoardInfoEntity GetBoardInfoBySequenceID(long lBoardMemberSequenceID)//通过董事会ID展示董事会成员全部信息方法 { string sSQLText = "select * from BoardInfo where BoardMemberSequenceID ='" + lBoardMemberSequenceID + "'"; DataTable dataTable = DAL.DataBaseAccess.GetDataSet(sSQLText); BoardInfoEntity BoardInfo = new BoardInfoEntity(); if (dataTable.Rows.Count > 0) { BoardInfo.boadrMemberSequenceID = long.Parse("" + dataTable.Rows[0][0]); BoardInfo.boardMemberIDfromCounsellor = long.Parse("" + dataTable.Rows[0][1]); BoardInfo.boardSecretKey = "" + dataTable.Rows[0][2]; BoardInfo.founderIdentityJudgement = "" + dataTable.Rows[0][3]; BoardInfo.boardMemberLoginPassword = "" + dataTable.Rows[0][4]; } return(BoardInfo); }
private void CounsellorInfoDisplayPage() { string[] saDefaultCounsellorAdvantageFields = { "刑法·盗窃罪共犯问题", "刑法·贪污贿赂问题", "刑事诉讼法", "民法·合同问题", "民法·知识产权", "婚姻继承问题", "民法·侵权责任问题", "民法·抵押担保问题" };//默认全部擅长领域 int iCounsellorAge; long lCounsellorID = long.Parse(Session["UsersID"].ToString()); LBLBoardSequenceID.Visible = false; LBLBoardPassword.Visible = false; CounsellorInfoBusiness CounsellorInfoBusiness = new CounsellorInfoBusiness();//实体化BLL层中的CounsellorInfoBusiness类 CounsellorInfoEntity CounsellorInfoEntity = new CounsellorInfoEntity(); if (!IsPostBack) { CounsellorInfoEntity = CounsellorInfoBusiness.GetCounsellorInfoByID(lCounsellorID); string[] saCounsellorAdvantageFields = new string[8]; IMGCounsellorImageDisplay.ImageUrl = CounsellorInfoEntity.scounsellorImage; LBLCounsellorName.Text = CounsellorInfoEntity.scounsellorName; LBLCounsellorID.Text = CounsellorInfoEntity.lcounsellorID.ToString(); TBCounsellorPassword.Text = CounsellorInfoEntity.scounsellorPassword.ToString(); TBCounsellorName.Text = CounsellorInfoEntity.scounsellorName; if (CounsellorInfoEntity.scounsellorSex == "男") { RBMale.Checked = true; } else { RBFemale.Checked = true; } for (iCounsellorAge = 18; iCounsellorAge < 126; iCounsellorAge++) { DDLCounsellorAge.Items.Add(iCounsellorAge.ToString()); } DDLCounsellorAge.SelectedValue = CounsellorInfoEntity.icounsellorAge.ToString(); TBCounsellorEmail.Text = CounsellorInfoEntity.scounsellorEmail; TBCounsellorPhoneNumber.Text = CounsellorInfoEntity.lcounsellorPhoneNumber.ToString(); IMGCounsellorImage.ImageUrl = CounsellorInfoEntity.scounsellorImage; LBLCounsellorWallet.Text = CounsellorInfoEntity.lcounsellorWallet.ToString(); LBLCounsellorLevel.Text = CounsellorInfoEntity.icounsellorLevel.ToString(); for (int iCounter = 0; iCounter < saCounsellorAdvantageFields.Length; iCounter++) { saCounsellorAdvantageFields[iCounter] = CounsellorInfoEntity.sacounsellorAdvantageField[iCounter]; } CounsellorAdvantageFieldsBonding(saCounsellorAdvantageFields, saDefaultCounsellorAdvantageFields); QuestionInfoDisplay(CounsellorInfoEntity.icounsellorLevel);//第三页等级提升的相关信息 BoardInfoBusiness BoardInfo = new BoardInfoBusiness(); int iCounsellorApplyExistJudgement = (int)BoardInfo.CounsellorApplyExistJudgement(lCounsellorID); int iBoardExistJudgement = (int)BoardInfo.BoardExistJudgement(lCounsellorID); if (CounsellorInfoEntity.icounsellorLevel != 3) { LBLBoardAccessAlert.Text = "请提升您的等级,以获取准入资格!"; BTNBoardAccessApply.Visible = false; } else if (iBoardExistJudgement > 0) { BTNBoardAccessApply.Visible = false; LBLBoardAccessAlert.Text = "申请已通过!请借助如下信息以登录董事会"; BoardInfoEntity BoardInfoEntity = new BoardInfoEntity(); BoardInfoEntity = BoardInfo.GetBoardInfoByCounsellorID(lCounsellorID); LBLBoardSequenceID.Visible = true; LBLBoardSequenceID.Text = "您的董事会账号为:" + BoardInfoEntity.boadrMemberSequenceID.ToString(); if (BoardInfoEntity.boardMemberLoginPassword == "password") { LBLBoardPassword.Visible = true; LBLBoardPassword.Text = "初始密码为:" + BoardInfoEntity.boardMemberLoginPassword + ",请务必更改密码"; } } else if (iCounsellorApplyExistJudgement > 0) { LBLBoardAccessAlert.Text = "您已申请加入董事会,请耐心等待结果!!"; BTNBoardAccessApply.Visible = false; } else { LBLBoardAccessAlert.Text = "您的能力通过审核!请点击下方按钮以申请加入董事会"; } } //差评警告系统 double dBlackListAlert; double dCounsellorArticleLikedAmount = 0; double dCounsellorArticleDislikedAmount = 0; double dCounsellorRespondLikedCountAmount = 0; double dCounsellorRespondDislikedCountAmount = 0; if (CounsellorInfoBusiness.CounsellorArticleLikedAmount(lCounsellorID).ToString() == "" || CounsellorInfoBusiness.CounsellorArticleDislikedAmount(lCounsellorID).ToString() == "" || CounsellorInfoBusiness.CounsellorRespondLikedCountAmount(lCounsellorID).ToString() == "" || CounsellorInfoBusiness.CounsellorRespondDislikedCountAmount(lCounsellorID).ToString() == "") { LBLBlackListAlert.Visible = false; } else { dCounsellorArticleLikedAmount = double.Parse(CounsellorInfoBusiness.CounsellorArticleLikedAmount(lCounsellorID).ToString()); dCounsellorArticleDislikedAmount = double.Parse(CounsellorInfoBusiness.CounsellorArticleDislikedAmount(lCounsellorID).ToString()); dCounsellorRespondLikedCountAmount = double.Parse(CounsellorInfoBusiness.CounsellorRespondLikedCountAmount(lCounsellorID).ToString()); dCounsellorRespondDislikedCountAmount = double.Parse(CounsellorInfoBusiness.CounsellorRespondDislikedCountAmount(lCounsellorID).ToString()); if (dCounsellorArticleDislikedAmount + dCounsellorRespondDislikedCountAmount > 500) { dBlackListAlert = (dCounsellorArticleLikedAmount + dCounsellorRespondLikedCountAmount) / (dCounsellorArticleDislikedAmount + dCounsellorRespondDislikedCountAmount); if (dBlackListAlert < 1) { LBLBlackListAlert.Text = "警告!您的差评比过低!"; } else { LBLBlackListAlert.Visible = false; } } else { LBLBlackListAlert.Visible = false; } } }