예제 #1
0
    protected void BTNPasswordReset_Click(object sender, EventArgs e)
    {
        ClientInfoBusiness     ClientInfo     = new ClientInfoBusiness();
        CounsellorInfoBusiness CounsellorInfo = new CounsellorInfoBusiness();
        long lClientID     = ClientInfo.ClientPasswordResetJudgementByClientEmailAndPhoneNumber(TBUsersEmail.Text, long.Parse(TBUsersPhoneNumber.Text));
        long lCounsellorID = CounsellorInfo.CounsellorPasswordResetJudgementByCounsellorEmailAndPhoneNumber(TBUsersEmail.Text, long.Parse(TBUsersPhoneNumber.Text));

        if (lClientID > 0 || lCounsellorID > 0)
        {
            if (lClientID > 0)
            {
                int iClientReturnValue = ClientInfo.ClientPasswordReset(TBUsersNewPassword.Text, lClientID);
                if (iClientReturnValue > 0)
                {
                    Response.Write("<script>alert('您的密码重置成功!')</script>");
                }
            }
            else if (lCounsellorID > 0)
            {
                int iCounsellorReturnValue = CounsellorInfo.CounsellorPasswordReset(TBUsersNewPassword.Text, lCounsellorID);
                if (iCounsellorReturnValue > 0)
                {
                    Response.Write("<script>alert('您的密码重置成功!')</script>");
                }
            }
        }
        else
        {
            Response.Write("<script>alert('信息错误!')</script>");
        }
    }
    private string[,] EliteCounsellorInfo()
    {
        //从BLL层获取精英律师的数据,包括名字、照片和链接
        CounsellorInfoBusiness EliteCounsellorInfo = new CounsellorInfoBusiness();

        string[,] saXYEliteCounsellorInfo = new string[3, 3];
        saXYEliteCounsellorInfo           = EliteCounsellorInfo.EliteCounsellorInfo();
        return(saXYEliteCounsellorInfo);
    }
    private void CounsellorInfoDisplayPage()
    {
        long lCounsellorID = long.Parse(Request.QueryString["CounsellorID"].ToString());
        CounsellorInfoBusiness CounsellorInfoBusiness = new CounsellorInfoBusiness();//实体化BLL层中的CounsellorInfoBusiness类
        CounsellorInfoEntity   CounsellorInfoDetails  = new CounsellorInfoEntity();

        CounsellorInfoDetails = CounsellorInfoBusiness.GetCounsellorResumeInfoByID(lCounsellorID);

        IMGCounsellorImage.ImageUrl        = CounsellorInfoDetails.scounsellorImage;
        LBLCounsellorName.Text             = CounsellorInfoDetails.scounsellorName;
        LBLCounsellorSex.Text              = CounsellorInfoDetails.scounsellorSex;
        LBLCounsellorAge.Text              = CounsellorInfoDetails.icounsellorAge.ToString();
        LBLCounsellorEmail.Text            = CounsellorInfoDetails.scounsellorEmail;
        LBLCounsellorPhoneNumber.Text      = CounsellorInfoDetails.lcounsellorPhoneNumber.ToString();
        LBLCounsellorSelfIntroduction.Text = CounsellorInfoDetails.scounsellorSelfIntroduction;
        LBLCounsellorWallet.Text           = CounsellorInfoDetails.lcounsellorWallet.ToString();

        string[] saCounsellorAdvantageFields = new string[8];
        saCounsellorAdvantageFields = CounsellorInfoDetails.sacounsellorAdvantageField;

        StringBuilder CounsellorAdvantageFields = new StringBuilder();

        for (int iCounter = 0; iCounter < 8; iCounter++)
        {
            CounsellorAdvantageFields.Append(saCounsellorAdvantageFields[iCounter] + ",");
        }

        string sCounsellorAdvantageFields = CounsellorAdvantageFields.ToString();

        LBLCounsellorAdvantageFields.Text = sCounsellorAdvantageFields;

        long lBoardMemberSequenceID = long.Parse(Session["UsersID"].ToString());
        BoardInfoBusiness BoardInfo = new BoardInfoBusiness();

        int iJudgementValue = (int)BoardInfo.ApplySelectionJudgement(lBoardMemberSequenceID);

        if (iJudgementValue > 0)
        {
            LBLVote.Text      = "您已投票!";
            BTNAgree.Visible  = false;
            BTNRefuse.Visible = false;
        }
        else
        {
            LBLVote.Visible = false;
        }
        long lBoardApplyID;

        lBoardApplyID = BoardInfo.GetBoardApplyIDByCounsellorID(lCounsellorID);

        BoardInfoBusiness GetResultAmount = new BoardInfoBusiness();//显示投票数

        LBLAgreeCount.Text  = GetResultAmount.BoardApplyAgreeAmount(lBoardApplyID).ToString();
        LBLRefuseCount.Text = GetResultAmount.BoardApplyRefuseAmount(lBoardApplyID).ToString();
    }
예제 #4
0
    private void CounsellorDetailInfoDisplay()
    {
        long lUsersID = long.Parse(Session["UsersID"].ToString());

        if (lUsersID == 0 || lUsersID % 100 == 67)
        {
            BTNEstablishContract.Visible = false;
        }

        long lCounsellorID = long.Parse(Request.QueryString["CounsellorID"].ToString());
        //long lCounsellorID = 2020110619480567;//测试用

        CounsellorInfoBusiness CounsellorInfoBusiness = new CounsellorInfoBusiness();//实体化BLL层中的CounsellorInfoBusiness类
        CounsellorInfoEntity   CounsellorInfoEntity   = new CounsellorInfoEntity();
        ContractInfoBusiness   ContractInfo           = new ContractInfoBusiness();

        //最上面的信息
        CounsellorInfoEntity         = CounsellorInfoBusiness.GetCounsellorInfoByID(lCounsellorID);
        LBLCounsellorName.Text       = CounsellorInfoEntity.scounsellorName;
        LBLCounsellorLevel.Text      = CounsellorInfoEntity.icounsellorLevel.ToString();
        IMGCounsellorImage.ImageUrl  = CounsellorInfoEntity.scounsellorImage.ToString();
        LBLCounsellorTips.Text       = CounsellorInfoEntity.scounsellorSelfIntroduction.ToString();
        LBLCounsellorOfferMoney.Text = CounsellorInfoEntity.lcounsellorOfferMoney.ToString();

        //第一页信息
        LBLCounsellorNamePage1.Text      = CounsellorInfoEntity.scounsellorName;
        LBLCounsellorSex.Text            = CounsellorInfoEntity.scounsellorSex;
        LBLCounsellorContractAmount.Text = ((int)ContractInfo.CounsellorContractAmount(lCounsellorID)).ToString();
        //第三页信息

        for (int iCounter = 0; iCounter < CounsellorInfoEntity.sacounsellorAdvantageField.Length; iCounter++)
        {
            //循环给Label赋值
            Label LBLCounsellorAdvantageFields = (Label)this.Master.FindControl("ContentPlaceHolder1").FindControl("LBLCounsellorAdvantageField" + iCounter);
            if (CounsellorInfoEntity.sacounsellorAdvantageField[iCounter] == "待定")
            {
                LBLCounsellorAdvantageFields.Visible = false;
            }
            else
            {
                LBLCounsellorAdvantageFields.Text = CounsellorInfoEntity.sacounsellorAdvantageField[iCounter];
            }
        }
        //第四页的信息
        LBLCounsellorPhoneNumber.Text = CounsellorInfoEntity.lcounsellorPhoneNumber.ToString();
    }
예제 #5
0
    protected void BTNEstablishContract_Click(object sender, EventArgs e)
    {
        long lClientID = long.Parse(Session["UsersID"].ToString());
        ClientInfoBusiness GetClientWallet = new ClientInfoBusiness();
        ClientInfoEntity   ClientWallet    = new ClientInfoEntity();

        ClientWallet = GetClientWallet.GetClientInfoByID(lClientID);


        long lCounsellorID = long.Parse(Request.QueryString["CounsellorID"].ToString());
        CounsellorInfoBusiness CounsellorInfoBusiness = new CounsellorInfoBusiness();//实体化BLL层中的CounsellorInfoBusiness类
        CounsellorInfoEntity   CounsellorInfoEntity   = new CounsellorInfoEntity();

        CounsellorInfoEntity = CounsellorInfoBusiness.GetCounsellorInfoByID(lCounsellorID);

        ContractInfoBusiness ContractEstablish = new ContractInfoBusiness();

        int iCounsellorContractExistDetect = int.Parse(ContractEstablish.CounsellorContractExistDetect(lClientID).ToString());

        if (iCounsellorContractExistDetect > 0)
        {
            Response.Write("<script>alert('您已经与该律师签约!')</script>");
        }
        else
        {
            if (ClientWallet.lclientWallet >= CounsellorInfoEntity.lcounsellorOfferMoney)
            {
                int iContractJudegementValue   = ContractEstablish.ContractEstablish(lCounsellorID, lClientID);
                int iClientJudegementValue     = GetClientWallet.ClientWalletMoneyUpdate(CounsellorInfoEntity.lcounsellorOfferMoney, lClientID);
                int iCounsellorJudegementValue = CounsellorInfoBusiness.CounsellorWalletMoneyUpdate(lCounsellorID, CounsellorInfoEntity.lcounsellorOfferMoney);
                if (iContractJudegementValue > 0 && iClientJudegementValue > 0 && iCounsellorJudegementValue > 0)
                {
                    Response.Write("<script>alert('您已经成功签约!')</script>");
                }
                else
                {
                    Response.Write("<script>alert('签约失败!')</script>");
                }
            }
            else
            {
                Response.Write("<script>alert('您的余额不足以签约!')</script>");
            }
        }
    }
    protected void BTNCounsellorLevelUpdate_Click(object sender, EventArgs e)
    {
        //等级提升按钮
        long lCounsellorID = long.Parse(Session["UsersID"].ToString());
        QuestionInfoBusiness questionInfoBusiness = new QuestionInfoBusiness();
        QuestionInfoEntity   questionInfoEntity   = new QuestionInfoEntity();

        questionInfoEntity = questionInfoBusiness.GETQuestionInfoByID(iQuestionID);

        if (questionInfoEntity.ccorrectAnswer == char.Parse(DDLQuestionSelection.SelectedValue))
        {
            Response.Write("<script>alert('回答正确!')</script>");
            CounsellorInfoBusiness CounsellorLevelUpdate = new CounsellorInfoBusiness();
            CounsellorLevelUpdate.CounsellorLevelUpdate(lCounsellorID);
            //律师等级+1
        }
        else
        {
            Response.Write("<script>alert('回答错误!')</script>");
        }
    }
예제 #7
0
    private void ArticleInfoDisplay(long lArticleID)
    {
        //获得文章信息
        ArticleInfoBusiness GetArticleInfoByArticleID = new ArticleInfoBusiness();
        ArticleInfoEntity   ArticleInfo = new ArticleInfoEntity();

        ArticleInfo                    = GetArticleInfoByArticleID.GetArticleInfoByID(lArticleID);
        LBLArticleTitle.Text           = ArticleInfo.sarticleTitle;
        LBLArticleReadCountNumber.Text = ArticleInfo.iarticleReadCount.ToString();
        LBLArticleLikedCount.Text      = ArticleInfo.iarticleLikedCount.ToString();
        LBLArticleDislikedCount.Text   = ArticleInfo.iarticleDislikedCount.ToString();
        LBLArticleContent.Text         = ArticleInfo.sarticleContent;

        //获得作者信息
        CounsellorInfoBusiness GetArticleAutherInfo = new CounsellorInfoBusiness();
        CounsellorInfoEntity   ArticleAutherInfo    = new CounsellorInfoEntity();

        long lAuthorID = ArticleInfo.larticleAutherID;

        if (lAuthorID == 0L)
        {
            BTNArticleDisliked.Visible      = false;
            LBLArticleDisliked.Visible      = false;
            LBLArticleDislikedCount.Visible = false;
            IMGArticleAuthorImage.Visible   = false;
            LBLAuthorName.Text          = "管理员";
            LBAutherInfoDetails.Visible = false;
            LBLAuthorTips.Text          = "此文章由管理员发布";
        }
        else
        {
            ArticleAutherInfo              = GetArticleAutherInfo.GetCounsellorInfoByID(lAuthorID);
            LBLAuthorName.Text             = ArticleAutherInfo.scounsellorName;
            IMGArticleAuthorImage.ImageUrl = ArticleAutherInfo.scounsellorImage;
            LBLAuthorTips.Text             = ArticleAutherInfo.scounsellorSelfIntroduction;
        }
    }
    private string QuestionFieldRandom()
    {
        //递归实现问题领域的随机选取
        long lCounsellorID = long.Parse(Session["UsersID"].ToString());
        CounsellorInfoBusiness CounsellorInfoBusiness = new CounsellorInfoBusiness();//实体化BLL层中的CounsellorInfoBusiness类
        CounsellorInfoEntity   CounsellorInfoEntity   = new CounsellorInfoEntity();

        CounsellorInfoEntity = CounsellorInfoBusiness.GetCounsellorInfoByID(lCounsellorID);
        string[] saCounsellorAdvantageFields = new string[8];

        for (int iCounter = 0; iCounter < saCounsellorAdvantageFields.Length; iCounter++)
        {
            saCounsellorAdvantageFields[iCounter] = CounsellorInfoEntity.sacounsellorAdvantageField[iCounter];
        }//将获取的擅长领域加入到本方法内的数组

        Random RandomQuestionID           = new Random();
        int    iIndex                     = RandomQuestionID.Next(saCounsellorAdvantageFields.Length);
        int    iQuestionFieldExistCounter = 0;
        string sQuestionFieldRandom       = saCounsellorAdvantageFields[iIndex].ToString();

        string[] sQuestionFields = { "刑法·贪污贿赂问题", "刑事诉讼法", "民法·合同问题", "民法·知识产权", "婚姻继承问题", "民法·侵权责任问题", "民法·抵押担保问题", "刑法·盗窃罪共犯问题" };
        for (int iCounter = 0; iCounter < 8; iCounter++)
        {
            if (sQuestionFieldRandom == sQuestionFields[iCounter])
            {
                iQuestionFieldExistCounter++;
            }
        }
        if (iQuestionFieldExistCounter > 0)
        {
            return(sQuestionFieldRandom);
        }
        else
        {
            return(QuestionFieldRandom());
        }
    }
예제 #9
0
    private void CounsellorLoginJudgement()
    {
        /**
         * 功能:查询是否存在律师
         */
        CounsellorInfoBusiness CounsellorExistJudgement = new CounsellorInfoBusiness();

        if ((int)CounsellorExistJudgement.CounsellorExistJudgementByCounsellorID(long.Parse(TBUsersAccount.Text)) > 0)
        {
            if ((int)CounsellorExistJudgement.CounsellorExistJudgementByCounsellorPassword(TBUsersPassword.Text) > 0)
            {
                Session["UsersID"] = TBUsersAccount.Text;
                Response.Redirect("~/03CounsellorPersonalCentre.aspx");
            }
            else
            {
                Response.Write("<script>alert('律师密码有误!')</script>");
            }
        }
        else
        {
            Response.Write("<script>alert('律师账号有误!')</script>");
        }
    }
예제 #10
0
    private void UsersInfoInsert()
    {
        long   UserID       = long.Parse(DateTime.Now.ToString("yyyyMMddHHmmss"));//用户ID的设置
        string UserPassword = TBUserPassword.Text;

        if (RBClientSelected.Checked == true)
        {
            long lClientPhoneNumber = long.Parse(TBUserPhoneNumber.Text);
            ClientInfoBusiness ClientExistJudgement = new ClientInfoBusiness();
            int iClientExitsJudgement = (int)ClientExistJudgement.ClientExistJudgementByClientPhoneNumber(lClientPhoneNumber);
            if (iClientExitsJudgement == 0)
            {
                ClientInfoEntity ClientInfo = new ClientInfoEntity();              //实例化Entity层客户的信息
                ClientInfo.lclientID       = long.Parse(UserID.ToString() + "99"); //客户ID详细设置
                ClientInfo.sclientPassword = TBUserPassword.Text;
                ClientInfo.sclientName     = TBUserName.Text;
                if (RBUserMale.Checked == true)
                {
                    ClientInfo.sclientSex = "男";
                }
                else if (RBUserFemale.Checked == true)
                {
                    ClientInfo.sclientSex = "女";
                }
                else
                {
                    Response.Write("<script>alert('请务必选择性别!')</script>");
                }

                ClientInfo.iclientAge                 = int.Parse(DDLUserAge.SelectedValue);
                ClientInfo.sclientEmail               = TBUserEmail.Text;
                ClientInfo.lclientPhoneNumber         = long.Parse(TBUserPhoneNumber.Text);
                ClientInfo.lclientDepositingMoney     = long.Parse(DDLClientDepositingMoney.SelectedValue) * 10000;
                ClientInfo.lclientWallet              = 0;
                ClientInfo.lclientTotalDepositedMoney = 0;

                IMGUserImageUpLoad();
                ClientInfo.sclientImage = "WebImages/ClientImages/" + this.sFullyUsersUploadImagePathAndName;

                ClientInfo.sclientAddress = TBClientAddress.Text;
                ClientInfo.lclientPoints  = 0;
                ClientInfo.iclientLevel   = 1;
                ClientInfoBusiness ClientRegister = new ClientInfoBusiness();
                int iResultJudgement = ClientRegister.ClientInfoRegister(ClientInfo);
                if (iResultJudgement > 0)
                {
                    Session["UsersID"] = long.Parse(UserID.ToString() + "99");
                    Response.Redirect("~/03ClientPersonalCentre.aspx");
                }
                else
                {
                    Response.Write("<script>alert('抱歉,未成功注册!')</script>");
                }
            }
            else
            {
                Response.Write("<script>alert('该手机号已注册!')</script>");
            }
        }
        else if (RBCounsellorSelected.Checked == true)
        {
            CounsellorInfoBusiness CounsellorExistInfo = new CounsellorInfoBusiness();
            BlackListInfoBusiness  BlackListExistInfo  = new BlackListInfoBusiness();
            if ((int)CounsellorExistInfo.CounsellorExistJudgementByCounsellorPhoneNumber(long.Parse(TBUserPhoneNumber.Text)) != 0)
            {
                Response.Write("<script>alert('抱歉,该手机号已注册')</script>");
            }
            else if ((int)BlackListExistInfo.BlackListExist(long.Parse(TBUserPhoneNumber.Text), TBUserEmail.Text) > 0)
            {
                Response.Write("<script>alert('由于您的违规行为,不可注册!')</script>");
            }
            else
            {
                CounsellorInfoEntity CounsellorInfo = new CounsellorInfoEntity();

                CounsellorInfo.lcounsellorID       = long.Parse(UserID.ToString() + "67");
                CounsellorInfo.scounsellorPassword = TBUserPassword.Text;
                CounsellorInfo.scounsellorName     = TBUserName.Text;
                if (RBUserMale.Checked == true)
                {
                    CounsellorInfo.scounsellorSex = "男";
                }
                else
                {
                    CounsellorInfo.scounsellorSex = "女";
                }
                CounsellorInfo.icounsellorAge         = int.Parse(DDLUserAge.SelectedValue);
                CounsellorInfo.scounsellorEmail       = TBUserEmail.Text;
                CounsellorInfo.lcounsellorPhoneNumber = long.Parse(TBUserPhoneNumber.Text);
                IMGUserImageUpLoad();
                CounsellorInfo.scounsellorImage            = "WebImages/CounsellorImages/" + this.sFullyUsersUploadImagePathAndName;
                CounsellorInfo.scounsellorSelfIntroduction = TBCounsellorSelfIntroduction.Text;
                CounsellorInfo.lcounsellorWallet           = 0;
                CounsellorInfo.icounsellorLevel            = 0;
                CounsellorInfo.lcounsellorOfferMoney       = 0;
                CounsellorInfo.sacounsellorAdvantageField  = CounsellorAdvantageFieldsInfo();

                CounsellorInfoBusiness CounsellorInfoRegister = new CounsellorInfoBusiness();

                int iResultJudgement = CounsellorInfoRegister.CounsellorInfoRegister(CounsellorInfo);
                if (iResultJudgement > 0)
                {
                    Session["UsersID"] = long.Parse(UserID.ToString() + "67");
                    Response.Redirect("~/03CounsellorPersonalCentre.aspx");
                }
                else
                {
                    Response.Write("<script>alert('抱歉,未成功注册!')</script>");
                }
            }
        }
    }
    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;
            }
        }
    }
    private void CounsellorInfoUpdate()
    {
        long lCounsellorID = long.Parse(Session["UsersID"].ToString());
        CounsellorInfoBusiness CounsellorInfoUpdate = new CounsellorInfoBusiness();

        string sNewCounsellorSex;

        if (RBMale.Checked == true)
        {
            sNewCounsellorSex = "男";
        }
        else
        {
            sNewCounsellorSex = "女";
        }
        IMGCounsellorImageUpdate();
        string sCounsellorUpdateImagePath = "WebImages/ClientImages/" + this.sNewFullyCounsellorImagePathAndName;


        string[] saCounsellorAdvantageFieldsUpdate = new string[8];

        for (int iCounter = 0; iCounter < LBXCounsellorAdvantageFieldsSelected.Items.Count; iCounter++)
        {
            saCounsellorAdvantageFieldsUpdate[iCounter] = LBXCounsellorAdvantageFieldsSelected.Items[iCounter].ToString();
        }

        for (int iCounter = 0; iCounter < saCounsellorAdvantageFieldsUpdate.Length; iCounter++)
        {
            if (saCounsellorAdvantageFieldsUpdate[iCounter] == null)
            {
                saCounsellorAdvantageFieldsUpdate[iCounter] = "待定";
            }
        }

        int iResultJudgement;

        if (this.sNewFullyCounsellorImagePathAndName.Substring(this.sNewFullyCounsellorImagePathAndName.Length - 1, 1) != "N")
        {
            //如果上传图片,则更新图片路径
            iResultJudgement = CounsellorInfoUpdate.CounsellorInfoUpdate(TBCounsellorPassword.Text, TBCounsellorName.Text, sNewCounsellorSex, int.Parse(DDLCounsellorAge.SelectedValue), TBCounsellorEmail.Text, sCounsellorUpdateImagePath, saCounsellorAdvantageFieldsUpdate, lCounsellorID);
            if (iResultJudgement > 0)
            {
                Response.Write("<script>alert('信息已修改!')</script>");
            }
            else
            {
                Response.Write("<script>alert('信息未修改!')</script>");
            }
        }
        else
        {
            //如果未上传图片,则不更新图片路径
            iResultJudgement = CounsellorInfoUpdate.CounsellorInfoUpdate(TBCounsellorPassword.Text, TBCounsellorName.Text, sNewCounsellorSex, int.Parse(DDLCounsellorAge.SelectedValue), TBCounsellorEmail.Text, saCounsellorAdvantageFieldsUpdate, lCounsellorID);;
            if (iResultJudgement > 0)
            {
                Response.Write("<script>alert('信息已修改!')</script>");
            }
            else
            {
                Response.Write("<script>alert('信息未修改!')</script>");
            }
        }
    }
    protected void DLWantedAnswerInfo_ItemCommand(object source, DataListCommandEventArgs e)
    {
        Button             BTNSelectAsAnswer = (Button)e.Item.FindControl("BTNSelectAsAnswer");
        Label              LBLAnswerID       = (Label)e.Item.FindControl("LBLAnswerID");
        WantedInfoBusiness SetTargetAsAnswer = new WantedInfoBusiness();
        int iReturnedValue = 0;

        if (e.CommandName == "BTNSelectAsAnswer")
        {
            //当客户登录时,若没有选定的答案,则点击后可设置最佳答案
            iReturnedValue = SetTargetAsAnswer.SetAsAnswer(long.Parse(LBLAnswerID.Text));
            if (iReturnedValue > 0)
            {
                long lWantedID = long.Parse(Request.QueryString["WantedID"].ToString());
                CounsellorInfoBusiness CounsellorInfo = new CounsellorInfoBusiness();
                ClientInfoBusiness     ClientInfo     = new ClientInfoBusiness();

                long lCounsellorID = CounsellorInfo.GetCounsellorIDByAnswerID(long.Parse(LBLAnswerID.Text));
                long lClientID     = ClientInfo.GetClientIDByWantedID(lWantedID);

                WantedInfoBusiness WantedQuestionDetailsInfoSearch = new WantedInfoBusiness();
                WantedQuestionDetailsInfoEntity WantedQuestionInfo = new WantedQuestionDetailsInfoEntity();
                WantedQuestionInfo = WantedQuestionDetailsInfoSearch.WantedQuestionDetailsInfoByID(lWantedID);
                long lBountyMoney = WantedQuestionInfo.lwantedBounty;
                LBLWantedField.Text = lBountyMoney.ToString();
                ClientInfo.ClientWantedBountyMoney(lBountyMoney, lClientID);
                CounsellorInfo.CounsellorWalletMoneyUpdate(lCounsellorID, lBountyMoney);

                Response.Write("<script>alert('成功设置为答案!')</script>");
            }
            else
            {
                Response.Write("<script>alert('设置为答案失败!')</script>");
            }
        }

        /**
         * 任何身份都可以点赞,包括游客
         */
        else if (e.CommandName == "BTNRespondLikedCount")
        {
            //点了点赞后,让点赞数+1
            iReturnedValue = SetTargetAsAnswer.RespondLiked(long.Parse(LBLAnswerID.Text));
            if (iReturnedValue > 0)
            {
                Response.Write("<script>alert('您赞了此答案!')</script>");
            }
            else
            {
                Response.Write("<script>alert('点赞失败!!')</script>");
            }
        }
        else if (e.CommandName == "BTNRespondDislikedCount")
        { //点了点踩后,让点踩数+1
            iReturnedValue = SetTargetAsAnswer.RespondDisliked(long.Parse(LBLAnswerID.Text));
            if (iReturnedValue > 0)
            {
                Response.Write("<script>alert('您踩了此答案!')</script>");
            }
            else
            {
                Response.Write("<script>alert('点踩失败!')</script>");
            }
        }
    }