Beispiel #1
0
 protected void BTNDeleteALLSelectedInfo_Click(object sender, EventArgs e)
 {
     if (RBDeleteALLClientInfo.Checked == true)
     {
         Response.Write("<script>alert('已删除全部客户信息!')</script>");
     }
     else if (RBDeleteALLBlackListInfo.Checked == true)
     {
         BlackListInfoBusiness DeleteBlackList = new BlackListInfoBusiness();
         int iReturnValue = DeleteBlackList.DeleteAllBlackListInfo();
         if (iReturnValue > 0)
         {
             Response.Write("<script>alert('已删除全部黑名单信息!')</script>");
         }
     }
     else if (RBDeleteALLGiftInfo.Checked == true)
     {
         GiftInfoBusiness DeleteGift = new GiftInfoBusiness();
         int iReturnValue            = DeleteGift.DeleteAllGiftInfo();
         if (iReturnValue > 0)
         {
             Response.Write("<script>alert('已删除全部礼品信息!')</script>");
         }
     }
     else if (RBDeleteALLArticleInfo.Checked == true)
     {
         ArticleInfoBusiness DeleteArticle = new ArticleInfoBusiness();
         int iReturnValue = DeleteArticle.DeleteAllArticleInfo();
         if (iReturnValue > 0)
         {
             Response.Write("<script>alert('已删除全部文章信息!')</script>");
         }
     }
     else
     {
         Response.Write("<script>alert('已取消!')</script>");
     }
 }
Beispiel #2
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>");
                }
            }
        }
    }