Esempio n. 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string str  = "";
            string str2 = this.Session["user_name"].ToString();
            object obj1 = this.Session[str2 + "lottery_session_user_info"];

            if (this.Session["child_user_name"] != null)
            {
                str = str2 + "-" + this.Session["child_user_name"].ToString();
            }
            else
            {
                str = str2;
            }
            LSRequest.qq("url");
            string str3 = LSRequest.qq("data").ToString().Replace(""", "\"");
            string str4 = LSRequest.qq("action");
            string str5 = LSRequest.qq("error");

            FileCacheHelper.LogAjaxError("AjaxParseException =>" + str + "|" + str4 + "|" + str5 + "|" + str3, "agent");
        }
Esempio n. 2
0
        protected void PublishLive_OnClick(object sender, EventArgs e)
        {
            var returnObj = ((MediaDetail)selectedItem).PublishLive();

            if (!returnObj.IsError)
            {
                ContextHelper.Clear(ContextType.Cache);
                FileCacheHelper.ClearAllCache();

                //if (selectedItem.AbsoluteUrl != liveVersion.AbsoluteUrl)
                //    ChangeLinksForAllMediaDetails(liveVersion.AbsoluteUrl, selectedItem.AbsoluteUrl);

                OnPublishExecuteCode();

                RedirectToAdminUrl(selectedItem);
            }
            else
            {
                DisplayErrorMessage("Error Pushing LIVE", returnObj.Error);
            }
        }
        private void SetShowInMenuStatus(MediaDetail detail, bool showInMenu)
        {
            if ((detail == null) || (detail.ShowInMenu == showInMenu))
            {
                return;
            }

            detail            = BaseMapper.GetObjectFromContext(detail);
            detail.ShowInMenu = showInMenu;

            Return returnObj = MediaDetailsMapper.Update(detail);

            if (returnObj.IsError)
            {
                throw returnObj.Error.Exception;
            }
            else
            {
                ContextHelper.ClearAllMemoryCache();
                FileCacheHelper.DeleteCacheDir("generatenav");
            }
        }
Esempio n. 4
0
 private void InitData()
 {
     if (!string.IsNullOrEmpty(this.lottrty_six))
     {
         if (this.cz_saleset_six_model.get_flag().Equals(1))
         {
             DataSet set = null;
             if (!FileCacheHelper.get_IsShowLM_B())
             {
                 set = CallBLL.cz_drawback_six_bll.GetDrawBackList_Ex(this.cz_saleset_six_model.get_u_name(), DESEncrypt.DecryptStringDES(this.cz_saleset_six_model.get_sqlconn(), this.cz_saleset_six_model.get_salt()), "91060,91061,91062,91063,91064,91065");
             }
             else
             {
                 set = CallBLL.cz_drawback_six_bll.GetDrawBackList_Ex(this.cz_saleset_six_model.get_u_name(), DESEncrypt.DecryptStringDES(this.cz_saleset_six_model.get_sqlconn(), this.cz_saleset_six_model.get_salt()));
             }
             this.table_six = set.Tables[0];
         }
         else
         {
             DataSet drawBackList = null;
             if (!FileCacheHelper.get_IsShowLM_B())
             {
                 drawBackList = CallBLL.cz_drawback_six_bll.User_GetDrawBackList(this.cz_saleset_six_model.get_u_name(), "91060,91061,91062,91063,91064,91065");
             }
             else
             {
                 drawBackList = CallBLL.cz_drawback_six_bll.GetDrawBackList(this.cz_saleset_six_model.get_u_name());
             }
             if (((drawBackList != null) && (drawBackList.Tables.Count > 0)) && (drawBackList.Tables[0].Rows.Count > 0))
             {
                 this.table_six = drawBackList.Tables[0];
                 DataTable zJDrawback = CallBLL.cz_drawback_six_bll.GetZJDrawback();
                 this.DICT.Add("six", this.GetUpDrawbackSix(zJDrawback, "six", this.cz_saleset_six_model.get_six_kind()));
             }
         }
     }
 }
Esempio n. 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string str = this.Session["user_name"].ToString();
            agent_userinfo_session model = this.Session[str + "lottery_session_user_info"] as agent_userinfo_session;

            if (((!model.get_u_type().Trim().Equals("zj") && !model.get_u_type().Trim().Equals("fgs")) && (!model.get_u_type().Trim().Equals("gd") && !model.get_u_type().Trim().Equals("zd"))) && !model.get_u_type().Trim().Equals("dl"))
            {
                base.Response.Redirect("../MessagePage.aspx?code=u100035&url=&issuccess=1&isback=0&isopen=1");
                base.Response.End();
            }
            if (this.Session["child_user_name"] != null)
            {
                base.Response.Redirect("../MessagePage.aspx?code=u100014&url=&issuccess=1&isback=0&isopen=1");
                base.Response.End();
            }
            base.Permission_Aspx_ZJ(model, "po_2_1");
            base.Permission_Aspx_DL(model, "po_6_1");
            base.GetLotteryList();
            this.page = LSRequest.qq("page");
            if (string.IsNullOrEmpty(this.page))
            {
                this.page = "1";
            }
            if (int.Parse(this.page) < 1)
            {
                this.page = "1";
            }
            if (FileCacheHelper.get_RedisStatOnline().Equals(1) || FileCacheHelper.get_RedisStatOnline().Equals(2))
            {
                this.childTable = CallBLL.cz_users_child_bll.GetChildList(str, Convert.ToInt32(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, "redis");
            }
            else
            {
                this.childTable = CallBLL.cz_users_child_bll.GetChildList(str, Convert.ToInt32(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount);
            }
            this.CurUrl = string.Format("?page={0}", this.page);
        }
Esempio n. 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string str = this.Session["user_name"].ToString();

            this.uModel = this.Session[str + "lottery_session_user_info"] as agent_userinfo_session;
            if (!this.uModel.get_u_type().Equals("fgs"))
            {
                base.Response.Redirect("/MessagePage.aspx?code=u100057&url=&issuccess=1&isback=0");
                base.Response.End();
            }
            if (this.uModel.get_u_type().Equals("fgs") && (this.uModel.get_six_op_odds().Equals(1) || this.uModel.get_kc_op_odds().Equals(1)))
            {
                base.Permission_Aspx_DL(this.uModel, "po_5_3");
            }
            else
            {
                base.Response.Redirect("/MessagePage.aspx?code=u100057&url=&issuccess=1&isback=0");
                base.Response.End();
            }
            this.lid       = LSRequest.qq("lid");
            this.lotteryDT = base.GetLotteryList();
            base.IsLotteryExist(this.lid, "u100032", "1", "");
            if (!this.uModel.get_six_op_odds().Equals(1))
            {
                int num2 = 100;
                if (this.lid.Equals(num2.ToString()))
                {
                    this.lid = this.lotteryDT.Select(string.Format(" id<>{0} ", 100))[0]["id"].ToString();
                }
            }
            if (!this.uModel.get_kc_op_odds().Equals(1))
            {
                int num3 = 100;
                if (!this.lid.Equals(num3.ToString()))
                {
                    this.lid = 100.ToString();
                }
            }
            this.InitSelect(this.lid);
            this.InitDataTable();
            if (!LSRequest.qq("submitHdn").Equals("submit"))
            {
                return;
            }
            int num = 0;

            if (this.uModel.get_six_op_odds().Equals(1))
            {
                int num5 = 100;
                if (this.lid.Equals(num5.ToString()))
                {
                    num = CallBLL.cz_odds_wt_six_bll.RestOddsWT(this.uModel.get_u_name());
                    FileCacheHelper.UpdateFGSWTFile(100);
                }
            }
            if (this.uModel.get_kc_op_odds().Equals(1))
            {
                int num6 = 100;
                if (!this.lid.Equals(num6.ToString()) && (this.lotteryDT.Select(string.Format(" id={0} ", this.lid)).Length > 0))
                {
                    switch (int.Parse(this.lid))
                    {
                    case 0:
                        num = CallBLL.cz_odds_wt_kl10_bll.RestOddsWT(this.uModel.get_u_name());
                        FileCacheHelper.UpdateFGSWTFile(0);
                        goto Label_0645;

                    case 1:
                        num = CallBLL.cz_odds_wt_cqsc_bll.RestOddsWT(this.uModel.get_u_name());
                        FileCacheHelper.UpdateFGSWTFile(1);
                        goto Label_0645;

                    case 2:
                        num = CallBLL.cz_odds_wt_pk10_bll.RestOddsWT(this.uModel.get_u_name());
                        FileCacheHelper.UpdateFGSWTFile(2);
                        goto Label_0645;

                    case 3:
                        num = CallBLL.cz_odds_wt_xync_bll.RestOddsWT(this.uModel.get_u_name());
                        FileCacheHelper.UpdateFGSWTFile(3);
                        goto Label_0645;

                    case 4:
                        num = CallBLL.cz_odds_wt_jsk3_bll.RestOddsWT(this.uModel.get_u_name());
                        FileCacheHelper.UpdateFGSWTFile(4);
                        goto Label_0645;

                    case 5:
                        num = CallBLL.cz_odds_wt_kl8_bll.RestOddsWT(this.uModel.get_u_name());
                        FileCacheHelper.UpdateFGSWTFile(5);
                        goto Label_0645;

                    case 6:
                        num = CallBLL.cz_odds_wt_k8sc_bll.RestOddsWT(this.uModel.get_u_name());
                        FileCacheHelper.UpdateFGSWTFile(6);
                        goto Label_0645;

                    case 7:
                        num = CallBLL.cz_odds_wt_pcdd_bll.RestOddsWT(this.uModel.get_u_name());
                        FileCacheHelper.UpdateFGSWTFile(7);
                        goto Label_0645;

                    case 8:
                        num = CallBLL.cz_odds_wt_pkbjl_bll.RestOddsWT(this.uModel.get_u_name());
                        FileCacheHelper.UpdateFGSWTFile(8);
                        goto Label_0645;

                    case 9:
                        num = CallBLL.cz_odds_wt_xyft5_bll.RestOddsWT(this.uModel.get_u_name());
                        FileCacheHelper.UpdateFGSWTFile(9);
                        goto Label_0645;

                    case 10:
                        num = CallBLL.cz_odds_wt_jscar_bll.RestOddsWT(this.uModel.get_u_name());
                        FileCacheHelper.UpdateFGSWTFile(10);
                        goto Label_0645;

                    case 11:
                        num = CallBLL.cz_odds_wt_speed5_bll.RestOddsWT(this.uModel.get_u_name());
                        FileCacheHelper.UpdateFGSWTFile(11);
                        goto Label_0645;

                    case 12:
                        num = CallBLL.cz_odds_wt_jspk10_bll.RestOddsWT(this.uModel.get_u_name());
                        FileCacheHelper.UpdateFGSWTFile(12);
                        goto Label_0645;

                    case 13:
                        num = CallBLL.cz_odds_wt_jscqsc_bll.RestOddsWT(this.uModel.get_u_name());
                        FileCacheHelper.UpdateFGSWTFile(13);
                        goto Label_0645;

                    case 14:
                        num = CallBLL.cz_odds_wt_jssfc_bll.RestOddsWT(this.uModel.get_u_name());
                        FileCacheHelper.UpdateFGSWTFile(14);
                        goto Label_0645;

                    case 15:
                        num = CallBLL.cz_odds_wt_jsft2_bll.RestOddsWT(this.uModel.get_u_name());
                        FileCacheHelper.UpdateFGSWTFile(15);
                        goto Label_0645;

                    case 0x10:
                        num = CallBLL.cz_odds_wt_car168_bll.RestOddsWT(this.uModel.get_u_name());
                        FileCacheHelper.UpdateFGSWTFile(0x10);
                        goto Label_0645;

                    case 0x11:
                        num = CallBLL.cz_odds_wt_ssc168_bll.RestOddsWT(this.uModel.get_u_name());
                        FileCacheHelper.UpdateFGSWTFile(0x11);
                        goto Label_0645;

                    case 0x12:
                        num = CallBLL.cz_odds_wt_vrcar_bll.RestOddsWT(this.uModel.get_u_name());
                        FileCacheHelper.UpdateFGSWTFile(0x12);
                        goto Label_0645;

                    case 0x13:
                        num = CallBLL.cz_odds_wt_vrssc_bll.RestOddsWT(this.uModel.get_u_name());
                        FileCacheHelper.UpdateFGSWTFile(0x13);
                        goto Label_0645;

                    case 20:
                        num = CallBLL.cz_odds_wt_xyftoa_bll.RestOddsWT(this.uModel.get_u_name());
                        FileCacheHelper.UpdateFGSWTFile(20);
                        goto Label_0645;

                    case 0x15:
                        num = CallBLL.cz_odds_wt_xyftsg_bll.RestOddsWT(this.uModel.get_u_name());
                        FileCacheHelper.UpdateFGSWTFile(0x15);
                        goto Label_0645;

                    case 0x16:
                        num = CallBLL.cz_odds_wt_happycar_bll.RestOddsWT(this.uModel.get_u_name());
                        FileCacheHelper.UpdateFGSWTFile(0x16);
                        goto Label_0645;
                    }
                    base.Response.End();
                }
            }
Label_0645:
            if (num <= 0)
            {
                string url = "/OddsSet/OddsWT.aspx?lid=" + this.lid;
                base.Response.Write(base.ShowDialogBox(string.Format(PageBase.GetMessageByCache("u100073", "MessageHint"), base.GetGameNameByID(this.lid)), url, 0));
                base.Response.End();
            }
            else
            {
                switch (int.Parse(this.lid))
                {
                case 0:
                    base.fgs_reset_zero_wt_log(0);
                    break;

                case 1:
                    base.fgs_reset_zero_wt_log(1);
                    break;

                case 2:
                    base.fgs_reset_zero_wt_log(2);
                    break;

                case 3:
                    base.fgs_reset_zero_wt_log(3);
                    break;

                case 4:
                    base.fgs_reset_zero_wt_log(4);
                    break;

                case 5:
                    base.fgs_reset_zero_wt_log(5);
                    break;

                case 6:
                    base.fgs_reset_zero_wt_log(6);
                    break;

                case 7:
                    base.fgs_reset_zero_wt_log(7);
                    break;

                case 8:
                    base.fgs_reset_zero_wt_log(8);
                    break;

                case 9:
                    base.fgs_reset_zero_wt_log(9);
                    break;

                case 10:
                    base.fgs_reset_zero_wt_log(10);
                    break;

                case 11:
                    base.fgs_reset_zero_wt_log(11);
                    break;

                case 12:
                    base.fgs_reset_zero_wt_log(12);
                    break;

                case 13:
                    base.fgs_reset_zero_wt_log(13);
                    break;

                case 14:
                    base.fgs_reset_zero_wt_log(14);
                    break;

                case 15:
                    base.fgs_reset_zero_wt_log(15);
                    break;

                case 0x10:
                    base.fgs_reset_zero_wt_log(0x10);
                    break;

                case 0x11:
                    base.fgs_reset_zero_wt_log(0x11);
                    break;

                case 0x12:
                    base.fgs_reset_zero_wt_log(0x12);
                    break;

                case 0x13:
                    base.fgs_reset_zero_wt_log(0x13);
                    break;

                case 20:
                    base.fgs_reset_zero_wt_log(20);
                    break;

                case 0x15:
                    base.fgs_reset_zero_wt_log(0x15);
                    break;

                case 0x16:
                    base.fgs_reset_zero_wt_log(0x16);
                    break;

                case 100:
                    base.fgs_reset_zero_wt_log(100);
                    break;

                default:
                    base.Response.End();
                    break;
                }
                string str3 = string.Format("/OddsSet/OddsWT.aspx?lid={0}&rest=1", this.lid);
                base.Response.Write(base.ShowDialogBox(string.Format(PageBase.GetMessageByCache("u100072", "MessageHint"), base.GetGameNameByID(this.lid)), str3, 0));
                base.Response.End();
            }
        }
Esempio n. 7
0
        private void InitDataTable()
        {
            if (this.uModel.get_six_op_odds().Equals(1) && !this.uModel.get_kc_op_odds().Equals(1))
            {
                if (!FileCacheHelper.get_IsShowLM_B())
                {
                    this.sixDataTable = CallBLL.cz_odds_wt_six_bll.GetOddsWT(this.uModel.get_u_name(), "91060,91061,91062,91063,91064,91065");
                }
                else
                {
                    this.sixDataTable = CallBLL.cz_odds_wt_six_bll.GetOddsWT(this.uModel.get_u_name());
                }
                this.lid = 100.ToString();
            }
            if (!this.uModel.get_six_op_odds().Equals(1) && this.uModel.get_kc_op_odds().Equals(1))
            {
                switch (int.Parse(this.lid))
                {
                case 0:
                    this.kl10DataTable = CallBLL.cz_odds_wt_kl10_bll.GetOddsWT(this.uModel.get_u_name());
                    break;

                case 1:
                    this.cqscDataTable = CallBLL.cz_odds_wt_cqsc_bll.GetOddsWT(this.uModel.get_u_name());
                    break;

                case 2:
                    this.pk10DataTable = CallBLL.cz_odds_wt_pk10_bll.GetOddsWT(this.uModel.get_u_name());
                    break;

                case 3:
                    this.xyncDataTable = CallBLL.cz_odds_wt_xync_bll.GetOddsWT(this.uModel.get_u_name());
                    break;

                case 4:
                    this.jsk3DataTable = CallBLL.cz_odds_wt_jsk3_bll.GetOddsWT(this.uModel.get_u_name());
                    break;

                case 5:
                    this.kl8DataTable = CallBLL.cz_odds_wt_kl8_bll.GetOddsWT(this.uModel.get_u_name());
                    break;

                case 6:
                    this.k8scDataTable = CallBLL.cz_odds_wt_k8sc_bll.GetOddsWT(this.uModel.get_u_name());
                    break;

                case 7:
                    this.pcddDataTable = CallBLL.cz_odds_wt_pcdd_bll.GetOddsWT(this.uModel.get_u_name());
                    break;

                case 8:
                    this.pkbjlDataTable = CallBLL.cz_odds_wt_pkbjl_bll.GetOddsWT(this.uModel.get_u_name());
                    break;

                case 9:
                    this.xyft5DataTable = CallBLL.cz_odds_wt_xyft5_bll.GetOddsWT(this.uModel.get_u_name());
                    break;

                case 10:
                    this.jscarDataTable = CallBLL.cz_odds_wt_jscar_bll.GetOddsWT(this.uModel.get_u_name());
                    break;

                case 11:
                    this.speed5DataTable = CallBLL.cz_odds_wt_speed5_bll.GetOddsWT(this.uModel.get_u_name());
                    break;

                case 12:
                    this.jspk10DataTable = CallBLL.cz_odds_wt_jspk10_bll.GetOddsWT(this.uModel.get_u_name());
                    break;

                case 13:
                    this.jscqscDataTable = CallBLL.cz_odds_wt_jscqsc_bll.GetOddsWT(this.uModel.get_u_name());
                    break;

                case 14:
                    this.jssfcDataTable = CallBLL.cz_odds_wt_jssfc_bll.GetOddsWT(this.uModel.get_u_name());
                    break;

                case 15:
                    this.jsft2DataTable = CallBLL.cz_odds_wt_jsft2_bll.GetOddsWT(this.uModel.get_u_name());
                    break;

                case 0x10:
                    this.jscarDataTable = CallBLL.cz_odds_wt_car168_bll.GetOddsWT(this.uModel.get_u_name());
                    break;

                case 0x11:
                    this.speed5DataTable = CallBLL.cz_odds_wt_ssc168_bll.GetOddsWT(this.uModel.get_u_name());
                    break;

                case 0x12:
                    this.jscarDataTable = CallBLL.cz_odds_wt_vrcar_bll.GetOddsWT(this.uModel.get_u_name());
                    break;

                case 0x13:
                    this.vrsscDataTable = CallBLL.cz_odds_wt_vrssc_bll.GetOddsWT(this.uModel.get_u_name());
                    break;

                case 20:
                    this.xyftoaDataTable = CallBLL.cz_odds_wt_xyftoa_bll.GetOddsWT(this.uModel.get_u_name());
                    break;

                case 0x15:
                    this.xyftsgDataTable = CallBLL.cz_odds_wt_xyftsg_bll.GetOddsWT(this.uModel.get_u_name());
                    break;

                case 0x16:
                    this.happycarDataTable = CallBLL.cz_odds_wt_happycar_bll.GetOddsWT(this.uModel.get_u_name());
                    break;
                }
            }
            if (this.uModel.get_six_op_odds().Equals(1) && this.uModel.get_kc_op_odds().Equals(1))
            {
                switch (int.Parse(this.lid))
                {
                case 0:
                    this.kl10DataTable = CallBLL.cz_odds_wt_kl10_bll.GetOddsWT(this.uModel.get_u_name());
                    return;

                case 1:
                    this.cqscDataTable = CallBLL.cz_odds_wt_cqsc_bll.GetOddsWT(this.uModel.get_u_name());
                    return;

                case 2:
                    this.pk10DataTable = CallBLL.cz_odds_wt_pk10_bll.GetOddsWT(this.uModel.get_u_name());
                    return;

                case 3:
                    this.xyncDataTable = CallBLL.cz_odds_wt_xync_bll.GetOddsWT(this.uModel.get_u_name());
                    return;

                case 4:
                    this.jsk3DataTable = CallBLL.cz_odds_wt_jsk3_bll.GetOddsWT(this.uModel.get_u_name());
                    return;

                case 5:
                    this.kl8DataTable = CallBLL.cz_odds_wt_kl8_bll.GetOddsWT(this.uModel.get_u_name());
                    return;

                case 6:
                    this.k8scDataTable = CallBLL.cz_odds_wt_k8sc_bll.GetOddsWT(this.uModel.get_u_name());
                    return;

                case 7:
                    this.pcddDataTable = CallBLL.cz_odds_wt_pcdd_bll.GetOddsWT(this.uModel.get_u_name());
                    return;

                case 8:
                    this.pkbjlDataTable = CallBLL.cz_odds_wt_pkbjl_bll.GetOddsWT(this.uModel.get_u_name());
                    return;

                case 9:
                    this.xyft5DataTable = CallBLL.cz_odds_wt_xyft5_bll.GetOddsWT(this.uModel.get_u_name());
                    return;

                case 10:
                    this.jscarDataTable = CallBLL.cz_odds_wt_jscar_bll.GetOddsWT(this.uModel.get_u_name());
                    return;

                case 11:
                    this.speed5DataTable = CallBLL.cz_odds_wt_speed5_bll.GetOddsWT(this.uModel.get_u_name());
                    return;

                case 12:
                    this.jspk10DataTable = CallBLL.cz_odds_wt_jspk10_bll.GetOddsWT(this.uModel.get_u_name());
                    return;

                case 13:
                    this.jscqscDataTable = CallBLL.cz_odds_wt_jscqsc_bll.GetOddsWT(this.uModel.get_u_name());
                    return;

                case 14:
                    this.jssfcDataTable = CallBLL.cz_odds_wt_jssfc_bll.GetOddsWT(this.uModel.get_u_name());
                    return;

                case 15:
                    this.jsft2DataTable = CallBLL.cz_odds_wt_jsft2_bll.GetOddsWT(this.uModel.get_u_name());
                    return;

                case 0x10:
                    this.car168DataTable = CallBLL.cz_odds_wt_car168_bll.GetOddsWT(this.uModel.get_u_name());
                    return;

                case 0x11:
                    this.ssc168DataTable = CallBLL.cz_odds_wt_ssc168_bll.GetOddsWT(this.uModel.get_u_name());
                    return;

                case 0x12:
                    this.vrcarDataTable = CallBLL.cz_odds_wt_vrcar_bll.GetOddsWT(this.uModel.get_u_name());
                    return;

                case 0x13:
                    this.vrsscDataTable = CallBLL.cz_odds_wt_vrssc_bll.GetOddsWT(this.uModel.get_u_name());
                    return;

                case 20:
                    this.xyftoaDataTable = CallBLL.cz_odds_wt_xyftoa_bll.GetOddsWT(this.uModel.get_u_name());
                    return;

                case 0x15:
                    this.xyftsgDataTable = CallBLL.cz_odds_wt_xyftsg_bll.GetOddsWT(this.uModel.get_u_name());
                    return;

                case 0x16:
                    this.happycarDataTable = CallBLL.cz_odds_wt_happycar_bll.GetOddsWT(this.uModel.get_u_name());
                    break;

                case 100:
                    if (!FileCacheHelper.get_IsShowLM_B())
                    {
                        this.sixDataTable = CallBLL.cz_odds_wt_six_bll.GetOddsWT(this.uModel.get_u_name(), "91060,91061,91062,91063,91064,91065");
                        return;
                    }
                    this.sixDataTable = CallBLL.cz_odds_wt_six_bll.GetOddsWT(this.uModel.get_u_name());
                    return;

                default:
                    return;
                }
            }
        }
Esempio n. 8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string str = this.Session["user_name"].ToString();
            agent_userinfo_session _session = this.Session[str + "lottery_session_user_info"] as agent_userinfo_session;

            this.u_type = _session.get_u_type().Trim();
            if (!_session.get_u_type().Trim().Equals("zj"))
            {
                base.Response.End();
            }
            if (this.Session["child_user_name"] != null)
            {
                this.isCloneUser = true;
                this.cloneName   = this.Session["child_user_name"].ToString();
            }
            this.page = LSRequest.qq("page");
            if (string.IsNullOrEmpty(this.page))
            {
                this.page = "1";
            }
            else if (int.Parse(this.page) < 1)
            {
                this.page = "1";
            }
            string str2 = LSRequest.qq("q_date");

            if (string.IsNullOrEmpty(str2))
            {
                str2 = DateTime.Now.ToString();
            }
            else
            {
                str2 = Utils.StampToDateTime(str2).ToString();
            }
            DateTime  now       = DateTime.Now;
            Stopwatch stopwatch = new Stopwatch();

            stopwatch.Start();
            if (FileCacheHelper.get_RedisStatOnline().Equals(1))
            {
                this.onlineTable = base.GetOnlineUserByPage(int.Parse(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, Convert.ToDateTime(str2), "redis");
            }
            else if (FileCacheHelper.get_RedisStatOnline().Equals(2))
            {
                this.onlineTable = base.GetOnlineUserByPageStack(int.Parse(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, Convert.ToDateTime(str2), "redis");
            }
            else
            {
                this.onlineTable = CallBLL.cz_stat_online_bll.GetOnlineUserByPage(int.Parse(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, Convert.ToDateTime(str2));
            }
            stopwatch.Stop();
            DateTime time2 = DateTime.Now;
            TimeSpan span  = new TimeSpan();

            span = (TimeSpan)(time2 - now);
            int       seconds    = span.Seconds;
            DateTime  time3      = DateTime.Now;
            Stopwatch stopwatch2 = new Stopwatch();

            stopwatch2.Start();
            if (FileCacheHelper.get_RedisStatOnline().Equals(1))
            {
                this.topTable = base.get_top_online(this.days, "redis");
            }
            else if (FileCacheHelper.get_RedisStatOnline().Equals(2))
            {
                this.topTable = base.get_top_onlineStack(this.days, "redis");
            }
            else
            {
                this.topTable = base.get_top_online(this.days);
            }
            stopwatch2.Stop();
            DateTime time4 = DateTime.Now;
            TimeSpan span2 = new TimeSpan();

            span2 = (TimeSpan)(time4 - time3);
            int num6 = span2.Seconds;

            this.FiledValue = new string[] { Utils.DateTimeToStamp(Convert.ToDateTime(str2)).ToString() };
        }
Esempio n. 9
0
        private void getDrawBack(ref string strResult)
        {
            base.checkLoginByHandler(0);
            string str = this.Session["user_name"].ToString();

            this.userModel = this.Session[str + "lottery_session_user_info"] as agent_userinfo_session;
            if (!this.userModel.get_u_type().Trim().Equals("zj"))
            {
                base.Response.End();
            }
            if (!base.IsOpenBigLottery(1))
            {
                base.Response.End();
            }
            base.Permission_Aspx_ZJ(this.userModel, "po_2_3");
            if ((this.userModel.get_users_child_session() != null) && (this.userModel.get_users_child_session().get_permissions_name().IndexOf("po_2_3") < 0))
            {
                base.Response.End();
            }
            this.userid = LSRequest.qq("uid");
            this.newAdd = LSRequest.qq("isadd");
            string str2 = LSRequest.qq("submitType");

            if ((str2 != "view") && (str2 != "edit"))
            {
                base.Response.End();
            }
            this.newAdd = "0";
            this.cz_saleset_six_model = CallBLL.cz_saleset_six_bll.GetModel(this.userid);
            ReturnResult result = new ReturnResult();
            Dictionary <string, object> dictionary = new Dictionary <string, object>();

            if (this.cz_saleset_six_model == null)
            {
                base.Response.End();
            }
            this.lotteryDT = base.GetLotteryList();
            DataTable table = this.lotteryDT.DefaultView.ToTable(true, new string[] { "master_id" });

            for (int i = 0; i < table.Rows.Count; i++)
            {
                if (Convert.ToInt32(table.Rows[i][0]).Equals(1))
                {
                    this.lottrty_six = table.Rows[i][0].ToString();
                }
                else if (Convert.ToInt32(table.Rows[i][0]).Equals(2))
                {
                    this.lottrty_kc = table.Rows[i][0].ToString();
                }
            }
            if (!string.IsNullOrEmpty(this.lottrty_six))
            {
                this.tabState_six = "on";
            }
            else
            {
                base.Response.Redirect("/Quit.aspx");
            }
            if (this.cz_saleset_six_model.get_six_kind().ToLower() != "0")
            {
                if (this.cz_saleset_six_model.get_six_kind().ToLower() != "a")
                {
                    this.pk_six_a = "display:none;";
                }
                if (this.cz_saleset_six_model.get_six_kind().ToLower() != "b")
                {
                    this.pk_six_b = "display:none;";
                }
                if (this.cz_saleset_six_model.get_six_kind().ToLower() != "c")
                {
                    this.pk_six_c = "display:none;";
                }
            }
            else
            {
                this.pk_six_a = "display:;";
                this.pk_six_b = "display:;";
                this.pk_six_c = "display:;";
            }
            this.InitData();
            this.InitShortCut_SIX(this.cz_saleset_six_model.get_six_kind(), this.cz_saleset_six_model);
            switch (str2)
            {
            case "view":
            {
                string str3 = "1";
                Dictionary <string, object> dictionary2 = new Dictionary <string, object>();
                dictionary2.Add("disabled", str3);
                dictionary2.Add("userKind", this.cz_saleset_six_model.get_six_kind());
                dictionary2.Add("A", this.six_tm_pk_a);
                dictionary2.Add("B", this.six_tm_pk_b);
                dictionary2.Add("C", this.six_tm_pk_c);
                dictionary2.Add("dzMaxAmount", this.six_tm_max_amount);
                dictionary2.Add("dqMaxAmount", this.six_tm_phase_amount);
                dictionary2.Add("dzMinAmount", this.six_tm_single_min_amount);
                dictionary.Add("SixTM", dictionary2);
                Dictionary <string, object> dictionary3 = new Dictionary <string, object>();
                dictionary3.Add("disabled", str3);
                dictionary3.Add("userKind", this.cz_saleset_six_model.get_six_kind());
                dictionary3.Add("A", this.six_lmp_pk_a);
                dictionary3.Add("B", this.six_lmp_pk_b);
                dictionary3.Add("C", this.six_lmp_pk_c);
                dictionary3.Add("dzMaxAmount", this.six_lmp_max_amount);
                dictionary3.Add("dqMaxAmount", this.six_lmp_phase_amount);
                dictionary3.Add("dzMinAmount", this.six_lmp_single_min_amount);
                dictionary.Add("SixLMP", dictionary3);
                Dictionary <string, object> dictionary4 = new Dictionary <string, object>();
                dictionary4.Add("disabled", str3);
                dictionary4.Add("userKind", this.cz_saleset_six_model.get_six_kind());
                dictionary4.Add("A", this.six_lm_pk_a);
                dictionary4.Add("B", this.six_lm_pk_b);
                dictionary4.Add("C", this.six_lm_pk_c);
                dictionary4.Add("dzMaxAmount", this.six_lm_max_amount);
                dictionary4.Add("dqMaxAmount", this.six_lm_phase_amount);
                dictionary4.Add("dzMinAmount", this.six_lm_single_min_amount);
                dictionary.Add("SixLM", dictionary4);
                result.set_success(200);
                dictionary.Add("name", this.cz_saleset_six_model.get_u_name());
                result.set_data(dictionary);
                strResult = base.ObjectToJson(result);
                return;
            }

            case "edit":
            {
                base.En_User_Lock(this.cz_saleset_six_model.get_u_name());
                this.PreDoParam(ref this.namestr);
                this.GetModifyPlays(this.namestr);
                string mess = "";
                if ((this.table_six != null) && !string.IsNullOrEmpty(this.six_modify_playid))
                {
                    this.ValidSix();
                    this.UpdateSix(ref mess);
                    if (!this.newAdd.Equals("1"))
                    {
                        FileCacheHelper.UpdateDrawbackFile(100);
                    }
                }
                base.Un_User_Lock(this.cz_saleset_six_model.get_u_name());
                if (!string.IsNullOrEmpty(mess))
                {
                    base.successOptMsg(mess);
                    return;
                }
                base.successOptMsg("無數據修改!");
                break;
            }
            }
        }
Esempio n. 10
0
        protected void IsLotteryExist(string lotteryId, string msgCode, string isSuccess, string url)
        {
            bool      flag  = false;
            DataTable cache = CacheHelper.GetCache("cz_lottery_FileCacheKey") as DataTable;

            if (cache == null)
            {
                cache = CallBLL.cz_lottery_bll.GetList().Tables[0];
                CacheHelper.SetCache("cz_lottery_FileCacheKey", cache);
                CacheHelper.SetPublicFileCache("cz_lottery_FileCacheKey", cache, PageBase.GetPublicForderPath(FileCacheHelper.get_LotteryCachesFileName()));
            }
            foreach (DataRow row in cache.Rows)
            {
                if (row["id"].ToString().Equals(lotteryId))
                {
                    flag = true;
                    break;
                }
            }
            if (!flag)
            {
                HttpContext.Current.Response.Redirect($"/MessagePage.aspx?code={msgCode}&issuccess={isSuccess}&url={HttpContext.Current.Server.UrlEncode(url)}");
                HttpContext.Current.Response.End();
            }
        }
Esempio n. 11
0
        protected bool IsUserLoginByMobileForAjax()
        {
            string         str;
            cz_stat_online _online;

            if (HttpContext.Current.Session["user_name"] == null)
            {
                this.Session.Abandon();
                return(false);
            }
            if (FileCacheHelper.get_RedisStatOnline().Equals(1))
            {
                if (PageBase.IsNeedPopBrower(HttpContext.Current.Session["user_name"].ToString()))
                {
                    this.Session.Abandon();
                    return(false);
                }
                str = HttpContext.Current.Session["user_name"].ToString();
                if (CallBLL.redisHelper.HashExists("useronline:list", str))
                {
                    _online = CallBLL.redisHelper.HashGet <cz_stat_online>("useronline:list", str);
                    if ((_online != null) && _online.get_is_out().Equals(1))
                    {
                        this.Session.Abandon();
                        return(false);
                    }
                }
            }
            else if (FileCacheHelper.get_RedisStatOnline().Equals(2))
            {
                if (PageBase.IsNeedPopBrower(HttpContext.Current.Session["user_name"].ToString()))
                {
                    this.Session.Abandon();
                    return(false);
                }
                str = HttpContext.Current.Session["user_name"].ToString();
                using (RedisClient client = new RedisClient(RedisConnectSplit.get_RedisIP(), RedisConnectSplit.get_RedisPort(), RedisConnectSplit.get_RedisPassword(), (long)FileCacheHelper.get_GetRedisDBIndex()))
                {
                    client.set_ConnectTimeout(int.Parse(RedisConnectSplit.get_RedisConnectTimeout()));
                    if (client.HashContainsEntry("useronline:list", str))
                    {
                        _online = JsonHandle.JsonToObject <cz_stat_online>(client.GetValueFromHash("useronline:list", str)) as cz_stat_online;
                        if ((_online != null) && _online.get_is_out().Equals(1))
                        {
                            this.Session.Abandon();
                            return(false);
                        }
                    }
                }
            }
            else if (base.IsUserOut(HttpContext.Current.Session["user_name"].ToString()) || PageBase.IsNeedPopBrower(HttpContext.Current.Session["user_name"].ToString()))
            {
                this.Session.Abandon();
                return(false);
            }
            return(true);
        }
Esempio n. 12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!FileCacheHelper.get_ManageZJProfit().Equals("1"))
            {
                base.Response.End();
            }
            Dictionary <string, object> dictionary = new Dictionary <string, object>();

            base.Response.ContentType = "text/json";
            string str  = LSRequest.qq("lotteryType");
            string str2 = LSRequest.qq("lotteryPhase");
            string str3 = LSRequest.qq("validcode");
            string str4 = "0";
            string str5 = "0";
            double num  = 0.0;
            double num2 = 0.0;
            double num3 = 0.0;
            string str6 = "";

            if ((string.IsNullOrEmpty(str) || string.IsNullOrEmpty(str2)) || !str3.Equals(FileCacheHelper.get_ManageZJProfitValidCode()))
            {
                dictionary.Add("code", 400);
                dictionary.Add("tip_info", "參數錯誤!");
                dictionary.Add("lotteryType", str);
                dictionary.Add("phase", str2);
                dictionary.Add("minRate", str4);
                dictionary.Add("maxRate", str5);
                dictionary.Add("sum_amount", num);
                dictionary.Add("sum_profit", num2);
                dictionary.Add("sum_drawback", num3);
                dictionary.Add("data", null);
                base.Response.Write(JsonHandle.ObjectToJson(dictionary));
                base.Response.End();
            }
            str6 = Utils.LotteryTypeById_ccms(str);
            if (string.IsNullOrEmpty(str6))
            {
                dictionary.Add("code", 400);
                dictionary.Add("tip_info", "參數錯誤!");
                dictionary.Add("lotteryType", str);
                dictionary.Add("phase", str2);
                dictionary.Add("minRate", str4);
                dictionary.Add("maxRate", str5);
                dictionary.Add("sum_amount", num);
                dictionary.Add("sum_profit", num2);
                dictionary.Add("sum_drawback", num3);
                dictionary.Add("data", null);
                base.Response.Write(JsonHandle.ObjectToJson(dictionary));
                base.Response.End();
            }
            SqlParameter[] parameterArray2 = new SqlParameter[2];
            SqlParameter   parameter       = new SqlParameter("@lottery_id", SqlDbType.Int)
            {
                Value = str6
            };

            parameterArray2[0] = parameter;
            SqlParameter parameter2 = new SqlParameter("@id_ccms", SqlDbType.NVarChar)
            {
                Value = str
            };

            parameterArray2[1] = parameter2;
            SqlParameter[] parameterArray = parameterArray2;
            DataSet        set            = DbHelperSQL.Query(" select top 1 * from cz_zj_profit_set where lottery_id=@lottery_id and id_ccms=@id_ccms and  (minRate != 0 or maxRate != 0 ) ", parameterArray);

            if (((set != null) && (set.Tables.Count > 0)) && (set.Tables[0].Rows.Count > 0))
            {
                str4 = set.Tables[0].Rows[0]["minRate"].ToString();
                str5 = set.Tables[0].Rows[0]["maxRate"].ToString();
                string    str7  = set.Tables[0].Rows[0]["openTime"].ToString();
                string    str8  = set.Tables[0].Rows[0]["u_type"].ToString();
                string    str9  = set.Tables[0].Rows[0]["u_name"].ToString();
                DataTable table = CallBLL.cz_bet_kc_bll.GetZJTotalsByTime(str6, str7, str8, str9);
                if (table != null)
                {
                    num  = double.Parse(table.Rows[0]["sum_amount"].ToString());
                    num2 = double.Parse(table.Rows[0]["sum_profit"].ToString());
                    num3 = double.Parse(table.Rows[0]["sum_drawback"].ToString());
                }
            }
            int       num4   = 0;
            DataTable table2 = CallBLL.cz_bet_kc_bll.GetZJTotals(str6, str2, ref num4);

            switch (num4)
            {
            case 1:
                dictionary.Add("code", 400);
                dictionary.Add("tip_info", "找不到獎期!");
                break;

            case 2:
                dictionary.Add("code", 400);
                dictionary.Add("tip_info", "該獎期正在開盤中!");
                break;

            default:
                dictionary.Add("code", 200);
                dictionary.Add("tip_info", "");
                break;
            }
            dictionary.Add("lotteryType", str);
            dictionary.Add("phase", str2);
            dictionary.Add("minRate", str4);
            dictionary.Add("maxRate", str5);
            dictionary.Add("sum_amount", num);
            dictionary.Add("sum_profit", num2);
            dictionary.Add("sum_drawback", num3);
            dictionary.Add("data", table2);
            base.Response.Write(JsonHandle.ObjectToJson(dictionary));
            base.Response.End();
        }
Esempio n. 13
0
 public static void Call()
 {
     if (cz_poker_pkbjl_bll == null)
     {
         cz_poker_pkbjl_bll = new cz_poker_pkbjlBLL();
     }
     if (cz_lotteryopen_log_bll == null)
     {
         cz_lotteryopen_log_bll = new cz_lotteryopen_logBLL();
     }
     if (cz_credit_flow_bll == null)
     {
         cz_credit_flow_bll = new cz_credit_flowBLL();
     }
     if (cz_credit_lock_bll == null)
     {
         cz_credit_lock_bll = new cz_credit_lockBLL();
     }
     if (cz_drawback_auto_set_bll == null)
     {
         cz_drawback_auto_set_bll = new cz_drawback_auto_setBLL();
     }
     if (cz_user_psw_err_log_bll == null)
     {
         cz_user_psw_err_log_bll = new cz_user_psw_err_logBLL();
     }
     if (cz_autosale_log_bll == null)
     {
         cz_autosale_log_bll = new cz_autosale_logBLL();
     }
     if (cz_fgs_opt_log_bll == null)
     {
         cz_fgs_opt_log_bll = new cz_fgs_opt_logBLL();
     }
     if (cz_user_change_log_bll == null)
     {
         cz_user_change_log_bll = new cz_user_change_logBLL();
     }
     if (cz_system_log_bll == null)
     {
         cz_system_log_bll = new cz_system_logBLL();
     }
     if (cz_system_set_log_bll == null)
     {
         cz_system_set_log_bll = new cz_system_set_logBLL();
     }
     if (cz_stat_top_online_bll == null)
     {
         cz_stat_top_online_bll = new cz_stat_top_onlineBLL();
     }
     if (cz_stat_online_bll == null)
     {
         cz_stat_online_bll = new cz_stat_onlineBLL();
     }
     if (cz_ad_bll == null)
     {
         cz_ad_bll = new cz_adBLL();
     }
     if (cz_lottery_bll == null)
     {
         cz_lottery_bll = new cz_lotteryBLL();
     }
     if (cz_lottery_config_bll == null)
     {
         cz_lottery_config_bll = new cz_lottery_configBLL();
     }
     if (cz_users_bll == null)
     {
         cz_users_bll = new cz_usersBLL();
     }
     if (cz_users_child_bll == null)
     {
         cz_users_child_bll = new cz_users_childBLL();
     }
     if (cz_permissions_bll == null)
     {
         cz_permissions_bll = new cz_permissionsBLL();
     }
     if (cz_rate_six_bll == null)
     {
         cz_rate_six_bll = new cz_rate_sixBLL();
     }
     if (cz_rate_kc_bll == null)
     {
         cz_rate_kc_bll = new cz_rate_kcBLL();
     }
     if (cz_play_six_bll == null)
     {
         cz_play_six_bll = new cz_play_sixBLL();
     }
     if (cz_play_kl10_bll == null)
     {
         cz_play_kl10_bll = new cz_play_kl10BLL();
     }
     if (cz_play_cqsc_bll == null)
     {
         cz_play_cqsc_bll = new cz_play_cqscBLL();
     }
     if (cz_play_pk10_bll == null)
     {
         cz_play_pk10_bll = new cz_play_pk10BLL();
     }
     if (cz_play_xync_bll == null)
     {
         cz_play_xync_bll = new cz_play_xyncBLL();
     }
     if (cz_play_jsk3_bll == null)
     {
         cz_play_jsk3_bll = new cz_play_jsk3BLL();
     }
     if (cz_play_kl8_bll == null)
     {
         cz_play_kl8_bll = new cz_play_kl8BLL();
     }
     if (cz_play_k8sc_bll == null)
     {
         cz_play_k8sc_bll = new cz_play_k8scBLL();
     }
     if (cz_play_pcdd_bll == null)
     {
         cz_play_pcdd_bll = new cz_play_pcddBLL();
     }
     if (cz_play_pkbjl_bll == null)
     {
         cz_play_pkbjl_bll = new cz_play_pkbjlBLL();
     }
     if (cz_play_xyft5_bll == null)
     {
         cz_play_xyft5_bll = new cz_play_xyft5BLL();
     }
     if (cz_play_jscar_bll == null)
     {
         cz_play_jscar_bll = new cz_play_jscarBLL();
     }
     if (cz_play_speed5_bll == null)
     {
         cz_play_speed5_bll = new cz_play_speed5BLL();
     }
     if (cz_play_jspk10_bll == null)
     {
         cz_play_jspk10_bll = new cz_play_jspk10BLL();
     }
     if (cz_play_jscqsc_bll == null)
     {
         cz_play_jscqsc_bll = new cz_play_jscqscBLL();
     }
     if (cz_play_jssfc_bll == null)
     {
         cz_play_jssfc_bll = new cz_play_jssfcBLL();
     }
     if (cz_play_jsft2_bll == null)
     {
         cz_play_jsft2_bll = new cz_play_jsft2BLL();
     }
     if (cz_play_car168_bll == null)
     {
         cz_play_car168_bll = new cz_play_car168BLL();
     }
     if (cz_play_ssc168_bll == null)
     {
         cz_play_ssc168_bll = new cz_play_ssc168BLL();
     }
     if (cz_play_vrcar_bll == null)
     {
         cz_play_vrcar_bll = new cz_play_vrcarBLL();
     }
     if (cz_play_vrssc_bll == null)
     {
         cz_play_vrssc_bll = new cz_play_vrsscBLL();
     }
     if (cz_play_xyftoa_bll == null)
     {
         cz_play_xyftoa_bll = new cz_play_xyftoaBLL();
     }
     if (cz_play_xyftsg_bll == null)
     {
         cz_play_xyftsg_bll = new cz_play_xyftsgBLL();
     }
     if (cz_play_happycar_bll == null)
     {
         cz_play_happycar_bll = new cz_play_happycarBLL();
     }
     if (cz_odds_six_bll == null)
     {
         cz_odds_six_bll = new cz_odds_sixBLL();
     }
     if (cz_odds_kl10_bll == null)
     {
         cz_odds_kl10_bll = new cz_odds_kl10BLL();
     }
     if (cz_odds_cqsc_bll == null)
     {
         cz_odds_cqsc_bll = new cz_odds_cqscBLL();
     }
     if (cz_odds_pk10_bll == null)
     {
         cz_odds_pk10_bll = new cz_odds_pk10BLL();
     }
     if (cz_odds_xync_bll == null)
     {
         cz_odds_xync_bll = new cz_odds_xyncBLL();
     }
     if (cz_odds_jsk3_bll == null)
     {
         cz_odds_jsk3_bll = new cz_odds_jsk3BLL();
     }
     if (cz_odds_kl8_bll == null)
     {
         cz_odds_kl8_bll = new cz_odds_kl8BLL();
     }
     if (cz_odds_k8sc_bll == null)
     {
         cz_odds_k8sc_bll = new cz_odds_k8scBLL();
     }
     if (cz_odds_pcdd_bll == null)
     {
         cz_odds_pcdd_bll = new cz_odds_pcddBLL();
     }
     if (cz_odds_pkbjl_bll == null)
     {
         cz_odds_pkbjl_bll = new cz_odds_pkbjlBLL();
     }
     if (cz_odds_xyft5_bll == null)
     {
         cz_odds_xyft5_bll = new cz_odds_xyft5BLL();
     }
     if (cz_odds_jscar_bll == null)
     {
         cz_odds_jscar_bll = new cz_odds_jscarBLL();
     }
     if (cz_odds_speed5_bll == null)
     {
         cz_odds_speed5_bll = new cz_odds_speed5BLL();
     }
     if (cz_odds_jspk10_bll == null)
     {
         cz_odds_jspk10_bll = new cz_odds_jspk10BLL();
     }
     if (cz_odds_jscqsc_bll == null)
     {
         cz_odds_jscqsc_bll = new cz_odds_jscqscBLL();
     }
     if (cz_odds_jssfc_bll == null)
     {
         cz_odds_jssfc_bll = new cz_odds_jssfcBLL();
     }
     if (cz_odds_jsft2_bll == null)
     {
         cz_odds_jsft2_bll = new cz_odds_jsft2BLL();
     }
     if (cz_odds_car168_bll == null)
     {
         cz_odds_car168_bll = new cz_odds_car168BLL();
     }
     if (cz_odds_ssc168_bll == null)
     {
         cz_odds_ssc168_bll = new cz_odds_ssc168BLL();
     }
     if (cz_odds_vrcar_bll == null)
     {
         cz_odds_vrcar_bll = new cz_odds_vrcarBLL();
     }
     if (cz_odds_vrssc_bll == null)
     {
         cz_odds_vrssc_bll = new cz_odds_vrsscBLL();
     }
     if (cz_odds_xyftoa_bll == null)
     {
         cz_odds_xyftoa_bll = new cz_odds_xyftoaBLL();
     }
     if (cz_odds_xyftsg_bll == null)
     {
         cz_odds_xyftsg_bll = new cz_odds_xyftsgBLL();
     }
     if (cz_odds_happycar_bll == null)
     {
         cz_odds_happycar_bll = new cz_odds_happycarBLL();
     }
     if (cz_autosale_six_bll == null)
     {
         cz_autosale_six_bll = new cz_autosale_sixBLL();
     }
     if (cz_autosale_kl10_bll == null)
     {
         cz_autosale_kl10_bll = new cz_autosale_kl10BLL();
     }
     if (cz_autosale_cqsc_bll == null)
     {
         cz_autosale_cqsc_bll = new cz_autosale_cqscBLL();
     }
     if (cz_autosale_pk10_bll == null)
     {
         cz_autosale_pk10_bll = new cz_autosale_pk10BLL();
     }
     if (cz_autosale_xync_bll == null)
     {
         cz_autosale_xync_bll = new cz_autosale_xyncBLL();
     }
     if (cz_autosale_jsk3_bll == null)
     {
         cz_autosale_jsk3_bll = new cz_autosale_jsk3BLL();
     }
     if (cz_autosale_kl8_bll == null)
     {
         cz_autosale_kl8_bll = new cz_autosale_kl8BLL();
     }
     if (cz_autosale_k8sc_bll == null)
     {
         cz_autosale_k8sc_bll = new cz_autosale_k8scBLL();
     }
     if (cz_autosale_pcdd_bll == null)
     {
         cz_autosale_pcdd_bll = new cz_autosale_pcddBLL();
     }
     if (cz_autosale_pkbjl_bll == null)
     {
         cz_autosale_pkbjl_bll = new cz_autosale_pkbjlBLL();
     }
     if (cz_autosale_xyft5_bll == null)
     {
         cz_autosale_xyft5_bll = new cz_autosale_xyft5BLL();
     }
     if (cz_autosale_jscar_bll == null)
     {
         cz_autosale_jscar_bll = new cz_autosale_jscarBLL();
     }
     if (cz_autosale_speed5_bll == null)
     {
         cz_autosale_speed5_bll = new cz_autosale_speed5BLL();
     }
     if (cz_autosale_jspk10_bll == null)
     {
         cz_autosale_jspk10_bll = new cz_autosale_jspk10BLL();
     }
     if (cz_autosale_jscqsc_bll == null)
     {
         cz_autosale_jscqsc_bll = new cz_autosale_jscqscBLL();
     }
     if (cz_autosale_jssfc_bll == null)
     {
         cz_autosale_jssfc_bll = new cz_autosale_jssfcBLL();
     }
     if (cz_autosale_jsft2_bll == null)
     {
         cz_autosale_jsft2_bll = new cz_autosale_jsft2BLL();
     }
     if (cz_autosale_car168_bll == null)
     {
         cz_autosale_car168_bll = new cz_autosale_car168BLL();
     }
     if (cz_autosale_ssc168_bll == null)
     {
         cz_autosale_ssc168_bll = new cz_autosale_ssc168BLL();
     }
     if (cz_autosale_vrcar_bll == null)
     {
         cz_autosale_vrcar_bll = new cz_autosale_vrcarBLL();
     }
     if (cz_autosale_vrssc_bll == null)
     {
         cz_autosale_vrssc_bll = new cz_autosale_vrsscBLL();
     }
     if (cz_autosale_xyftoa_bll == null)
     {
         cz_autosale_xyftoa_bll = new cz_autosale_xyftoaBLL();
     }
     if (cz_autosale_xyftsg_bll == null)
     {
         cz_autosale_xyftsg_bll = new cz_autosale_xyftsgBLL();
     }
     if (cz_autosale_happycar_bll == null)
     {
         cz_autosale_happycar_bll = new cz_autosale_happycarBLL();
     }
     if (cz_phase_six_bll == null)
     {
         cz_phase_six_bll = new cz_phase_sixBLL();
     }
     if (cz_phase_kl10_bll == null)
     {
         cz_phase_kl10_bll = new cz_phase_kl10BLL();
     }
     if (cz_phase_cqsc_bll == null)
     {
         cz_phase_cqsc_bll = new cz_phase_cqscBLL();
     }
     if (cz_phase_pk10_bll == null)
     {
         cz_phase_pk10_bll = new cz_phase_pk10BLL();
     }
     if (cz_phase_xync_bll == null)
     {
         cz_phase_xync_bll = new cz_phase_xyncBLL();
     }
     if (cz_phase_jsk3_bll == null)
     {
         cz_phase_jsk3_bll = new cz_phase_jsk3BLL();
     }
     if (cz_phase_kl8_bll == null)
     {
         cz_phase_kl8_bll = new cz_phase_kl8BLL();
     }
     if (cz_phase_k8sc_bll == null)
     {
         cz_phase_k8sc_bll = new cz_phase_k8scBLL();
     }
     if (cz_phase_pcdd_bll == null)
     {
         cz_phase_pcdd_bll = new cz_phase_pcddBLL();
     }
     if (cz_phase_pkbjl_bll == null)
     {
         cz_phase_pkbjl_bll = new cz_phase_pkbjlBLL();
     }
     if (cz_phase_xyft5_bll == null)
     {
         cz_phase_xyft5_bll = new cz_phase_xyft5BLL();
     }
     if (cz_phase_jscar_bll == null)
     {
         cz_phase_jscar_bll = new cz_phase_jscarBLL();
     }
     if (cz_phase_speed5_bll == null)
     {
         cz_phase_speed5_bll = new cz_phase_speed5BLL();
     }
     if (cz_phase_jspk10_bll == null)
     {
         cz_phase_jspk10_bll = new cz_phase_jspk10BLL();
     }
     if (cz_phase_jscqsc_bll == null)
     {
         cz_phase_jscqsc_bll = new cz_phase_jscqscBLL();
     }
     if (cz_phase_jssfc_bll == null)
     {
         cz_phase_jssfc_bll = new cz_phase_jssfcBLL();
     }
     if (cz_phase_jsft2_bll == null)
     {
         cz_phase_jsft2_bll = new cz_phase_jsft2BLL();
     }
     if (cz_phase_car168_bll == null)
     {
         cz_phase_car168_bll = new cz_phase_car168BLL();
     }
     if (cz_phase_ssc168_bll == null)
     {
         cz_phase_ssc168_bll = new cz_phase_ssc168BLL();
     }
     if (cz_phase_vrcar_bll == null)
     {
         cz_phase_vrcar_bll = new cz_phase_vrcarBLL();
     }
     if (cz_phase_vrssc_bll == null)
     {
         cz_phase_vrssc_bll = new cz_phase_vrsscBLL();
     }
     if (cz_phase_xyftoa_bll == null)
     {
         cz_phase_xyftoa_bll = new cz_phase_xyftoaBLL();
     }
     if (cz_phase_xyftsg_bll == null)
     {
         cz_phase_xyftsg_bll = new cz_phase_xyftsgBLL();
     }
     if (cz_phase_happycar_bll == null)
     {
         cz_phase_happycar_bll = new cz_phase_happycarBLL();
     }
     if (cz_drawback_six_bll == null)
     {
         cz_drawback_six_bll = new cz_drawback_sixBLL();
     }
     if (cz_drawback_kl10_bll == null)
     {
         cz_drawback_kl10_bll = new cz_drawback_kl10BLL();
     }
     if (cz_drawback_cqsc_bll == null)
     {
         cz_drawback_cqsc_bll = new cz_drawback_cqscBLL();
     }
     if (cz_drawback_pk10_bll == null)
     {
         cz_drawback_pk10_bll = new cz_drawback_pk10BLL();
     }
     if (cz_drawback_xync_bll == null)
     {
         cz_drawback_xync_bll = new cz_drawback_xyncBLL();
     }
     if (cz_drawback_jsk3_bll == null)
     {
         cz_drawback_jsk3_bll = new cz_drawback_jsk3BLL();
     }
     if (cz_drawback_kl8_bll == null)
     {
         cz_drawback_kl8_bll = new cz_drawback_kl8BLL();
     }
     if (cz_drawback_k8sc_bll == null)
     {
         cz_drawback_k8sc_bll = new cz_drawback_k8scBLL();
     }
     if (cz_drawback_pcdd_bll == null)
     {
         cz_drawback_pcdd_bll = new cz_drawback_pcddBLL();
     }
     if (cz_drawback_pkbjl_bll == null)
     {
         cz_drawback_pkbjl_bll = new cz_drawback_pkbjlBLL();
     }
     if (cz_drawback_xyft5_bll == null)
     {
         cz_drawback_xyft5_bll = new cz_drawback_xyft5BLL();
     }
     if (cz_drawback_jscar_bll == null)
     {
         cz_drawback_jscar_bll = new cz_drawback_jscarBLL();
     }
     if (cz_drawback_speed5_bll == null)
     {
         cz_drawback_speed5_bll = new cz_drawback_speed5BLL();
     }
     if (cz_drawback_jspk10_bll == null)
     {
         cz_drawback_jspk10_bll = new cz_drawback_jspk10BLL();
     }
     if (cz_drawback_jscqsc_bll == null)
     {
         cz_drawback_jscqsc_bll = new cz_drawback_jscqscBLL();
     }
     if (cz_drawback_jssfc_bll == null)
     {
         cz_drawback_jssfc_bll = new cz_drawback_jssfcBLL();
     }
     if (cz_drawback_jsft2_bll == null)
     {
         cz_drawback_jsft2_bll = new cz_drawback_jsft2BLL();
     }
     if (cz_drawback_car168_bll == null)
     {
         cz_drawback_car168_bll = new cz_drawback_car168BLL();
     }
     if (cz_drawback_ssc168_bll == null)
     {
         cz_drawback_ssc168_bll = new cz_drawback_ssc168BLL();
     }
     if (cz_drawback_vrcar_bll == null)
     {
         cz_drawback_vrcar_bll = new cz_drawback_vrcarBLL();
     }
     if (cz_drawback_vrssc_bll == null)
     {
         cz_drawback_vrssc_bll = new cz_drawback_vrsscBLL();
     }
     if (cz_drawback_xyftoa_bll == null)
     {
         cz_drawback_xyftoa_bll = new cz_drawback_xyftoaBLL();
     }
     if (cz_drawback_xyftsg_bll == null)
     {
         cz_drawback_xyftsg_bll = new cz_drawback_xyftsgBLL();
     }
     if (cz_drawback_happycar_bll == null)
     {
         cz_drawback_happycar_bll = new cz_drawback_happycarBLL();
     }
     if (cz_drawback_six_tpl_bll == null)
     {
         cz_drawback_six_tpl_bll = new cz_drawback_six_tplBLL();
     }
     if (cz_drawback_kl10_tpl_bll == null)
     {
         cz_drawback_kl10_tpl_bll = new cz_drawback_kl10_tplBLL();
     }
     if (cz_drawback_cqsc_tpl_bll == null)
     {
         cz_drawback_cqsc_tpl_bll = new cz_drawback_cqsc_tplBLL();
     }
     if (cz_drawback_pk10_tpl_bll == null)
     {
         cz_drawback_pk10_tpl_bll = new cz_drawback_pk10_tplBLL();
     }
     if (cz_drawback_jsft2_tpl_bll == null)
     {
         cz_drawback_jsft2_tpl_bll = new cz_drawback_jsft2_tplBLL();
     }
     if (cz_drawback_jspk10_tpl_bll == null)
     {
         cz_drawback_jspk10_tpl_bll = new cz_drawback_jspk10_tplBLL();
     }
     if (cz_drawback_jscqsc_tpl_bll == null)
     {
         cz_drawback_jscqsc_tpl_bll = new cz_drawback_jscqsc_tplBLL();
     }
     if (cz_drawback_jssfc_tpl_bll == null)
     {
         cz_drawback_jssfc_tpl_bll = new cz_drawback_jssfc_tplBLL();
     }
     if (cz_drawback_xync_tpl_bll == null)
     {
         cz_drawback_xync_tpl_bll = new cz_drawback_xync_tplBLL();
     }
     if (cz_drawback_jsk3_tpl_bll == null)
     {
         cz_drawback_jsk3_tpl_bll = new cz_drawback_jsk3_tplBLL();
     }
     if (cz_drawback_kl8_tpl_bll == null)
     {
         cz_drawback_kl8_tpl_bll = new cz_drawback_kl8_tplBLL();
     }
     if (cz_drawback_k8sc_tpl_bll == null)
     {
         cz_drawback_k8sc_tpl_bll = new cz_drawback_k8sc_tplBLL();
     }
     if (cz_drawback_pcdd_tpl_bll == null)
     {
         cz_drawback_pcdd_tpl_bll = new cz_drawback_pcdd_tplBLL();
     }
     if (cz_drawback_xyft5_tpl_bll == null)
     {
         cz_drawback_xyft5_tpl_bll = new cz_drawback_xyft5_tplBLL();
     }
     if (cz_drawback_pkbjl_tpl_bll == null)
     {
         cz_drawback_pkbjl_tpl_bll = new cz_drawback_pkbjl_tplBLL();
     }
     if (cz_drawback_jscar_tpl_bll == null)
     {
         cz_drawback_jscar_tpl_bll = new cz_drawback_jscar_tplBLL();
     }
     if (cz_drawback_speed5_tpl_bll == null)
     {
         cz_drawback_speed5_tpl_bll = new cz_drawback_speed5_tplBLL();
     }
     if (cz_drawback_car168_tpl_bll == null)
     {
         cz_drawback_car168_tpl_bll = new cz_drawback_car168_tplBLL();
     }
     if (cz_drawback_ssc168_tpl_bll == null)
     {
         cz_drawback_ssc168_tpl_bll = new cz_drawback_ssc168_tplBLL();
     }
     if (cz_drawback_vrcar_tpl_bll == null)
     {
         cz_drawback_vrcar_tpl_bll = new cz_drawback_vrcar_tplBLL();
     }
     if (cz_drawback_vrssc_tpl_bll == null)
     {
         cz_drawback_vrssc_tpl_bll = new cz_drawback_vrssc_tplBLL();
     }
     if (cz_drawback_xyftoa_tpl_bll == null)
     {
         cz_drawback_xyftoa_tpl_bll = new cz_drawback_xyftoa_tplBLL();
     }
     if (cz_drawback_xyftsg_tpl_bll == null)
     {
         cz_drawback_xyftsg_tpl_bll = new cz_drawback_xyftsg_tplBLL();
     }
     if (cz_drawback_happycar_tpl_bll == null)
     {
         cz_drawback_happycar_tpl_bll = new cz_drawback_happycar_tplBLL();
     }
     if (cz_splitgroup_six_bll == null)
     {
         cz_splitgroup_six_bll = new cz_splitgroup_sixBLL();
     }
     if (cz_splitgroup_kl10_bll == null)
     {
         cz_splitgroup_kl10_bll = new cz_splitgroup_kl10BLL();
     }
     if (cz_splitgroup_jssfc_bll == null)
     {
         cz_splitgroup_jssfc_bll = new cz_splitgroup_jssfcBLL();
     }
     if (cz_splitgroup_pcdd_bll == null)
     {
         cz_splitgroup_pcdd_bll = new cz_splitgroup_pcddBLL();
     }
     if (cz_splitgroup_xync_bll == null)
     {
         cz_splitgroup_xync_bll = new cz_splitgroup_xyncBLL();
     }
     if (cz_wt_3qz_six_bll == null)
     {
         cz_wt_3qz_six_bll = new cz_wt_3qz_sixBLL();
     }
     if (cz_wt_3z2_six_bll == null)
     {
         cz_wt_3z2_six_bll = new cz_wt_3z2_sixBLL();
     }
     if (cz_wt_2qz_six_bll == null)
     {
         cz_wt_2qz_six_bll = new cz_wt_2qz_sixBLL();
     }
     if (cz_wt_2zt_six_bll == null)
     {
         cz_wt_2zt_six_bll = new cz_wt_2zt_sixBLL();
     }
     if (cz_wt_tc_six_bll == null)
     {
         cz_wt_tc_six_bll = new cz_wt_tc_sixBLL();
     }
     if (cz_wt_4z1_six_bll == null)
     {
         cz_wt_4z1_six_bll = new cz_wt_4z1_sixBLL();
     }
     if (cz_wt_3qz_b_six_bll == null)
     {
         cz_wt_3qz_b_six_bll = new cz_wt_3qz_b_sixBLL();
     }
     if (cz_wt_3z2_b_six_bll == null)
     {
         cz_wt_3z2_b_six_bll = new cz_wt_3z2_b_sixBLL();
     }
     if (cz_wt_2qz_b_six_bll == null)
     {
         cz_wt_2qz_b_six_bll = new cz_wt_2qz_b_sixBLL();
     }
     if (cz_wt_2zt_b_six_bll == null)
     {
         cz_wt_2zt_b_six_bll = new cz_wt_2zt_b_sixBLL();
     }
     if (cz_wt_tc_b_six_bll == null)
     {
         cz_wt_tc_b_six_bll = new cz_wt_tc_b_sixBLL();
     }
     if (cz_wt_4z1_b_six_bll == null)
     {
         cz_wt_4z1_b_six_bll = new cz_wt_4z1_b_sixBLL();
     }
     if (cz_wt_5bz_six_bll == null)
     {
         cz_wt_5bz_six_bll = new cz_wt_5bz_sixBLL();
     }
     if (cz_wt_6bz_six_bll == null)
     {
         cz_wt_6bz_six_bll = new cz_wt_6bz_sixBLL();
     }
     if (cz_wt_7bz_six_bll == null)
     {
         cz_wt_7bz_six_bll = new cz_wt_7bz_sixBLL();
     }
     if (cz_wt_8bz_six_bll == null)
     {
         cz_wt_8bz_six_bll = new cz_wt_8bz_sixBLL();
     }
     if (cz_wt_9bz_six_bll == null)
     {
         cz_wt_9bz_six_bll = new cz_wt_9bz_sixBLL();
     }
     if (cz_wt_10bz_six_bll == null)
     {
         cz_wt_10bz_six_bll = new cz_wt_10bz_sixBLL();
     }
     if (cz_wt_sxlwsl_six_bll == null)
     {
         cz_wt_sxlwsl_six_bll = new cz_wt_sxlwsl_sixBLL();
     }
     if (cz_wt_6xyz_six_bll == null)
     {
         cz_wt_6xyz_six_bll = new cz_wt_6xyz_sixBLL();
     }
     if (cz_odds_wt_six_bll == null)
     {
         cz_odds_wt_six_bll = new cz_odds_wt_sixBLL();
     }
     if (cz_odds_wt_kl10_bll == null)
     {
         cz_odds_wt_kl10_bll = new cz_odds_wt_kl10BLL();
     }
     if (cz_odds_wt_cqsc_bll == null)
     {
         cz_odds_wt_cqsc_bll = new cz_odds_wt_cqscBLL();
     }
     if (cz_odds_wt_pk10_bll == null)
     {
         cz_odds_wt_pk10_bll = new cz_odds_wt_pk10BLL();
     }
     if (cz_odds_wt_jsft2_bll == null)
     {
         cz_odds_wt_jsft2_bll = new cz_odds_wt_jsft2BLL();
     }
     if (cz_odds_wt_jspk10_bll == null)
     {
         cz_odds_wt_jspk10_bll = new cz_odds_wt_jspk10BLL();
     }
     if (cz_odds_wt_jscqsc_bll == null)
     {
         cz_odds_wt_jscqsc_bll = new cz_odds_wt_jscqscBLL();
     }
     if (cz_odds_wt_jssfc_bll == null)
     {
         cz_odds_wt_jssfc_bll = new cz_odds_wt_jssfcBLL();
     }
     if (cz_odds_wt_xync_bll == null)
     {
         cz_odds_wt_xync_bll = new cz_odds_wt_xyncBLL();
     }
     if (cz_odds_wt_jsk3_bll == null)
     {
         cz_odds_wt_jsk3_bll = new cz_odds_wt_jsk3BLL();
     }
     if (cz_odds_wt_kl8_bll == null)
     {
         cz_odds_wt_kl8_bll = new cz_odds_wt_kl8BLL();
     }
     if (cz_odds_wt_k8sc_bll == null)
     {
         cz_odds_wt_k8sc_bll = new cz_odds_wt_k8scBLL();
     }
     if (cz_odds_wt_pcdd_bll == null)
     {
         cz_odds_wt_pcdd_bll = new cz_odds_wt_pcddBLL();
     }
     if (cz_odds_wt_xyft5_bll == null)
     {
         cz_odds_wt_xyft5_bll = new cz_odds_wt_xyft5BLL();
     }
     if (cz_odds_wt_pkbjl_bll == null)
     {
         cz_odds_wt_pkbjl_bll = new cz_odds_wt_pkbjlBLL();
     }
     if (cz_odds_wt_jscar_bll == null)
     {
         cz_odds_wt_jscar_bll = new cz_odds_wt_jscarBLL();
     }
     if (cz_odds_wt_speed5_bll == null)
     {
         cz_odds_wt_speed5_bll = new cz_odds_wt_speed5BLL();
     }
     if (cz_odds_wt_car168_bll == null)
     {
         cz_odds_wt_car168_bll = new cz_odds_wt_car168BLL();
     }
     if (cz_odds_wt_ssc168_bll == null)
     {
         cz_odds_wt_ssc168_bll = new cz_odds_wt_ssc168BLL();
     }
     if (cz_odds_wt_vrcar_bll == null)
     {
         cz_odds_wt_vrcar_bll = new cz_odds_wt_vrcarBLL();
     }
     if (cz_odds_wt_vrssc_bll == null)
     {
         cz_odds_wt_vrssc_bll = new cz_odds_wt_vrsscBLL();
     }
     if (cz_odds_wt_xyftoa_bll == null)
     {
         cz_odds_wt_xyftoa_bll = new cz_odds_wt_xyftoaBLL();
     }
     if (cz_odds_wt_xyftsg_bll == null)
     {
         cz_odds_wt_xyftsg_bll = new cz_odds_wt_xyftsgBLL();
     }
     if (cz_odds_wt_happycar_bll == null)
     {
         cz_odds_wt_happycar_bll = new cz_odds_wt_happycarBLL();
     }
     if (cz_bet_kc_bll == null)
     {
         cz_bet_kc_bll = new cz_bet_kcBLL();
     }
     if (cz_betold_kc_bll == null)
     {
         cz_betold_kc_bll = new cz_betold_kcBLL();
     }
     if (cz_zodiac_six_bll == null)
     {
         cz_zodiac_six_bll = new cz_zodiac_sixBLL();
     }
     if (cz_zodiac_old_six_bll == null)
     {
         cz_zodiac_old_six_bll = new cz_zodiac_old_sixBLL();
     }
     if (cz_login_log_bll == null)
     {
         cz_login_log_bll = new cz_login_logBLL();
     }
     if (cz_wt_kl10_bll == null)
     {
         cz_wt_kl10_bll = new cz_wt_kl10BLL();
     }
     if (cz_wt_jssfc_bll == null)
     {
         cz_wt_jssfc_bll = new cz_wt_jssfcBLL();
     }
     if (cz_wt_pcdd_bll == null)
     {
         cz_wt_pcdd_bll = new cz_wt_pcddBLL();
     }
     if (cz_downodds_set_kc_bll == null)
     {
         cz_downodds_set_kc_bll = new cz_downodds_set_kcBLL();
     }
     if (cz_system_set_kc_bll == null)
     {
         cz_system_set_kc_bll = new cz_system_set_kcBLL();
     }
     if (cz_system_set_six_bll == null)
     {
         cz_system_set_six_bll = new cz_system_set_sixBLL();
     }
     if (cz_betold_six_bll == null)
     {
         cz_betold_six_bll = new cz_betold_sixBLL();
     }
     if (cz_bet_six_bll == null)
     {
         cz_bet_six_bll = new cz_bet_sixBLL();
     }
     if (cz_saleset_six_bll == null)
     {
         cz_saleset_six_bll = new cz_saleset_sixBLL();
     }
     if (cz_reportbackup_bll == null)
     {
         cz_reportbackup_bll = new cz_reportbackupBLL();
     }
     if (cz_jp_odds_bll == null)
     {
         cz_jp_odds_bll = new cz_jp_oddsBLL();
     }
     if (cz_system_set_kc_ex_bll == null)
     {
         cz_system_set_kc_ex_bll = new cz_system_set_kc_exBLL();
     }
     if (cz_admin_sysconfig_bll == null)
     {
         cz_admin_sysconfig_bll = new cz_admin_sysconfigBLL();
     }
     if (cz_autosale_six_ex_bll == null)
     {
         cz_autosale_six_ex_bll = new cz_autosale_six_exBLL();
     }
     if (cz_lm_group_set_bll == null)
     {
         cz_lm_group_set_bll = new cz_lm_group_setBLL();
     }
     if (cz_admin_subsystem_bll == null)
     {
         cz_admin_subsystem_bll = new cz_admin_subsystemBLL();
     }
     if (cz_balance_operation_log_bll == null)
     {
         cz_balance_operation_log_bll = new cz_balance_operation_logBLL();
     }
     if ((redisHelper == null) && FileCacheHelper.get_RedisStatOnline().Equals(1))
     {
         redisHelper = new RedisHelper(FileCacheHelper.get_GetRedisDBIndex());
     }
     if (cz_lm_number_amount_six_bll == null)
     {
         cz_lm_number_amount_six_bll = new cz_lm_number_amount_sixBLL();
     }
     if (cz_zj_profit_set_bll == null)
     {
         cz_zj_profit_set_bll = new cz_zj_profit_setBLL();
     }
     if (cz_zj_profit_set_log_bll == null)
     {
         cz_zj_profit_set_log_bll = new cz_zj_profit_set_logBLL();
     }
 }
Esempio n. 14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string str = this.Session["user_name"].ToString();
            agent_userinfo_session _session = this.Session[str + "lottery_session_user_info"] as agent_userinfo_session;

            this.skin      = _session.get_u_skin();
            this.lotteryDT = base.GetLotteryList();
            this.lotteryId = LSRequest.qq("lid");
            this.mId       = LSRequest.qq("mid");
            this.uid       = LSRequest.qq("uid");
            int num = 1;

            if (!this.mId.Equals(num.ToString()))
            {
                base.Response.Redirect(string.Format("/AutoLet/AutoLet_Show_kc.aspx?uid={0}&mid={1}", this.uid, this.mId), true);
            }
            this.cz_users_model = CallBLL.cz_users_bll.GetUserInfoByUID(this.uid);
            if (this.cz_users_model == null)
            {
                base.Response.Redirect("/MessagePage.aspx?code=u100038&url=&issuccess=1&isback=0&isopen=1");
                base.Response.End();
            }
            if (!this.cz_users_model.get_allow_sale().Equals(1))
            {
                base.Response.Redirect("/MessagePage.aspx?code=u100037&url=&issuccess=1&isback=0&isopen=1");
                base.Response.End();
            }
            if (!_session.get_u_type().Equals("zj") && !base.IsUpperLowerLevels(this.cz_users_model.get_u_name(), _session.get_u_type(), _session.get_u_name()))
            {
                base.Response.Redirect("/MessagePage.aspx?code=u100057&url=&issuccess=1&isback=0&isopen=1");
                base.Response.End();
            }
            DataTable play = null;

            if (!FileCacheHelper.get_IsShowLM_B())
            {
                play = CallBLL.cz_play_six_bll.GetPlay("91060,91061,91062,91063,91064,91065");
            }
            else
            {
                play = CallBLL.cz_play_six_bll.GetPlay();
            }
            if (play != null)
            {
                this.play_Row = play.Select(" play_id <>91002 and play_id <>91015 ");
            }
            DataSet autosaleByUserName = null;

            if (!FileCacheHelper.get_IsShowLM_B())
            {
                autosaleByUserName = CallBLL.cz_autosale_six_bll.GetAutosaleByUserName(this.cz_users_model.get_u_name(), "91060,91061,91062,91063,91064,91065");
            }
            else
            {
                autosaleByUserName = CallBLL.cz_autosale_six_bll.GetAutosaleByUserName(this.cz_users_model.get_u_name());
            }
            if (((autosaleByUserName != null) && (autosaleByUserName.Tables.Count > 0)) && (autosaleByUserName.Tables[0].Rows.Count > 0))
            {
                this.Autosale_DT = autosaleByUserName.Tables[0];
            }
        }
Esempio n. 15
0
        public IHttpHandler GetHttpHandler(RequestContext requestContext)
        {
            RedisCacheHelper.SetRedisCacheConnectionString(AppSettings.RedisCacheConnectionString);
            FileCacheHelper.SetFileSystemCacheDirPath(AppSettings.FileSystemCacheDirPath);

            virtualPath = URIHelper.GetCurrentVirtualPath().ToLower();

            var queryString = HttpContext.Current.Request.QueryString.ToString();

            queryString = System.Web.HttpUtility.UrlDecode(queryString);


            if (!Request.Path.EndsWith("/") || ((virtualPath != "~/") && (!virtualPath.EndsWith("/"))))
            {
                var path = Request.Path + "/";

                if (!string.IsNullOrEmpty(queryString))
                {
                    path = path + "?" + queryString;
                }

                HttpContext.Current.Response.RedirectPermanent(path);
            }

            Settings cmsSettings            = null;
            bool     isAttemptingAdminLogin = false;

            if ((virtualPath != "~/login/") && (virtualPath != "~/admin/") && string.IsNullOrEmpty(Request.QueryString["format"]))
            {
                cmsSettings = SettingsMapper.GetSettings();

                if (cmsSettings != null)
                {
                    var isSiteOnline = cmsSettings.IsSiteOnline();

                    if (isSiteOnline)
                    {
                        if (virtualPath.Contains(cmsSettings.SiteOfflineUrl))
                        {
                            Response.Redirect("~/");
                        }

                        AttemptToLoadFromCache();
                    }
                    else
                    {
                        if (!virtualPath.Contains(cmsSettings.SiteOfflineUrl))
                        {
                            Response.Redirect(cmsSettings.SiteOfflineUrl);
                        }
                    }
                }
                else
                {
                    AttemptToLoadFromCache();
                }
            }
            else
            {
                isAttemptingAdminLogin = true;
            }

            var languageSegment = FrameworkSettings.GetCurrentLanguage().UriSegment;

            if (LanguagesMapper.GetAllActive().Count() > 1 && !Request.Url.PathAndQuery.Contains($"/{languageSegment}/"))
            {
                var url = URIHelper.ConvertToAbsUrl("/" + languageSegment + Request.Url.PathAndQuery);
                Response.RedirectPermanent(url, true);
            }

            var segments = URIHelper.GetUriSegments(virtualPath).ToList();

            string firstSegment = "";

            if (segments.Count > 0)
            {
                firstSegment = segments[0];

                var language = LanguagesMapper.GetAllActive().SingleOrDefault(i => i.UriSegment == firstSegment);

                if (language != null)
                {
                    FrameworkSettings.SetCurrentLanguage(language);
                }
            }

            if (!isAttemptingAdminLogin && AppSettings.EnableUrlRedirectRules)
            {
                var path = virtualPath;

                if (!string.IsNullOrEmpty(queryString))
                {
                    path = path + "?" + queryString;
                }

                var redirectRule = UrlRedirectRulesMapper.GetRuleForUrl(path);

                if (redirectRule != null)
                {
                    var newUrl = redirectRule.RedirectToUrl;

                    if (newUrl.Contains("{"))
                    {
                        newUrl = MediaDetailsMapper.ParseSpecialTags(redirectRule, newUrl);
                    }

                    newUrl = URIHelper.ConvertToAbsUrl(newUrl);

                    var possibleLoopRules      = UrlRedirectRulesMapper.GetRulesFromUrl(URIHelper.ConvertAbsUrlToTilda(newUrl));
                    var foundActiveVirtualPath = MediaDetailsMapper.GetByVirtualPath(path);

                    if (possibleLoopRules.Any())
                    {
                        foreach (var rule in possibleLoopRules)
                        {
                            var returnObj = MediaDetailsMapper.DeletePermanently(rule);
                        }
                    }

                    if (foundActiveVirtualPath != null)
                    {
                        var returnObj = MediaDetailsMapper.DeletePermanently(redirectRule);
                    }

                    if (Request.QueryString.Count > 0)
                    {
                        newUrl += "?" + Request.QueryString;
                    }

                    if (redirectRule.Is301Redirect)
                    {
                        Response.RedirectPermanent(newUrl);
                    }
                    else
                    {
                        Response.Redirect(newUrl);
                    }
                }
            }

            if (!File.Exists(HttpContext.Current.Server.MapPath(virtualPath)) && !virtualPath.Contains(ParserHelper.OpenToken) && !virtualPath.Contains(ParserHelper.CloseToken))
            {
                string viewPath = "";

                long mediaDetailId = 0;
                long.TryParse(requestContext.HttpContext.Request["MediaDetailID"], out mediaDetailId);

                long mediaId = 0;
                long.TryParse(requestContext.HttpContext.Request["MediaID"], out mediaId);

                MediaDetail detail = null;

                if (mediaDetailId == 0 && mediaId == 0)
                {
                    FrameworkSettings.Current = FrameworkBaseMedia.GetInstanceByVirtualPath(virtualPath, true);
                    detail = (MediaDetail)FrameworkSettings.Current.CurrentMediaDetail;
                }
                else if (mediaDetailId != 0)
                {
                    var mediaDetail = MediaDetailsMapper.GetByID(mediaDetailId);

                    FrameworkSettings.Current = FrameworkBaseMedia.GetInstanceByMediaDetail(mediaDetail);
                    detail = (MediaDetail)FrameworkSettings.Current.CurrentMediaDetail;
                }
                else if (mediaId != 0)
                {
                    var media = MediasMapper.GetByID(mediaId);

                    FrameworkSettings.Current = FrameworkBaseMedia.GetInstanceByMedia(media);
                    detail = (MediaDetail)FrameworkSettings.Current.CurrentMediaDetail;
                }

                /*if (detail != null && !detail.CanUserAccessSection(FrameworkSettings.CurrentUser))
                 * {
                 *  FormsAuthentication.RedirectToLoginPage();
                 * }*/

                /*if (detail != null)
                 * {
                 *  var absUrlBase = URIHelper.ConvertAbsUrlToTilda(detail.AbsoluteUrl).Replace("~", "");
                 *  var absPathBase = URIHelper.ConvertAbsUrlToTilda(Request.Url.AbsolutePath).Replace("~", "");
                 *
                 *  if (absUrlBase != absPathBase)
                 *  {
                 *      Response.Redirect(detail.AbsoluteUrl + Request.Url.Query);
                 *  }
                 * }*/

                if (detail != null)
                {
                    if (detail.ForceSSL || AppSettings.ForceSSL)
                    {
                        URIHelper.ForceSSL();
                    }
                }
                else
                {
                    var currentLanguageId = FrameworkSettings.GetCurrentLanguage().ID;

                    var historyVersion = BaseMapper.GetDataModel().MediaDetails.FirstOrDefault(i => i.LanguageID == currentLanguageId && i.CachedVirtualPath == virtualPath && i.MediaType.ShowInSiteTree && i.HistoryVersionNumber != 0 && i.HistoryForMediaDetail != null);

                    if (historyVersion != null && historyVersion.VirtualPath != historyVersion.HistoryForMediaDetail.VirtualPath)
                    {
                        var foundRedirectUrl = UrlRedirectRulesMapper.GetRuleForUrl(virtualPath);

                        if (foundRedirectUrl == null)
                        {
                            var urlRedirectRule = UrlRedirectRulesMapper.CreateUrlRedirect(virtualPath, historyVersion.HistoryForMediaDetail.Media);

                            if (urlRedirectRule != null)
                            {
                                var returnObj = UrlRedirectRulesMapper.Insert(urlRedirectRule);
                                HttpContext.Current.Response.RedirectPermanent(historyVersion.HistoryForMediaDetail.CachedVirtualPath);
                            }
                            else
                            {
                                HttpContext.Current.Response.RedirectPermanent("/");
                            }
                        }
                    }
                    else
                    {
                        HttpContext.Current.Response.RedirectPermanent("/");
                    }
                }

                if ((detail == null) || (!IsValidRequest(detail)))
                {
                    detail = null;
                    if (cmsSettings != null)
                    {
                        if (!string.IsNullOrEmpty(cmsSettings.PageNotFoundUrl))
                        {
                            ErrorHelper.LogException(new Exception($"Page Not Found: {virtualPath}"));

                            Response.Redirect(cmsSettings.PageNotFoundUrl);

                            /*FrameworkSettings.CurrentFrameworkBaseMedia = null;
                             *
                             * FrameworkSettings.CurrentFrameworkBaseMedia = FrameworkBaseMedia.GetInstanceByVirtualPath(cmsSettings.PageNotFoundUrl, true);
                             * detail = (MediaDetail)FrameworkSettings.CurrentFrameworkBaseMedia.CurrentMediaDetail;
                             *
                             * ErrorHelper.LogException(new Exception($"Page Not Found: {virtualPath}"));*/

                            //Response.StatusCode = 301;
                        }
                    }
                }

                if (detail != null)
                {
                    var draft = detail.GetLatestDraft();

                    if (draft != null && (draft.PublishDate - detail.PublishDate) > TimeSpan.FromSeconds(10) && draft.CanRender)
                    {
                        var returnObj = draft.PublishLive();

                        if (!returnObj.IsError)
                        {
                            detail.RemoveFromCache();
                            draft.RemoveFromCache();

                            FrameworkSettings.Current = FrameworkBaseMedia.GetInstanceByMediaDetail(draft);
                            detail = (MediaDetail)FrameworkSettings.Current.CurrentMediaDetail;
                        }
                    }

                    if (detail.RedirectToFirstChild)
                    {
                        var child = detail.ChildMediaDetails.FirstOrDefault();

                        if (child != null)
                        {
                            var redirectPath = child.AutoCalculatedVirtualPath;

                            if (!string.IsNullOrEmpty(queryString))
                            {
                                redirectPath = redirectPath + "?" + queryString;
                            }

                            HttpContext.Current.Response.Redirect(redirectPath);
                        }
                    }

                    viewPath = FrameworkSettings.Current.CurrentMediaDetail.Handler;

                    if ((viewPath == null) || (viewPath.Trim() == ""))
                    {
                        viewPath = MediaTypesMapper.GetByID(FrameworkSettings.Current.CurrentMediaDetail.MediaTypeID).MediaTypeHandler;
                    }

                    viewPath = URIHelper.ConvertAbsUrlToTilda(viewPath);

                    if (!string.IsNullOrEmpty(Request.QueryString["format"]))
                    {
                        FrontEndBasePage.HandleFormatQueryString(detail, Request.QueryString["format"], Request.QueryString["depth"]);
                    }

                    return(CreateInstanceFromVirtualPath(viewPath, typeof(BasePage)));
                }
            }

            return(new DefaultHttpHandler());
        }
Esempio n. 16
0
        private void AddPhase(cz_phase_six phaseModel)
        {
            DataSet playByOddsSet = CallBLL.cz_play_six_bll.GetPlayByOddsSet("91025,91026,91027,91028,91029");

            if (((playByOddsSet != null) && (playByOddsSet.Tables.Count > 0)) && (playByOddsSet.Tables[0].Rows.Count > 0))
            {
                DataTable table = playByOddsSet.Tables[0];
                foreach (DataRow row in table.Rows)
                {
                    int         num;
                    cz_play_six _six = new cz_play_six();
                    string      str  = row["play_id"].ToString();
                    string      str2 = row["default_odds"].ToString();
                    string      str3 = row["max_odds"].ToString();
                    string      str4 = row["min_odds"].ToString();
                    row["a_diff"].ToString();
                    string str5 = row["b_diff"].ToString();
                    string str6 = row["c_diff"].ToString();
                    _six.set_play_id(Convert.ToInt32(str));
                    _six.set_default_odds(str2);
                    _six.set_max_odds(str3);
                    _six.set_min_odds(str4);
                    _six.set_b_diff(str5);
                    _six.set_c_diff(str6);
                    if (CallBLL.cz_bet_six_bll.GetIspayment() > 0)
                    {
                        num = 1;
                    }
                    else
                    {
                        num = 0;
                    }
                    try
                    {
                        if (_six.get_play_id().Equals(0x16385))
                        {
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet_SB(_six, num.ToString());
                        }
                        else if (_six.get_play_id().Equals(0x16382))
                        {
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet_ZT(_six, "91010,91025,91026,91027,91028,91029", num.ToString());
                        }
                        else if (_six.get_play_id().Equals(0x1637e))
                        {
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet_TMSX(_six, base.get_YearLian(), num.ToString());
                        }
                        else if (_six.get_play_id().Equals(0x1637f))
                        {
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet_TMSB(_six, num.ToString());
                        }
                        else if (_six.get_play_id().Equals(0x1638d))
                        {
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet_SXWS(_six, "sx", base.get_YearLian(), num.ToString());
                        }
                        else if (_six.get_play_id().Equals(0x1638e))
                        {
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet_SXWS(_six, "ws", "0", num.ToString());
                        }
                        else if (_six.get_play_id().Equals(0x163ae))
                        {
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet_SXWS(_six, "sx", base.get_YearLian(), num.ToString());
                        }
                        else if (_six.get_play_id().Equals(0x163af))
                        {
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet_SXWS(_six, "ws", "0", num.ToString());
                        }
                        else if (_six.get_play_id().Equals(0x16380))
                        {
                            string[]    strArray  = _six.get_default_odds().Split(new char[] { '|' });
                            string[]    strArray2 = _six.get_max_odds().Split(new char[] { '|' });
                            string[]    strArray3 = _six.get_min_odds().Split(new char[] { '|' });
                            string[]    strArray4 = _six.get_b_diff().Split(new char[] { '|' });
                            string[]    strArray5 = _six.get_c_diff().Split(new char[] { '|' });
                            cz_odds_six _six2     = new cz_odds_six();
                            _six2.set_play_id(new int?(_six.get_play_id()));
                            _six2.set_play_name("半波【單雙】");
                            _six2.set_put_amount("紅波單");
                            _six2.set_current_odds(strArray[0]);
                            _six2.set_max_odds(strArray2[0]);
                            _six2.set_min_odds(strArray3[0]);
                            _six2.set_b_diff(strArray4[0]);
                            _six2.set_c_diff(strArray5[0]);
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet_BB(_six2, num.ToString());
                            cz_odds_six _six3 = new cz_odds_six();
                            _six3.set_play_id(new int?(_six.get_play_id()));
                            _six3.set_play_name("半波【單雙】");
                            _six3.set_put_amount("紅波雙");
                            _six3.set_current_odds(strArray[1]);
                            _six3.set_max_odds(strArray2[1]);
                            _six3.set_min_odds(strArray3[1]);
                            _six3.set_b_diff(strArray4[1]);
                            _six3.set_c_diff(strArray5[1]);
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet_BB(_six3, num.ToString());
                            cz_odds_six _six4 = new cz_odds_six();
                            _six4.set_play_id(new int?(_six.get_play_id()));
                            _six4.set_play_name("半波【單雙】");
                            _six4.set_put_amount("藍波單");
                            _six4.set_current_odds(strArray[2]);
                            _six4.set_max_odds(strArray2[2]);
                            _six4.set_min_odds(strArray3[2]);
                            _six4.set_b_diff(strArray4[2]);
                            _six4.set_c_diff(strArray5[2]);
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet_BB(_six4, num.ToString());
                            cz_odds_six _six5 = new cz_odds_six();
                            _six5.set_play_id(new int?(_six.get_play_id()));
                            _six5.set_play_name("半波【單雙】");
                            _six5.set_put_amount("藍波雙");
                            _six5.set_current_odds(strArray[3]);
                            _six5.set_max_odds(strArray2[3]);
                            _six5.set_min_odds(strArray3[3]);
                            _six5.set_b_diff(strArray4[3]);
                            _six5.set_c_diff(strArray5[3]);
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet_BB(_six5, num.ToString());
                            cz_odds_six _six6 = new cz_odds_six();
                            _six6.set_play_id(new int?(_six.get_play_id()));
                            _six6.set_play_name("半波【單雙】");
                            _six6.set_put_amount("綠波單");
                            _six6.set_current_odds(strArray[4]);
                            _six6.set_max_odds(strArray2[4]);
                            _six6.set_min_odds(strArray3[4]);
                            _six6.set_b_diff(strArray4[4]);
                            _six6.set_c_diff(strArray5[4]);
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet_BB(_six6, num.ToString());
                            cz_odds_six _six7 = new cz_odds_six();
                            _six7.set_play_id(new int?(_six.get_play_id()));
                            _six7.set_play_name("半波【單雙】");
                            _six7.set_put_amount("綠波雙");
                            _six7.set_current_odds(strArray[5]);
                            _six7.set_max_odds(strArray2[5]);
                            _six7.set_min_odds(strArray3[5]);
                            _six7.set_b_diff(strArray4[5]);
                            _six7.set_c_diff(strArray5[5]);
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet_BB(_six7, num.ToString());
                        }
                        else if (_six.get_play_id().Equals(0x163b1))
                        {
                            string[]    strArray6  = _six.get_default_odds().Split(new char[] { '|' });
                            string[]    strArray7  = _six.get_max_odds().Split(new char[] { '|' });
                            string[]    strArray8  = _six.get_min_odds().Split(new char[] { '|' });
                            string[]    strArray9  = _six.get_b_diff().Split(new char[] { '|' });
                            string[]    strArray10 = _six.get_c_diff().Split(new char[] { '|' });
                            cz_odds_six _six8      = new cz_odds_six();
                            _six8.set_play_id(new int?(_six.get_play_id()));
                            _six8.set_play_name("半波【大小】");
                            _six8.set_put_amount("紅波大");
                            _six8.set_current_odds(strArray6[0]);
                            _six8.set_max_odds(strArray7[0]);
                            _six8.set_min_odds(strArray8[0]);
                            _six8.set_b_diff(strArray9[0]);
                            _six8.set_c_diff(strArray10[0]);
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet_BB(_six8, num.ToString());
                            cz_odds_six _six9 = new cz_odds_six();
                            _six9.set_play_id(new int?(_six.get_play_id()));
                            _six9.set_play_name("半波【大小】");
                            _six9.set_put_amount("紅波小");
                            _six9.set_current_odds(strArray6[1]);
                            _six9.set_max_odds(strArray7[1]);
                            _six9.set_min_odds(strArray8[1]);
                            _six9.set_b_diff(strArray9[1]);
                            _six9.set_c_diff(strArray10[1]);
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet_BB(_six9, num.ToString());
                            cz_odds_six _six10 = new cz_odds_six();
                            _six10.set_play_id(new int?(_six.get_play_id()));
                            _six10.set_play_name("半波【大小】");
                            _six10.set_put_amount("藍波大");
                            _six10.set_current_odds(strArray6[2]);
                            _six10.set_max_odds(strArray7[2]);
                            _six10.set_min_odds(strArray8[2]);
                            _six10.set_b_diff(strArray9[2]);
                            _six10.set_c_diff(strArray10[2]);
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet_BB(_six10, num.ToString());
                            cz_odds_six _six11 = new cz_odds_six();
                            _six11.set_play_id(new int?(_six.get_play_id()));
                            _six11.set_play_name("半波【大小】");
                            _six11.set_put_amount("藍波小");
                            _six11.set_current_odds(strArray6[3]);
                            _six11.set_max_odds(strArray7[3]);
                            _six11.set_min_odds(strArray8[3]);
                            _six11.set_b_diff(strArray9[3]);
                            _six11.set_c_diff(strArray10[3]);
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet_BB(_six11, num.ToString());
                            cz_odds_six _six12 = new cz_odds_six();
                            _six12.set_play_id(new int?(_six.get_play_id()));
                            _six12.set_play_name("半波【大小】");
                            _six12.set_put_amount("綠波大");
                            _six12.set_current_odds(strArray6[4]);
                            _six12.set_max_odds(strArray7[4]);
                            _six12.set_min_odds(strArray8[4]);
                            _six12.set_b_diff(strArray9[4]);
                            _six12.set_c_diff(strArray10[4]);
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet_BB(_six12, num.ToString());
                            cz_odds_six _six13 = new cz_odds_six();
                            _six13.set_play_id(new int?(_six.get_play_id()));
                            _six13.set_play_name("半波【大小】");
                            _six13.set_put_amount("綠波小");
                            _six13.set_current_odds(strArray6[5]);
                            _six13.set_max_odds(strArray7[5]);
                            _six13.set_min_odds(strArray8[5]);
                            _six13.set_b_diff(strArray9[5]);
                            _six13.set_c_diff(strArray10[5]);
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet_BB(_six13, num.ToString());
                        }
                        else if (_six.get_play_id().Equals(0x163ac))
                        {
                            string[]    strArray11 = _six.get_default_odds().Split(new char[] { '|' });
                            string[]    strArray12 = _six.get_max_odds().Split(new char[] { '|' });
                            string[]    strArray13 = _six.get_min_odds().Split(new char[] { '|' });
                            string[]    strArray14 = _six.get_b_diff().Split(new char[] { '|' });
                            string[]    strArray15 = _six.get_c_diff().Split(new char[] { '|' });
                            cz_odds_six _six14     = new cz_odds_six();
                            _six14.set_play_id(new int?(_six.get_play_id()));
                            _six14.set_play_name("七碼單雙");
                            _six14.set_put_amount("單0、雙7");
                            _six14.set_current_odds(strArray11[0]);
                            _six14.set_max_odds(strArray12[0]);
                            _six14.set_min_odds(strArray13[0]);
                            _six14.set_b_diff(strArray14[0]);
                            _six14.set_c_diff(strArray15[0]);
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet_QM(_six14, num.ToString());
                            _six14.set_play_id(new int?(_six.get_play_id()));
                            _six14.set_play_name("七碼單雙");
                            _six14.set_put_amount("單1、雙6");
                            _six14.set_current_odds(strArray11[1]);
                            _six14.set_max_odds(strArray12[1]);
                            _six14.set_min_odds(strArray13[1]);
                            _six14.set_b_diff(strArray14[1]);
                            _six14.set_c_diff(strArray15[1]);
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet_QM(_six14, num.ToString());
                            _six14.set_play_id(new int?(_six.get_play_id()));
                            _six14.set_play_name("七碼單雙");
                            _six14.set_put_amount("單2、雙5");
                            _six14.set_current_odds(strArray11[2]);
                            _six14.set_max_odds(strArray12[2]);
                            _six14.set_min_odds(strArray13[2]);
                            _six14.set_b_diff(strArray14[2]);
                            _six14.set_c_diff(strArray15[2]);
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet_QM(_six14, num.ToString());
                            _six14.set_play_id(new int?(_six.get_play_id()));
                            _six14.set_play_name("七碼單雙");
                            _six14.set_put_amount("單3、雙4");
                            _six14.set_current_odds(strArray11[3]);
                            _six14.set_max_odds(strArray12[3]);
                            _six14.set_min_odds(strArray13[3]);
                            _six14.set_b_diff(strArray14[3]);
                            _six14.set_c_diff(strArray15[3]);
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet_QM(_six14, num.ToString());
                            _six14.set_play_id(new int?(_six.get_play_id()));
                            _six14.set_play_name("七碼單雙");
                            _six14.set_put_amount("單4、雙3");
                            _six14.set_current_odds(strArray11[4]);
                            _six14.set_max_odds(strArray12[4]);
                            _six14.set_min_odds(strArray13[4]);
                            _six14.set_b_diff(strArray14[4]);
                            _six14.set_c_diff(strArray15[4]);
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet_QM(_six14, num.ToString());
                            _six14.set_play_id(new int?(_six.get_play_id()));
                            _six14.set_play_name("七碼單雙");
                            _six14.set_put_amount("單5、雙2");
                            _six14.set_current_odds(strArray11[5]);
                            _six14.set_max_odds(strArray12[5]);
                            _six14.set_min_odds(strArray13[5]);
                            _six14.set_b_diff(strArray14[5]);
                            _six14.set_c_diff(strArray15[5]);
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet_QM(_six14, num.ToString());
                            _six14.set_play_id(new int?(_six.get_play_id()));
                            _six14.set_play_name("七碼單雙");
                            _six14.set_put_amount("單6、雙1");
                            _six14.set_current_odds(strArray11[6]);
                            _six14.set_max_odds(strArray12[6]);
                            _six14.set_min_odds(strArray13[6]);
                            _six14.set_b_diff(strArray14[6]);
                            _six14.set_c_diff(strArray15[6]);
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet_QM(_six14, num.ToString());
                            _six14.set_play_id(new int?(_six.get_play_id()));
                            _six14.set_play_name("七碼單雙");
                            _six14.set_put_amount("單7、雙0");
                            _six14.set_current_odds(strArray11[7]);
                            _six14.set_max_odds(strArray12[7]);
                            _six14.set_min_odds(strArray13[7]);
                            _six14.set_b_diff(strArray14[7]);
                            _six14.set_c_diff(strArray15[7]);
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet_QM(_six14, num.ToString());
                        }
                        else if (_six.get_play_id().Equals(0x163b0))
                        {
                            string[]    strArray16 = _six.get_default_odds().Split(new char[] { '|' });
                            string[]    strArray17 = _six.get_max_odds().Split(new char[] { '|' });
                            string[]    strArray18 = _six.get_min_odds().Split(new char[] { '|' });
                            string[]    strArray19 = _six.get_b_diff().Split(new char[] { '|' });
                            string[]    strArray20 = _six.get_c_diff().Split(new char[] { '|' });
                            cz_odds_six _six15     = new cz_odds_six();
                            _six15.set_play_id(new int?(_six.get_play_id()));
                            _six15.set_play_name("七碼大小");
                            _six15.set_put_amount("大0、小7");
                            _six15.set_current_odds(strArray16[0]);
                            _six15.set_max_odds(strArray17[0]);
                            _six15.set_min_odds(strArray18[0]);
                            _six15.set_b_diff(strArray19[0]);
                            _six15.set_c_diff(strArray20[0]);
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet_QM(_six15, num.ToString());
                            _six15.set_play_id(new int?(_six.get_play_id()));
                            _six15.set_play_name("七碼大小");
                            _six15.set_put_amount("大1、小6");
                            _six15.set_current_odds(strArray16[1]);
                            _six15.set_max_odds(strArray17[1]);
                            _six15.set_min_odds(strArray18[1]);
                            _six15.set_b_diff(strArray19[1]);
                            _six15.set_c_diff(strArray20[1]);
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet_QM(_six15, num.ToString());
                            _six15.set_play_id(new int?(_six.get_play_id()));
                            _six15.set_play_name("七碼大小");
                            _six15.set_put_amount("大2、小5");
                            _six15.set_current_odds(strArray16[2]);
                            _six15.set_max_odds(strArray17[2]);
                            _six15.set_min_odds(strArray18[2]);
                            _six15.set_b_diff(strArray19[2]);
                            _six15.set_c_diff(strArray20[2]);
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet_QM(_six15, num.ToString());
                            _six15.set_play_id(new int?(_six.get_play_id()));
                            _six15.set_play_name("七碼大小");
                            _six15.set_put_amount("大3、小4");
                            _six15.set_current_odds(strArray16[3]);
                            _six15.set_max_odds(strArray17[3]);
                            _six15.set_min_odds(strArray18[3]);
                            _six15.set_b_diff(strArray19[3]);
                            _six15.set_c_diff(strArray20[3]);
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet_QM(_six15, num.ToString());
                            _six15.set_play_id(new int?(_six.get_play_id()));
                            _six15.set_play_name("七碼大小");
                            _six15.set_put_amount("大4、小3");
                            _six15.set_current_odds(strArray16[4]);
                            _six15.set_max_odds(strArray17[4]);
                            _six15.set_min_odds(strArray18[4]);
                            _six15.set_b_diff(strArray19[4]);
                            _six15.set_c_diff(strArray20[4]);
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet_QM(_six15, num.ToString());
                            _six15.set_play_id(new int?(_six.get_play_id()));
                            _six15.set_play_name("七碼大小");
                            _six15.set_put_amount("大5、小2");
                            _six15.set_current_odds(strArray16[5]);
                            _six15.set_max_odds(strArray17[5]);
                            _six15.set_min_odds(strArray18[5]);
                            _six15.set_b_diff(strArray19[5]);
                            _six15.set_c_diff(strArray20[5]);
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet_QM(_six15, num.ToString());
                            _six15.set_play_id(new int?(_six.get_play_id()));
                            _six15.set_play_name("七碼大小");
                            _six15.set_put_amount("大6、小1");
                            _six15.set_current_odds(strArray16[6]);
                            _six15.set_max_odds(strArray17[6]);
                            _six15.set_min_odds(strArray18[6]);
                            _six15.set_b_diff(strArray19[6]);
                            _six15.set_c_diff(strArray20[6]);
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet_QM(_six15, num.ToString());
                            _six15.set_play_id(new int?(_six.get_play_id()));
                            _six15.set_play_name("七碼大小");
                            _six15.set_put_amount("大7、小0");
                            _six15.set_current_odds(strArray16[7]);
                            _six15.set_max_odds(strArray17[7]);
                            _six15.set_min_odds(strArray18[7]);
                            _six15.set_b_diff(strArray19[7]);
                            _six15.set_c_diff(strArray20[7]);
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet_QM(_six15, num.ToString());
                        }
                        else if (_six.get_play_id().Equals(0x163ad))
                        {
                            string[]    strArray21 = _six.get_default_odds().Split(new char[] { '|' });
                            string[]    strArray22 = _six.get_max_odds().Split(new char[] { '|' });
                            string[]    strArray23 = _six.get_min_odds().Split(new char[] { '|' });
                            string[]    strArray24 = _six.get_b_diff().Split(new char[] { '|' });
                            string[]    strArray25 = _six.get_c_diff().Split(new char[] { '|' });
                            cz_odds_six _six16     = new cz_odds_six();
                            _six16.set_play_id(new int?(_six.get_play_id()));
                            _six16.set_play_name("五行");
                            _six16.set_put_amount("金");
                            _six16.set_current_odds(strArray21[0]);
                            _six16.set_max_odds(strArray22[0]);
                            _six16.set_min_odds(strArray23[0]);
                            _six16.set_b_diff(strArray24[0]);
                            _six16.set_c_diff(strArray25[0]);
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet_WX(_six16, num.ToString());
                            _six16.set_play_id(new int?(_six.get_play_id()));
                            _six16.set_play_name("五行");
                            _six16.set_put_amount("木");
                            _six16.set_current_odds(strArray21[1]);
                            _six16.set_max_odds(strArray22[1]);
                            _six16.set_min_odds(strArray23[1]);
                            _six16.set_b_diff(strArray24[1]);
                            _six16.set_c_diff(strArray25[1]);
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet_WX(_six16, num.ToString());
                            _six16.set_play_id(new int?(_six.get_play_id()));
                            _six16.set_play_name("五行");
                            _six16.set_put_amount("水");
                            _six16.set_current_odds(strArray21[2]);
                            _six16.set_max_odds(strArray22[2]);
                            _six16.set_min_odds(strArray23[2]);
                            _six16.set_b_diff(strArray24[2]);
                            _six16.set_c_diff(strArray25[2]);
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet_WX(_six16, num.ToString());
                            _six16.set_play_id(new int?(_six.get_play_id()));
                            _six16.set_play_name("五行");
                            _six16.set_put_amount("火");
                            _six16.set_current_odds(strArray21[3]);
                            _six16.set_max_odds(strArray22[3]);
                            _six16.set_min_odds(strArray23[3]);
                            _six16.set_b_diff(strArray24[3]);
                            _six16.set_c_diff(strArray25[3]);
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet_WX(_six16, num.ToString());
                            _six16.set_play_id(new int?(_six.get_play_id()));
                            _six16.set_play_name("五行");
                            _six16.set_put_amount("土");
                            _six16.set_current_odds(strArray21[4]);
                            _six16.set_max_odds(strArray22[4]);
                            _six16.set_min_odds(strArray23[4]);
                            _six16.set_b_diff(strArray24[4]);
                            _six16.set_c_diff(strArray25[4]);
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet_WX(_six16, num.ToString());
                        }
                        else
                        {
                            CallBLL.cz_odds_six_bll.SetOddsByOddsSet(_six, num.ToString());
                        }
                    }
                    catch (Exception)
                    {
                        base.Response.Write(base.ShowDialogBox("添加獎期錯誤!", "", 2));
                        base.Response.End();
                    }
                }
                if (CallBLL.cz_phase_six_bll.AddPhase(phaseModel) > 0)
                {
                    cz_lotteryopen_log _log = new cz_lotteryopen_log();
                    string             str7 = null;
                    if (this.userModel.get_users_child_session() != null)
                    {
                        str7 = this.userModel.get_users_child_session().get_u_name();
                    }
                    string str8 = "";
                    string str9 = ((("本期編號: " + phaseModel.get_phase()) + "<br />開獎時間: " + Convert.ToDateTime(phaseModel.get_open_date()).ToString("yyyy-MM-dd HH:mm:ss")) + "<br />截止投注時間: " + Convert.ToDateTime(phaseModel.get_stop_date()).ToString("yyyy-MM-dd HH:mm:ss")) + "<br />特碼投注截止: " + Convert.ToDateTime(phaseModel.get_sn_stop_date()).ToString("yyyy-MM-dd HH:mm:ss");
                    _log.set_phase_id(CallBLL.cz_phase_six_bll.GetModelByPhase(phaseModel.get_phase()).get_p_id());
                    _log.set_phase(phaseModel.get_phase());
                    _log.set_u_name(this.userModel.get_u_name());
                    _log.set_children_name(str7);
                    _log.set_action("新增獎期");
                    _log.set_old_val(str8);
                    _log.set_new_val(str9);
                    _log.set_ip(LSRequest.GetIP());
                    _log.set_add_time(DateTime.Now);
                    _log.set_note(string.Format("【本期編號:{0}】新增獎期", _log.get_phase()));
                    _log.set_type_id(0);
                    _log.set_lottery_id(100);
                    CallBLL.cz_lotteryopen_log_bll.Insert(_log);
                    CallBLL.cz_lm_number_amount_six_bll.ClearNumberAmount();
                    if (CallBLL.cz_system_set_six_bll.GetSystemSet(100).get_single_number_isdown().Equals(1))
                    {
                        CallBLL.cz_lm_number_amount_six_bll.SetWtValueAmount();
                    }
                    string url = "/LotteryPeriod/AwardPeriod.aspx?lid=" + 100;
                    FileCacheHelper.UpdateAudoJPFile();
                    base.Response.Write(base.ShowDialogBox("添加獎期成功!", url, 0));
                    base.Response.End();
                }
                else
                {
                    base.Response.Write(base.ShowDialogBox("添加獎期錯誤!", "", 400));
                    base.Response.End();
                }
            }
        }
Esempio n. 17
0
    protected void Page_Load(object sender, EventArgs e)
    {
        base.Response.Expires      = 0;
        base.Response.CacheControl = "no-cache";
        IDictionary <string, object> dictionary = new Dictionary <string, object>();

        if (!base.IsUserLoginByMobileForAjax())
        {
            dictionary.Add("islogin", "0");
            base.OutJson(JsonHandle.ObjectToJson(dictionary));
        }
        else
        {
            dictionary.Add("islogin", "1");
            string   user     = HttpContext.Current.Session["user_name"].ToString();
            cz_users _users   = CallBLL.cz_users_bll.UserLogin(user);
            string   str2     = _users.get_kc_kind().Trim();
            decimal  num      = Convert.ToDecimal(_users.get_kc_credit());
            decimal  num2     = Convert.ToDecimal(_users.get_kc_usable_credit());
            decimal  num3     = Convert.ToDecimal(_users.get_six_credit());
            decimal  num4     = Convert.ToDecimal(_users.get_six_usable_credit());
            string   str3     = num3.ToString("F1");
            string   str4     = num4.ToString("F1");
            string   kCProfit = base.GetKCProfit();
            if (_users.get_kc_iscash().Equals(int.Parse("1")))
            {
                dictionary.Add("t_iscash", "1");
            }
            else
            {
                dictionary.Add("t_iscash", "0");
            }
            dictionary.Add("t_credit", num2.ToString("F1"));
            dictionary.Add("t_amt", double.Parse(kCProfit).ToString("F1"));
            if (_users.get_six_iscash().Equals(int.Parse("1")))
            {
                dictionary.Add("t_iscash_six", "1");
            }
            else
            {
                dictionary.Add("t_iscash_six", "0");
            }
            dictionary.Add("t_credit_six", str3);
            dictionary.Add("t_amt_six", str4);
            if (FileCacheHelper.get_RedisStatOnline().Equals(1))
            {
                base.CheckIsOut(user);
                base.stat_online_redis(user, _users.get_u_type());
            }
            else if (FileCacheHelper.get_RedisStatOnline().Equals(2))
            {
                base.CheckIsOutStack(user);
                base.stat_online_redisStack(user, _users.get_u_type());
            }
            else
            {
                MemberPageBase.stat_online(user, "hy");
            }
            base.OutJson(JsonHandle.ObjectToJson(dictionary));
        }
    }
Esempio n. 18
0
        private void userLogin(HttpContext context, ref string strResult)
        {
            DateTime?    nullable12;
            DateTime     time4;
            string       str    = "";
            string       str2   = "";
            string       str3   = "";
            string       str4   = "";
            ReturnResult result = new ReturnResult();
            Dictionary <string, object> dictionary = new Dictionary <string, object>();

            dictionary.Add("type", "user_login");
            string str5 = LSRequest.qq("loginName").Trim().ToLower();
            string str6 = LSRequest.qq("loginPwd").Trim();
            string str7 = LSRequest.qq("ValidateCode").Trim();

            if (PageBase.is_ip_locked())
            {
                context.Session["lottery_session_img_code"] = null;
                result.set_success(400);
                result.set_tipinfo("由於輸入錯誤次數過多,您已被禁用,請稍後再試!");
                strResult = JsonHandle.ObjectToJson(result);
                return;
            }
            if (string.IsNullOrEmpty(str5) || string.IsNullOrEmpty(str6))
            {
                context.Response.End();
                return;
            }
            if (int.Parse(FileCacheHelper.get_GetLockedPasswordCount()) == 0)
            {
                context.Session["lottery_session_img_code_display"] = 1;
            }
            if (context.Session["lottery_session_img_code_display"] == null)
            {
                if (CallBLL.cz_user_psw_err_log_bll.IsExistUser(str5))
                {
                    DateTime time;
                    if (PageBase.IsErrTimesAbove(ref time, str5))
                    {
                        if (!PageBase.IsErrTimeout(time))
                        {
                            context.Session["lottery_session_img_code"] = null;
                            result.set_success(400);
                            result.set_tipinfo("");
                            dictionary.Add("isDisplayCode", 1);
                            result.set_data(dictionary);
                            strResult = JsonHandle.ObjectToJson(result);
                            context.Session["lottery_session_img_code_display"] = 1;
                            return;
                        }
                        CallBLL.cz_user_psw_err_log_bll.ZeroErrTimes(str5);
                        context.Session["lottery_session_img_code"]         = null;
                        context.Session["lottery_session_img_code_display"] = 0;
                    }
                    else
                    {
                        context.Session["lottery_session_img_code"]         = null;
                        context.Session["lottery_session_img_code_display"] = 0;
                    }
                }
                else
                {
                    context.Session["lottery_session_img_code"]         = null;
                    context.Session["lottery_session_img_code_display"] = 0;
                }
            }
            if (context.Session["lottery_session_img_code_display"].ToString() == "0")
            {
                if (string.IsNullOrEmpty(str5) || string.IsNullOrEmpty(str6))
                {
                    context.Response.End();
                    return;
                }
            }
            else
            {
                if (string.IsNullOrEmpty(str5) || string.IsNullOrEmpty(str6))
                {
                    context.Response.End();
                    return;
                }
                if (string.IsNullOrEmpty(str7))
                {
                    context.Session["lottery_session_img_code"] = null;
                    result.set_success(410);
                    result.set_tipinfo(PageBase.GetMessageByCache("u100001", "MessageHint"));
                    dictionary.Add("isDisplayCode", 1);
                    result.set_data(dictionary);
                    strResult = JsonHandle.ObjectToJson(result);
                    context.Session["lottery_session_img_code_display"] = 1;
                    return;
                }
                if (context.Session["lottery_session_img_code"] == null)
                {
                    result.set_success(410);
                    result.set_tipinfo(PageBase.GetMessageByCache("u100001", "MessageHint"));
                    strResult = JsonHandle.ObjectToJson(result);
                    return;
                }
                if (context.Session["lottery_session_img_code"].ToString().ToLower() != str7.ToLower())
                {
                    context.Session["lottery_session_img_code"] = null;
                    result.set_success(410);
                    result.set_tipinfo(PageBase.GetMessageByCache("u100001", "MessageHint"));
                    strResult = JsonHandle.ObjectToJson(result);
                    return;
                }
            }
            cz_users       _users = CallBLL.cz_users_bll.AgentLogin(str5.ToLower());
            cz_users_child _child = null;

            if (_users == null)
            {
                _child = CallBLL.cz_users_child_bll.AgentLogin(str5.ToLower());
                if (_child != null)
                {
                    string str9 = _child.get_retry_times().ToString();
                    if (!string.IsNullOrEmpty(str9) && (int.Parse(str9) > int.Parse(FileCacheHelper.get_GetLockedUserCount())))
                    {
                        if (!PageBase.IsLockedTimeout(str5, "child"))
                        {
                            context.Session["lottery_session_img_code"] = null;
                            result.set_success(560);
                            result.set_tipinfo("您的帳號因密碼多次輸入錯誤被鎖死,請與管理員聯系!");
                            strResult = JsonHandle.ObjectToJson(result);
                            return;
                        }
                        PageBase.zero_retry_times_children(str5);
                    }
                    string str10 = _child.get_salt().Trim();
                    string str11 = DESEncrypt.EncryptString(str6, str10);
                    if (_child.get_u_psw() != str11)
                    {
                        context.Session["lottery_session_img_code"] = null;
                        PageBase.inc_retry_times_children(str5);
                        PageBase.login_error_ip();
                        result.set_success(400);
                        result.set_tipinfo(PageBase.GetMessageByCache("u100003", "MessageHint"));
                        strResult = JsonHandle.ObjectToJson(result);
                        if (context.Session["lottery_session_img_code_display"].ToString() == "0")
                        {
                            DateTime time2;
                            if (CallBLL.cz_user_psw_err_log_bll.IsExistUser(str5))
                            {
                                CallBLL.cz_user_psw_err_log_bll.UpdateErrTimes(str5);
                            }
                            else
                            {
                                CallBLL.cz_user_psw_err_log_bll.AddUser(str5);
                            }
                            if (PageBase.IsErrTimesAbove(ref time2, str5))
                            {
                                context.Session["lottery_session_img_code"] = null;
                                result.set_success(400);
                                result.set_tipinfo(PageBase.GetMessageByCache("u100003", "MessageHint"));
                                dictionary.Add("isDisplayCode", 1);
                                result.set_data(dictionary);
                                strResult = JsonHandle.ObjectToJson(result);
                                context.Session["lottery_session_img_code_display"] = 1;
                            }
                        }
                        return;
                    }
                    str2   = _child.get_status().ToString();
                    str3   = PageBase.upper_user_status(_child.get_parent_u_name());
                    _users = CallBLL.cz_users_bll.AgentLogin(_child.get_parent_u_name());
                }
                else
                {
                    context.Session["lottery_session_img_code"] = null;
                    PageBase.login_error_ip();
                    result.set_success(400);
                    result.set_tipinfo(PageBase.GetMessageByCache("u100002", "MessageHint"));
                    dictionary.Add("fs_name", "loginName");
                    strResult = JsonHandle.ObjectToJson(result);
                    return;
                }
                PageBase.zero_retry_times_children(str5);
            }
            else
            {
                string str12 = _users.get_retry_times().ToString();
                if (!string.IsNullOrEmpty(str12) && (int.Parse(str12) > int.Parse(FileCacheHelper.get_GetLockedUserCount())))
                {
                    if (!PageBase.IsLockedTimeout(str5, "master"))
                    {
                        context.Session["lottery_session_img_code"] = null;
                        result.set_success(400);
                        result.set_tipinfo("您的帳號因密碼多次輸入錯誤被鎖死,請與管理員聯系!");
                        strResult = JsonHandle.ObjectToJson(result);
                        return;
                    }
                    PageBase.zero_retry_times(str5);
                }
                str = _users.get_a_state().ToString();
                string str13 = _users.get_a_state().ToString();
                str4 = PageBase.upper_user_status(_users.get_u_name());
                if (str13.Equals("2"))
                {
                    context.Session["lottery_session_img_code"] = null;
                    result.set_success(400);
                    result.set_tipinfo(PageBase.GetMessageByCache("u100005", "MessageHint"));
                    dictionary.Add("fs_name", "loginName");
                    strResult = JsonHandle.ObjectToJson(result);
                    context.Session.Abandon();
                    return;
                }
                if (str4 == "2")
                {
                    context.Session["lottery_session_img_code"] = null;
                    result.set_success(400);
                    result.set_tipinfo("您的上級帳號已被停用,请与管理员联系!");
                    strResult = JsonHandle.ObjectToJson(result);
                    context.Session.Abandon();
                    return;
                }
                str = (str13 == null) ? "0" : str;
                string str14 = _users.get_salt().Trim();
                string str15 = DESEncrypt.EncryptString(str6, str14);
                if (_users.get_u_psw() != str15)
                {
                    context.Session["lottery_session_img_code"] = null;
                    PageBase.inc_retry_times(str5);
                    PageBase.login_error_ip();
                    result.set_success(400);
                    result.set_tipinfo(PageBase.GetMessageByCache("u100003", "MessageHint"));
                    strResult = JsonHandle.ObjectToJson(result);
                    if (context.Session["lottery_session_img_code_display"].ToString() == "0")
                    {
                        DateTime time3;
                        if (CallBLL.cz_user_psw_err_log_bll.IsExistUser(str5))
                        {
                            CallBLL.cz_user_psw_err_log_bll.UpdateErrTimes(str5);
                        }
                        else
                        {
                            CallBLL.cz_user_psw_err_log_bll.AddUser(str5);
                        }
                        if (PageBase.IsErrTimesAbove(ref time3, str5))
                        {
                            context.Session["lottery_session_img_code"] = null;
                            result.set_success(400);
                            result.set_tipinfo(PageBase.GetMessageByCache("u100003", "MessageHint"));
                            dictionary.Add("isDisplayCode", 1);
                            result.set_data(dictionary);
                            strResult = JsonHandle.ObjectToJson(result);
                            context.Session["lottery_session_img_code_display"] = 1;
                        }
                    }
                    return;
                }
                PageBase.zero_retry_times(str5);
            }
            if (!string.IsNullOrEmpty(str2))
            {
                context.Session["user_name"]       = _users.get_u_name().Trim();
                context.Session["user_type"]       = _users.get_u_type().Trim();
                context.Session["child_user_name"] = _child.get_u_name().Trim();
                context.Session["user_state"]      = str2.Trim();
                if (str2.Equals("2"))
                {
                    context.Session["lottery_session_img_code"] = null;
                    result.set_success(400);
                    result.set_tipinfo("您的帳號已被停用,请与管理员联系!");
                    strResult = JsonHandle.ObjectToJson(result);
                    context.Session.Abandon();
                    return;
                }
                if (_users.get_a_state() == 2)
                {
                    context.Session["lottery_session_img_code"] = null;
                    result.set_success(400);
                    result.set_tipinfo("您的主帳號已被停用,请与管理员联系!");
                    strResult = JsonHandle.ObjectToJson(result);
                    context.Session.Abandon();
                    return;
                }
                if (str3 == "2")
                {
                    context.Session["lottery_session_img_code"] = null;
                    result.set_success(400);
                    result.set_tipinfo("您的上級帳號已被停用,请与管理员联系!");
                    strResult = JsonHandle.ObjectToJson(result);
                    context.Session.Abandon();
                    return;
                }
                if (str2 == "1")
                {
                    result.set_success(200);
                    result.set_tipinfo(PageBase.GetMessageByCache("u100004", "MessageHint"));
                    strResult = JsonHandle.ObjectToJson(result);
                    context.Session["user_state"] = str2;
                }
                else if (_users.get_a_state() == 1)
                {
                    result.set_success(200);
                    result.set_tipinfo("您的主帳號已被凍結,请与管理员联系!");
                    strResult = JsonHandle.ObjectToJson(result);
                    context.Session["user_state"] = _users.get_a_state().ToString();
                }
                else if (str3 == "1")
                {
                    result.set_success(200);
                    result.set_tipinfo(PageBase.GetMessageByCache("u100006", "MessageHint"));
                    strResult = JsonHandle.ObjectToJson(result);
                    context.Session["user_state"] = str3;
                }
                else
                {
                    context.Session["user_state"] = "0";
                    result.set_success(200);
                    strResult = JsonHandle.ObjectToJson(result);
                }
            }
            else
            {
                context.Session["user_name"]  = _users.get_u_name().Trim();
                context.Session["user_type"]  = _users.get_u_type().Trim();
                context.Session["user_state"] = str.Trim();
                if (str.Equals("1"))
                {
                    result.set_success(200);
                    result.set_tipinfo(PageBase.GetMessageByCache("u100004", "MessageHint"));
                    strResult = JsonHandle.ObjectToJson(result);
                    context.Session["user_state"] = str;
                }
                else if (str4 == "1")
                {
                    result.set_success(200);
                    result.set_tipinfo(PageBase.GetMessageByCache("u100006", "MessageHint"));
                    strResult = JsonHandle.ObjectToJson(result);
                    context.Session["user_state"] = str4;
                }
                else
                {
                    context.Session["user_state"] = "0";
                    result.set_success(200);
                    strResult = JsonHandle.ObjectToJson(result);
                }
            }
            agent_userinfo_session _session = new agent_userinfo_session();

            _session.set_u_id(_users.get_u_id());
            _session.set_u_name(_users.get_u_name().Trim());
            _session.set_u_psw(_users.get_u_psw().Trim());
            _session.set_u_nicker(_users.get_u_nicker().Trim());
            _session.set_u_skin(_users.get_u_skin().Trim());
            if (_child != null)
            {
                if (string.IsNullOrEmpty(_child.get_u_skin()))
                {
                    _session.set_u_skin("");
                }
                else
                {
                    _session.set_u_skin(_child.get_u_skin());
                }
            }
            _session.set_sup_name(_users.get_sup_name().Trim());
            _session.set_u_type(_users.get_u_type().Trim());
            _session.set_su_type(_users.get_su_type().Trim());
            _session.set_a_state(_users.get_a_state());
            _session.set_six_kind(_users.get_six_kind());
            _session.set_kc_kind(_users.get_kc_kind());
            _session.set_allow_sale(_users.get_allow_sale());
            _session.set_kc_allow_sale(_users.get_kc_allow_sale());
            _session.set_negative_sale(_users.get_negative_sale());
            if (!_users.get_allow_view_report().HasValue)
            {
                _session.set_allow_view_report(0);
            }
            else
            {
                _session.set_allow_view_report(_users.get_allow_view_report());
            }
            DataRow item = CallBLL.cz_admin_sysconfig_bll.GetItem();

            if (item == null)
            {
                _session.set_u_skin("Blue");
            }
            else
            {
                string str16 = item["agent_skin"].ToString();
                if (string.IsNullOrEmpty(_session.get_u_skin()) || (str16.IndexOf(_session.get_u_skin()) < 0))
                {
                    _session.set_u_skin(str16.Split(new char[] { '|' })[0]);
                }
            }
            if (_child != null)
            {
                _child.set_salt("");
            }
            _session.set_users_child_session(_child);
            DataTable zJInfo = CallBLL.cz_users_bll.GetZJInfo();

            if (zJInfo != null)
            {
                _session.set_zjname(zJInfo.Rows[0]["u_name"].ToString().Trim());
            }
            if (!_session.get_u_type().ToLower().Equals("zj"))
            {
                cz_rate_kc rateKCByUserName = CallBLL.cz_rate_kc_bll.GetRateKCByUserName(_session.get_u_name());
                _session.set_fgs_name(rateKCByUserName.get_fgs_name());
                _session.set_gd_name(rateKCByUserName.get_gd_name());
                _session.set_zd_name(rateKCByUserName.get_zd_name());
                _session.set_dl_name(rateKCByUserName.get_dl_name());
                DataTable userOpOdds = CallBLL.cz_rate_kc_bll.GetUserOpOdds(_session.get_u_name());
                if (userOpOdds != null)
                {
                    if ((userOpOdds.Rows[0]["six_op_odds"] != null) && (userOpOdds.Rows[0]["six_op_odds"].ToString() != ""))
                    {
                        _session.set_six_op_odds(new int?(int.Parse(userOpOdds.Rows[0]["six_op_odds"].ToString())));
                    }
                    if ((userOpOdds.Rows[0]["kc_op_odds"] != null) && (userOpOdds.Rows[0]["kc_op_odds"].ToString() != ""))
                    {
                        _session.set_kc_op_odds(new int?(int.Parse(userOpOdds.Rows[0]["kc_op_odds"].ToString())));
                    }
                }
            }
            context.Session["child_user_name"] = null;
            if (_child != null)
            {
                context.Session["child_user_name"] = _child.get_u_name();
            }
            context.Session["user_name"] = _users.get_u_name();
            context.Session[_users.get_u_name() + "lottery_session_user_info"] = _session;
            PageBase.SetAppcationFlag(str5);
            if (FileCacheHelper.get_RedisStatOnline().Equals(1) || FileCacheHelper.get_RedisStatOnline().Equals(2))
            {
                bool flag6 = false;
                if ((_session.get_users_child_session() != null) && _session.get_users_child_session().get_is_admin().Equals(1))
                {
                    flag6 = true;
                }
                if (!flag6)
                {
                    if (FileCacheHelper.get_RedisStatOnline().Equals(1))
                    {
                        new PageBase_Redis().InitUserOnlineTopToRedis(str5, _session.get_u_type());
                    }
                    else if (FileCacheHelper.get_RedisStatOnline().Equals(2))
                    {
                        new PageBase_Redis().InitUserOnlineTopToRedisStack(str5, _session.get_u_type());
                    }
                }
            }
            else
            {
                MemberPageBase.stat_top_online(str5);
                MemberPageBase.stat_online(str5, _session.get_u_type());
            }
            if (FileCacheHelper.get_RedisStatOnline().Equals(0))
            {
                PageBase.ZeroIsOutFlag(str5);
            }
            CallBLL.cz_user_psw_err_log_bll.ZeroErrTimes(str5);
            cz_login_log _log = new cz_login_log();

            _log.set_ip(LSRequest.GetIP());
            _log.set_login_time(new DateTime?(DateTime.Now));
            _log.set_u_name(str5);
            new PageBase();
            _log.set_browser_type(Utils.GetBrowserInfo(HttpContext.Current));
            CallBLL.cz_login_log_bll.Add(_log);
            if (_child == null)
            {
                string str17 = _users.get_is_changed().ToString();
                if (string.IsNullOrEmpty(str17) || (str17 == "0"))
                {
                    result.set_success(550);
                    result.set_tipinfo("新密碼首次登錄,需重置密碼!");
                    strResult = JsonHandle.ObjectToJson(result);
                    return;
                }
                DateTime?nullable = _users.get_last_changedate();
                int      num2     = PageBase.PasswordExpire();
                if (nullable.HasValue)
                {
                    nullable12 = nullable;
                    time4      = DateTime.Now.AddDays((double)-num2);
                    if (!(nullable12.HasValue ? (nullable12.GetValueOrDefault() < time4) : false))
                    {
                        goto Label_131D;
                    }
                }
                result.set_success(550);
                result.set_tipinfo("密碼過期,需重置密碼!");
                strResult = JsonHandle.ObjectToJson(result);
                return;
            }
            string str18 = _child.get_is_changed().ToString();

            if (string.IsNullOrEmpty(str18) || (str18 == "0"))
            {
                result.set_success(550);
                result.set_tipinfo("新密碼首次登錄,需重置密碼!");
                strResult = JsonHandle.ObjectToJson(result);
                return;
            }
            DateTime?nullable2 = _child.get_last_changedate();
            int      num3      = PageBase.PasswordExpire();

            if (nullable2.HasValue)
            {
                nullable12 = nullable2;
                time4      = DateTime.Now.AddDays((double)-num3);
                if (!(nullable12.HasValue ? (nullable12.GetValueOrDefault() < time4) : false))
                {
                    goto Label_131D;
                }
            }
            result.set_success(550);
            result.set_tipinfo("密碼過期,需重置密碼!");
            strResult = JsonHandle.ObjectToJson(result);
            return;

Label_131D:
            dictionary.Add("uid", _session.get_u_id());
            DataTable lotteryList = base.GetLotteryList();

            string[] source = base.GetLotteryMasterID(lotteryList).Split(new char[] { ',' });
            int      num4   = 1;

            if (source.Contains <string>(num4.ToString()))
            {
                dictionary.Add("hasSix", 1);
            }
            else
            {
                dictionary.Add("hasSix", 0);
            }
            num4 = 2;
            if (source.Contains <string>(num4.ToString()))
            {
                dictionary.Add("hasKc", 1);
            }
            else
            {
                dictionary.Add("hasKc", 0);
            }
            dictionary.Add("utype", _session.get_u_type().ToLower());
            List <object> list = new List <object>();

            foreach (DataRow row2 in lotteryList.Rows)
            {
                string str20 = row2["lottery_name"].ToString();
                string s     = row2["id"].ToString();
                Dictionary <string, object> dictionary2 = new Dictionary <string, object>();
                dictionary2.Add("name", str20);
                dictionary2.Add("id", int.Parse(s));
                list.Add(dictionary2);
            }
            dictionary.Add("lotteryCfg", list);
            dictionary.Add("PasswordLU", ConfigurationManager.AppSettings["PasswordLU"]);
            dictionary.Add("roleCfg", MemberPageBase_Mobile.roleCfg);
            result.set_data(dictionary);
            strResult = JsonHandle.ObjectToJson(result);
        }
Esempio n. 19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.ajaxErrorLogSwitch = FileCacheHelper.get_AjaxErrorLogSwitch();
            string str = ConfigurationManager.AppSettings["CloseIndexRefresh"];

            if ((str != "true") && PageBase.IsNeedPopBrower())
            {
                this.Session.Abandon();
                base.Response.Write("<script>top.location.href='/'</script>");
                base.Response.End();
            }
            this.lotteryDT = base.GetLotteryList();
            this.masterids = base.GetLotteryMasterID(this.lotteryDT);
            int num = 0;

            foreach (DataRow row in this.lotteryDT.Rows)
            {
                if (num.Equals(0))
                {
                    this.firstLotteryId = row["id"].ToString();
                }
                num++;
                break;
            }
            if (FileCacheHelper.get_GetDefaultLottery() != "n")
            {
                bool flag = false;
                foreach (DataRow row in this.lotteryDT.Rows)
                {
                    if (row["id"].ToString().Equals(FileCacheHelper.get_GetDefaultLottery()))
                    {
                        flag = true;
                        break;
                    }
                }
                if (flag)
                {
                    this.firstLotteryId = FileCacheHelper.get_GetDefaultLottery();
                }
                this.useNowMenuId = "1";
            }
            if (this.lotteryDT != null)
            {
                Dictionary <string, object> lotteryMenuCfg = base.GetLotteryMenuCfg(this.lotteryDT);
                this.menuCfg = JsonHandle.ObjectToJson(lotteryMenuCfg);
            }
            if (HttpContext.Current.Session["user_name"] == null)
            {
                base.Response.End();
            }
            this.userName = HttpContext.Current.Session["user_name"].ToString();
            this.uModel   = HttpContext.Current.Session[this.userName + "lottery_session_user_info"] as cz_userinfo_session;
            this.skin     = this.uModel.get_u_skin();
            if (str != "true")
            {
                this.browserCode = Utils.Number(4);
                PageBase.SetBrowerFlag(this.browserCode);
            }
            DataTable table = CallBLL.cz_users_bll.GetCredit(this.userName, this.uModel.get_su_type()).Tables[0];

            this.six_credit        = string.Format("{0:F0}", double.Parse(table.Rows[0]["six_credit"].ToString()));
            this.kc_credit         = string.Format("{0:F0}", double.Parse(table.Rows[0]["kc_credit"].ToString()));
            this.six_usable_credit = string.Format("{0:F0}", double.Parse(table.Rows[0]["six_usable_credit"].ToString()));
            this.kc_usable_credit  = string.Format("{0:F0}", double.Parse(table.Rows[0]["kc_usable_credit"].ToString()));
            this.six_iscash        = table.Rows[0]["six_iscash"].ToString();
            this.kc_iscash         = table.Rows[0]["kc_iscash"].ToString();
            CacheHelper.RemoveAllCache("LmGroupCount_Cache");
        }
Esempio n. 20
0
        public void MemberPageBase_Load(object sender, EventArgs e)
        {
            DateTime       now;
            cz_stat_online _online;
            cz_stat_online _online2;

            if (HttpContext.Current.Session["user_name"] == null)
            {
                HttpContext.Current.Response.Write("<script>top.location.href='/'</script>");
                HttpContext.Current.Response.End();
            }
            string str = this.get_children_name();

            if (FileCacheHelper.get_RedisStatOnline().Equals(1))
            {
                if (HttpContext.Current.Request.Path.ToLower().IndexOf("resetpasswd.aspx") > 0)
                {
                    now     = DateTime.Now;
                    _online = new cz_stat_online();
                    _online.set_u_name((str == "") ? HttpContext.Current.Session["user_name"].ToString() : str);
                    _online.set_is_out(0);
                    _online.set_u_type(HttpContext.Current.Session["user_type"].ToString());
                    _online.set_ip(LSRequest.GetIP());
                    _online.set_first_time(new DateTime?(now));
                    _online.set_last_time(new DateTime?(now));
//                    CallBLL.redisHelper.HashGet<cz_stat_online>("useronline:list", (str == "") ? HttpContext.Current.Session["user_name"].ToString() : str, _online);
                }
//                if (CallBLL.redisHelper.HashExists("useronline:list", (str == "") ? HttpContext.Current.Session["user_name"].ToString() : str))
//                {
//                    _online2 = CallBLL.redisHelper.HashGet<cz_stat_online>("useronline:list", (str == "") ? HttpContext.Current.Session["user_name"].ToString() : str);
//                    if ((_online2 != null) && _online2.get_is_out().Equals(1))
//                    {
//                        HttpContext.Current.Session.Abandon();
//                        HttpContext.Current.Response.Write("<script>top.location.href='/'</script>");
//                        HttpContext.Current.Response.End();
//                    }
//                }
                if (PageBase.IsNeedPopBrower((str == "") ? HttpContext.Current.Session["user_name"].ToString() : str))
                {
                    HttpContext.Current.Session.Abandon();
                    HttpContext.Current.Response.Write("<script>top.location.href='/'</script>");
                    HttpContext.Current.Response.End();
                }
            }
            else if (FileCacheHelper.get_RedisStatOnline().Equals(2))
            {
                RedisClient client;
                if (HttpContext.Current.Request.Path.ToLower().IndexOf("resetpasswd.aspx") > 0)
                {
                    now     = DateTime.Now;
                    _online = new cz_stat_online();
                    _online.set_u_name((str == "") ? HttpContext.Current.Session["user_name"].ToString() : str);
                    _online.set_is_out(0);
                    _online.set_u_type(HttpContext.Current.Session["user_type"].ToString());
                    _online.set_ip(LSRequest.GetIP());
                    _online.set_first_time(new DateTime?(now));
                    _online.set_last_time(new DateTime?(now));
                    using (client = new RedisClient(RedisConnectSplit.get_RedisIP(), RedisConnectSplit.get_RedisPort(), RedisConnectSplit.get_RedisPassword(), (long)FileCacheHelper.get_GetRedisDBIndex()))
                    {
                        client.ConnectTimeout = int.Parse(RedisConnectSplit.get_RedisConnectTimeout());
                        client.SetEntryInHash("useronline:list", (str == "") ? HttpContext.Current.Session["user_name"].ToString() : str, JsonHandle.ObjectToJson(_online));
                    }
                }
                using (client = new RedisClient(RedisConnectSplit.get_RedisIP(), RedisConnectSplit.get_RedisPort(), RedisConnectSplit.get_RedisPassword(), (long)FileCacheHelper.get_GetRedisDBIndex()))
                {
                    client.ConnectTimeout = int.Parse(RedisConnectSplit.get_RedisConnectTimeout());
                    if (client.HashContainsEntry("useronline:list", (str == "") ? HttpContext.Current.Session["user_name"].ToString() : str))
                    {
                        _online2 = JsonHandle.JsonToObject <cz_stat_online>(client.GetValueFromHash("useronline:list", (str == "") ? HttpContext.Current.Session["user_name"].ToString() : str)) as cz_stat_online;
                        if ((_online2 != null) && _online2.get_is_out().Equals(1))
                        {
                            HttpContext.Current.Session.Abandon();
                            HttpContext.Current.Response.Write("<script>top.location.href='/'</script>");
                            HttpContext.Current.Response.End();
                        }
                    }
                }
                if (PageBase.IsNeedPopBrower((str == "") ? HttpContext.Current.Session["user_name"].ToString() : str))
                {
                    HttpContext.Current.Session.Abandon();
                    HttpContext.Current.Response.Write("<script>top.location.href='/'</script>");
                    HttpContext.Current.Response.End();
                }
            }
            else if (base.IsUserOut((str == "") ? HttpContext.Current.Session["user_name"].ToString() : str) || PageBase.IsNeedPopBrower((str == "") ? HttpContext.Current.Session["user_name"].ToString() : str))
            {
                HttpContext.Current.Session.Abandon();
                HttpContext.Current.Response.Write("<script>top.location.href='/'</script>");
                HttpContext.Current.Response.End();
            }
            string str3 = HttpContext.Current.Session["user_name"].ToString();

            this.UserCurrentSkin = (HttpContext.Current.Session[str3 + "lottery_session_user_info"] as agent_userinfo_session).get_u_skin();
            this.ForcedModifyPassword();
            this.AgentCurrentLottery();
            this.RedirectReport();
            this.IsOpenLottery();
            if (((((HttpContext.Current.Request.Path.ToLower().IndexOf("fgs_list") > -1) || (HttpContext.Current.Request.Path.ToLower().IndexOf("gd_list") > -1)) || ((HttpContext.Current.Request.Path.ToLower().IndexOf("zd_list") > -1) || (HttpContext.Current.Request.Path.ToLower().IndexOf("dl_list") > -1))) || ((HttpContext.Current.Request.Path.ToLower().IndexOf("hy_list") > -1) || (HttpContext.Current.Request.Path.ToLower().IndexOf("child_list") > -1))) || (HttpContext.Current.Request.Path.ToLower().IndexOf("filluser_list") > -1))
            {
                CookieHelper.SetCookie("userreturnbackurl", HttpContext.Current.Request.ServerVariables["Path_Info"] + "?" + HttpContext.Current.Request.ServerVariables["Query_String"]);
            }
        }
Esempio n. 21
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.lotteryDT = base.GetLotteryList();
            this.lotteryID = LSRequest.qq("lid");
            string str = this.Session["user_name"].ToString();
            agent_userinfo_session _session = this.Session[str + "lottery_session_user_info"] as agent_userinfo_session;

            this.skin = _session.get_u_skin();
            if (_session.get_u_type().Equals("zj"))
            {
                base.Response.Redirect("/MessagePage.aspx?code=u100057&url=&issuccess=1&isback=0");
                base.Response.End();
            }
            DataSet userCredit = CallBLL.cz_users_bll.GetUserCredit(this.Session["user_name"].ToString());

            if (((userCredit != null) && (userCredit.Tables.Count > 0)) && (userCredit.Tables[0].Rows.Count > 0))
            {
                this.six_credit        = Convert.ToDouble(userCredit.Tables[0].Rows[0]["six_credit"]);
                this.six_usable_credit = Convert.ToDouble(userCredit.Tables[0].Rows[0]["six_usable_credit"]);
                this.six_iscash        = userCredit.Tables[0].Rows[0]["six_iscash"].ToString();
                this.kc_credit         = Convert.ToDouble(userCredit.Tables[0].Rows[0]["kc_credit"]);
                this.kc_usable_credit  = Convert.ToDouble(userCredit.Tables[0].Rows[0]["kc_usable_credit"]);
                this.kc_iscash         = userCredit.Tables[0].Rows[0]["kc_iscash"].ToString();
            }
            if (_session.get_six_kind().ToLower() != "0")
            {
                if (_session.get_six_kind().ToLower() != "a")
                {
                    this.pk_six_a = "display:none;";
                }
                if (_session.get_six_kind().ToLower() != "b")
                {
                    this.pk_six_b = "display:none;";
                }
                if (_session.get_six_kind().ToLower() != "c")
                {
                    this.pk_six_c = "display:none;";
                }
            }
            else
            {
                this.pk_six_a = "display:;";
                this.pk_six_b = "display:;";
                this.pk_six_c = "display:;";
            }
            if (_session.get_kc_kind().ToLower() != "0")
            {
                if (_session.get_kc_kind().ToLower() != "a")
                {
                    this.pk_kc_a = "display:none;";
                }
                if (_session.get_kc_kind().ToLower() != "b")
                {
                    this.pk_kc_b = "display:none;";
                }
                if (_session.get_kc_kind().ToLower() != "c")
                {
                    this.pk_kc_c = "display:none;";
                }
            }
            else
            {
                this.pk_kc_a = "display:;";
                this.pk_kc_b = "display:;";
                this.pk_kc_c = "display:;";
            }
            foreach (DataRow row in this.lotteryDT.Rows)
            {
                int num  = Convert.ToInt32(row["id"].ToString());
                int num2 = Convert.ToInt32(row["master_id"].ToString());
                if (num2.Equals(1))
                {
                    this.six_m_id = num2;
                }
                if (num2.Equals(2))
                {
                    this.kc_m_id = num2;
                }
                if (num.Equals(0))
                {
                    DataSet playByName = CallBLL.cz_play_kl10_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((playByName != null) && (playByName.Tables.Count > 0)) && (playByName.Tables[0].Rows.Count > 0))
                    {
                        this.kl10_DT = playByName.Tables[0];
                    }
                }
                if (num.Equals(1))
                {
                    DataSet set3 = CallBLL.cz_play_cqsc_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set3 != null) && (set3.Tables.Count > 0)) && (set3.Tables[0].Rows.Count > 0))
                    {
                        this.cqsc_DT = set3.Tables[0];
                    }
                }
                if (num.Equals(2))
                {
                    DataSet set4 = CallBLL.cz_play_pk10_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set4 != null) && (set4.Tables.Count > 0)) && (set4.Tables[0].Rows.Count > 0))
                    {
                        this.pk10_DT = set4.Tables[0];
                    }
                }
                if (num.Equals(3))
                {
                    DataSet set5 = CallBLL.cz_play_xync_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set5 != null) && (set5.Tables.Count > 0)) && (set5.Tables[0].Rows.Count > 0))
                    {
                        this.xync_DT = set5.Tables[0];
                    }
                }
                if (num.Equals(4))
                {
                    DataSet set6 = CallBLL.cz_play_jsk3_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set6 != null) && (set6.Tables.Count > 0)) && (set6.Tables[0].Rows.Count > 0))
                    {
                        this.jsk3_DT = set6.Tables[0];
                    }
                }
                if (num.Equals(5))
                {
                    DataSet set7 = CallBLL.cz_play_kl8_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set7 != null) && (set7.Tables.Count > 0)) && (set7.Tables[0].Rows.Count > 0))
                    {
                        this.kl8_DT = set7.Tables[0];
                    }
                }
                if (num.Equals(6))
                {
                    DataSet set8 = CallBLL.cz_play_k8sc_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set8 != null) && (set8.Tables.Count > 0)) && (set8.Tables[0].Rows.Count > 0))
                    {
                        this.k8sc_DT = set8.Tables[0];
                    }
                }
                if (num.Equals(7))
                {
                    DataSet set9 = CallBLL.cz_play_pcdd_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set9 != null) && (set9.Tables.Count > 0)) && (set9.Tables[0].Rows.Count > 0))
                    {
                        this.pcdd_DT = set9.Tables[0];
                    }
                }
                if (num.Equals(100))
                {
                    DataSet set10 = null;
                    if (!FileCacheHelper.get_IsShowLM_B())
                    {
                        set10 = CallBLL.cz_play_six_bll.GetPlayByName(this.Session["user_name"].ToString(), "91060,91061,91062,91063,91064,91065");
                    }
                    else
                    {
                        set10 = CallBLL.cz_play_six_bll.GetPlayByName(this.Session["user_name"].ToString());
                    }
                    if (((set10 != null) && (set10.Tables.Count > 0)) && (set10.Tables[0].Rows.Count > 0))
                    {
                        this.six_DT = set10.Tables[0];
                    }
                }
                if (num.Equals(9))
                {
                    DataSet set11 = CallBLL.cz_play_xyft5_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set11 != null) && (set11.Tables.Count > 0)) && (set11.Tables[0].Rows.Count > 0))
                    {
                        this.xyft5_DT = set11.Tables[0];
                    }
                }
                if (num.Equals(8))
                {
                    DataSet set12 = CallBLL.cz_play_pkbjl_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set12 != null) && (set12.Tables.Count > 0)) && (set12.Tables[0].Rows.Count > 0))
                    {
                        this.pkbjl_DT = set12.Tables[0];
                    }
                }
                if (num.Equals(10))
                {
                    DataSet set13 = CallBLL.cz_play_jscar_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set13 != null) && (set13.Tables.Count > 0)) && (set13.Tables[0].Rows.Count > 0))
                    {
                        this.jscar_DT = set13.Tables[0];
                    }
                }
                if (num.Equals(11))
                {
                    DataSet set14 = CallBLL.cz_play_speed5_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set14 != null) && (set14.Tables.Count > 0)) && (set14.Tables[0].Rows.Count > 0))
                    {
                        this.speed5_DT = set14.Tables[0];
                    }
                }
                if (num.Equals(13))
                {
                    DataSet set15 = CallBLL.cz_play_jscqsc_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set15 != null) && (set15.Tables.Count > 0)) && (set15.Tables[0].Rows.Count > 0))
                    {
                        this.jscqsc_DT = set15.Tables[0];
                    }
                }
                if (num.Equals(12))
                {
                    DataSet set16 = CallBLL.cz_play_jspk10_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set16 != null) && (set16.Tables.Count > 0)) && (set16.Tables[0].Rows.Count > 0))
                    {
                        this.jspk10_DT = set16.Tables[0];
                    }
                }
                if (num.Equals(14))
                {
                    DataSet set17 = CallBLL.cz_play_jssfc_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set17 != null) && (set17.Tables.Count > 0)) && (set17.Tables[0].Rows.Count > 0))
                    {
                        this.jssfc_DT = set17.Tables[0];
                    }
                }
                if (num.Equals(15))
                {
                    DataSet set18 = CallBLL.cz_play_jsft2_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set18 != null) && (set18.Tables.Count > 0)) && (set18.Tables[0].Rows.Count > 0))
                    {
                        this.jsft2_DT = set18.Tables[0];
                    }
                }
                if (num.Equals(0x10))
                {
                    DataSet set19 = CallBLL.cz_play_car168_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set19 != null) && (set19.Tables.Count > 0)) && (set19.Tables[0].Rows.Count > 0))
                    {
                        this.car168_DT = set19.Tables[0];
                    }
                }
                if (num.Equals(0x11))
                {
                    DataSet set20 = CallBLL.cz_play_ssc168_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set20 != null) && (set20.Tables.Count > 0)) && (set20.Tables[0].Rows.Count > 0))
                    {
                        this.ssc168_DT = set20.Tables[0];
                    }
                }
                if (num.Equals(0x12))
                {
                    DataSet set21 = CallBLL.cz_play_vrcar_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set21 != null) && (set21.Tables.Count > 0)) && (set21.Tables[0].Rows.Count > 0))
                    {
                        this.vrcar_DT = set21.Tables[0];
                    }
                }
                if (num.Equals(0x13))
                {
                    DataSet set22 = CallBLL.cz_play_vrssc_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set22 != null) && (set22.Tables.Count > 0)) && (set22.Tables[0].Rows.Count > 0))
                    {
                        this.vrssc_DT = set22.Tables[0];
                    }
                }
                if (num.Equals(20))
                {
                    DataSet set23 = CallBLL.cz_play_xyftoa_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set23 != null) && (set23.Tables.Count > 0)) && (set23.Tables[0].Rows.Count > 0))
                    {
                        this.xyftoa_DT = set23.Tables[0];
                    }
                }
                if (num.Equals(0x15))
                {
                    DataSet set24 = CallBLL.cz_play_xyftsg_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set24 != null) && (set24.Tables.Count > 0)) && (set24.Tables[0].Rows.Count > 0))
                    {
                        this.xyftsg_DT = set24.Tables[0];
                    }
                }
                if (num.Equals(0x16))
                {
                    DataSet set25 = CallBLL.cz_play_happycar_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set25 != null) && (set25.Tables.Count > 0)) && (set25.Tables[0].Rows.Count > 0))
                    {
                        this.happycar_DT = set25.Tables[0];
                    }
                }
            }
        }
Esempio n. 22
0
        private void user_login(HttpContext context, ref string strResult)
        {
            string       str    = "";
            string       str2   = "";
            string       str3   = "";
            string       str4   = "";
            ReturnResult result = new ReturnResult();
            Dictionary <string, object> dictionary = new Dictionary <string, object> {
                {
                    "type",
                    "user_login"
                }
            };
            string loginName    = LSRequest.qq("loginName").Trim().ToLower();
            string loginPwd     = LSRequest.qq("loginPwd").Trim();
            string ValidateCode = LSRequest.qq("ValidateCode").Trim();

            if (PageBase.is_ip_locked())
            {
                context.Session["lottery_session_img_code"] = null;
                result.set_success(400);
                result.set_tipinfo("由於輸入錯誤次數過多,您已被禁用,請稍後再試!");
                strResult = JsonHandle.ObjectToJson(result);
            }
            else if (string.IsNullOrEmpty(loginName) || string.IsNullOrEmpty(loginPwd))
            {
                context.Response.End();
            }
            else
            {
                DateTime time = new DateTime();
                string   retry_times;
                string   str10;
                string   str11;
                string   str14;
                DateTime?nullable;
                int      num2;
                DateTime?nullable3;
                DateTime time2;
                if (int.Parse(FileCacheHelper.get_GetLockedPasswordCount()) == 0)
                {
                    context.Session["lottery_session_img_code_display"] = 1;
                }
                if (context.Session["lottery_session_img_code_display"] == null)
                {
                    if (CallBLL.cz_user_psw_err_log_bll.IsExistUser(loginName))
                    {
//                        TODO 登录超时
//                        if (PageBase.IsErrTimesAbove(ref time, str5))
//                        {
//                            if (!PageBase.IsErrTimeout(time))
//                            {
//                                context.Session["lottery_session_img_code"] = null;
//                                result.set_success(400);
//                                result.set_tipinfo("");
//                                dictionary.Add("is_display_code", "1");
//                                result.set_data(dictionary);
//                                strResult = JsonHandle.ObjectToJson(result);
//                                context.Session["lottery_session_img_code_display"] = 1;
//                                return;
//                            }
//                            CallBLL.cz_user_psw_err_log_bll.ZeroErrTimes(str5);
//                            context.Session["lottery_session_img_code"] = null;
//                            context.Session["lottery_session_img_code_display"] = 0;
//                        }
//                        else
//                        {
//                            context.Session["lottery_session_img_code"] = null;
//                            context.Session["lottery_session_img_code_display"] = 0;
//                        }
                    }
                    else
                    {
                        context.Session["lottery_session_img_code"]         = null;
                        context.Session["lottery_session_img_code_display"] = 0;
                    }
                }
                if (context.Session["lottery_session_img_code_display"].ToString() == "0")
                {
                    if (string.IsNullOrEmpty(loginName) || string.IsNullOrEmpty(loginPwd))
                    {
                        context.Response.End();
                        return;
                    }
                }
                else
                {
                    if (string.IsNullOrEmpty(loginName) || string.IsNullOrEmpty(loginPwd))
                    {
                        context.Response.End();
                        return;
                    }
                    if (string.IsNullOrEmpty(ValidateCode))
                    {
                        context.Session["lottery_session_img_code"] = null;
                        result.set_success(400);
                        result.set_tipinfo("");
                        dictionary.Add("is_display_code", "1");
                        result.set_data(dictionary);
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session["lottery_session_img_code_display"] = 1;
                        return;
                    }
                    if (context.Session["lottery_session_img_code"] == null)
                    {
                        context.Response.End();
                        return;
                    }
                    if (context.Session["lottery_session_img_code"].ToString().ToLower() != ValidateCode.ToLower())
                    {
                        context.Session["lottery_session_img_code"] = null;
                        result.set_success(400);
                        result.set_tipinfo(PageBase.GetMessageByCache("u100001", "MessageHint"));
                        strResult = JsonHandle.ObjectToJson(result);
                        return;
                    }
                }
                cz_users       _users = CallBLL.cz_users_bll.AgentLogin(loginName.ToLower());
                cz_users_child _child = null;
                if (_users == null)
                {
                    _child = CallBLL.cz_users_child_bll.AgentLogin(loginName.ToLower());
                    if (_child != null)
                    {
                        retry_times = _child.get_retry_times().ToString();
                        if (!string.IsNullOrEmpty(retry_times) && (int.Parse(retry_times) > int.Parse(FileCacheHelper.get_GetLockedUserCount())))
                        {
                            if (!PageBase.IsLockedTimeout(loginName, "child"))
                            {
                                context.Session["lottery_session_img_code"] = null;
                                result.set_success(560);
                                result.set_tipinfo("您的帳號因密碼多次輸入錯誤被鎖死,請與管理員聯系!");
                                strResult = JsonHandle.ObjectToJson(result);
                                return;
                            }
                            PageBase.zero_retry_times_children(loginName);
                        }
                        str10 = _child.get_salt().Trim();
                        str11 = DESEncrypt.EncryptString(loginPwd, str10);
                        if (_child.get_u_psw() != str11)
                        {
                            context.Session["lottery_session_img_code"] = null;
                            PageBase.inc_retry_times_children(loginName);
                            PageBase.login_error_ip();
                            result.set_success(400);
                            result.set_tipinfo(PageBase.GetMessageByCache("u100003", "MessageHint"));
                            strResult = JsonHandle.ObjectToJson(result);
                            if (context.Session["lottery_session_img_code_display"].ToString() == "0")
                            {
                                if (CallBLL.cz_user_psw_err_log_bll.IsExistUser(loginName))
                                {
                                    CallBLL.cz_user_psw_err_log_bll.UpdateErrTimes(loginName);
                                }
                                else
                                {
                                    CallBLL.cz_user_psw_err_log_bll.AddUser(loginName);
                                }
                                if (PageBase.IsErrTimesAbove(ref time, loginName))
                                {
                                    context.Session["lottery_session_img_code"] = null;
                                    result.set_success(400);
                                    result.set_tipinfo(PageBase.GetMessageByCache("u100003", "MessageHint"));
                                    dictionary.Add("is_display_code", "1");
                                    result.set_data(dictionary);
                                    strResult = JsonHandle.ObjectToJson(result);
                                    context.Session["lottery_session_img_code_display"] = 1;
                                }
                            }
                            return;
                        }
                        str2   = _child.get_status().ToString();
                        str3   = PageBase.upper_user_status(_child.get_parent_u_name());
                        _users = CallBLL.cz_users_bll.AgentLogin(_child.get_parent_u_name());
                    }
                    else
                    {
                        context.Session["lottery_session_img_code"] = null;
                        PageBase.login_error_ip();
                        result.set_success(400);
                        result.set_tipinfo(PageBase.GetMessageByCache("u100002", "MessageHint"));
                        dictionary.Add("fs_name", "loginName");
                        strResult = JsonHandle.ObjectToJson(result);
                        return;
                    }
                    PageBase.zero_retry_times_children(loginName);
                }
                else
                {
                    retry_times = _users.get_retry_times().ToString();
                    if (!string.IsNullOrEmpty(retry_times) && (int.Parse(retry_times) > int.Parse(FileCacheHelper.get_GetLockedUserCount())))
                    {
                        if (!PageBase.IsLockedTimeout(loginName, "master"))
                        {
                            context.Session["lottery_session_img_code"] = null;
                            result.set_success(560);
                            result.set_tipinfo("您的帳號因密碼多次輸入錯誤被鎖死,請與管理員聯系!");
                            strResult = JsonHandle.ObjectToJson(result);
                            return;
                        }
                        PageBase.zero_retry_times(loginName);
                    }
                    str = _users.get_a_state().ToString();
                    string str12 = _users.get_a_state().ToString();
                    str4 = PageBase.upper_user_status(_users.get_u_name());
                    if (str12.Equals("2"))
                    {
                        context.Session["lottery_session_img_code"] = null;
                        result.set_success(400);
                        result.set_tipinfo(PageBase.GetMessageByCache("u100005", "MessageHint"));
                        dictionary.Add("fs_name", "loginName");
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session.Abandon();
                        return;
                    }
                    if (str4 == "2")
                    {
                        context.Session["lottery_session_img_code"] = null;
                        result.set_success(400);
                        result.set_tipinfo("您的上級帳號已被停用,请与管理员联系!");
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session.Abandon();
                        return;
                    }
                    str   = (str12 == null) ? "0" : str;
                    str10 = _users.get_salt().Trim();
                    str11 = DESEncrypt.EncryptString(loginPwd, str10);
                    if (_users.get_u_psw() != str11)
                    {
                        context.Session["lottery_session_img_code"] = null;
                        PageBase.inc_retry_times(loginName);
                        PageBase.login_error_ip();
                        result.set_success(400);
                        result.set_tipinfo(PageBase.GetMessageByCache("u100003", "MessageHint"));
                        strResult = JsonHandle.ObjectToJson(result);
                        if (context.Session["lottery_session_img_code_display"].ToString() == "0")
                        {
                            if (CallBLL.cz_user_psw_err_log_bll.IsExistUser(loginName))
                            {
                                CallBLL.cz_user_psw_err_log_bll.UpdateErrTimes(loginName);
                            }
                            else
                            {
                                CallBLL.cz_user_psw_err_log_bll.AddUser(loginName);
                            }
                            if (PageBase.IsErrTimesAbove(ref time, loginName))
                            {
                                context.Session["lottery_session_img_code"] = null;
                                result.set_success(400);
                                result.set_tipinfo(PageBase.GetMessageByCache("u100003", "MessageHint"));
                                dictionary.Add("is_display_code", "1");
                                result.set_data(dictionary);
                                strResult = JsonHandle.ObjectToJson(result);
                                context.Session["lottery_session_img_code_display"] = 1;
                            }
                        }
                        return;
                    }
                    PageBase.zero_retry_times(loginName);
                }
                if (!string.IsNullOrEmpty(str2))
                {
                    context.Session["user_name"]       = _users.get_u_name().Trim();
                    context.Session["user_type"]       = _users.get_u_type().Trim();
                    context.Session["child_user_name"] = _child.get_u_name().Trim();
                    context.Session["user_state"]      = str2.Trim();
                    if (str2.Equals("2"))
                    {
                        context.Session["lottery_session_img_code"] = null;
                        result.set_success(400);
                        result.set_tipinfo("您的帳號已被停用,请与管理员联系!");
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session.Abandon();
                        return;
                    }
                    if (_users.get_a_state() == 2)
                    {
                        context.Session["lottery_session_img_code"] = null;
                        result.set_success(400);
                        result.set_tipinfo("您的主帳號已被停用,请与管理员联系!");
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session.Abandon();
                        return;
                    }
                    if (str3 == "2")
                    {
                        context.Session["lottery_session_img_code"] = null;
                        result.set_success(400);
                        result.set_tipinfo("您的上級帳號已被停用,请与管理员联系!");
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session.Abandon();
                        return;
                    }
                    if (str2 == "1")
                    {
                        result.set_success(200);
                        result.set_tipinfo(PageBase.GetMessageByCache("u100004", "MessageHint"));
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session["user_state"] = str2;
                    }
                    else if (_users.get_a_state() == 1)
                    {
                        result.set_success(200);
                        result.set_tipinfo("您的主帳號已被凍結,请与管理员联系!");
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session["user_state"] = _users.get_a_state().ToString();
                    }
                    else if (str3 == "1")
                    {
                        result.set_success(200);
                        result.set_tipinfo(PageBase.GetMessageByCache("u100006", "MessageHint"));
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session["user_state"] = str3;
                    }
                    else
                    {
                        context.Session["user_state"] = "0";
                        result.set_success(200);
                        strResult = JsonHandle.ObjectToJson(result);
                    }
                }
                else
                {
                    context.Session["user_name"]  = _users.get_u_name().Trim();
                    context.Session["user_type"]  = _users.get_u_type().Trim();
                    context.Session["user_state"] = str.Trim();
                    if (str.Equals("1"))
                    {
                        result.set_success(200);
                        result.set_tipinfo(PageBase.GetMessageByCache("u100004", "MessageHint"));
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session["user_state"] = str;
                    }
                    else if (str4 == "1")
                    {
                        result.set_success(200);
                        result.set_tipinfo(PageBase.GetMessageByCache("u100006", "MessageHint"));
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session["user_state"] = str4;
                    }
                    else
                    {
                        context.Session["user_state"] = "0";
                        result.set_success(200);
                        strResult = JsonHandle.ObjectToJson(result);
                    }
                }
                agent_userinfo_session _session = new agent_userinfo_session();
                _session.set_u_id(_users.get_u_id());
                _session.set_u_name(_users.get_u_name().Trim());
                _session.set_u_psw(_users.get_u_psw().Trim());
                _session.set_u_nicker(_users.get_u_nicker().Trim());
                _session.set_u_skin(_users.get_u_skin().Trim());
                if (_child != null)
                {
                    if (string.IsNullOrEmpty(_child.get_u_skin()))
                    {
                        _session.set_u_skin("");
                    }
                    else
                    {
                        _session.set_u_skin(_child.get_u_skin());
                    }
                }
                _session.set_sup_name(_users.get_sup_name().Trim());
                _session.set_u_type(_users.get_u_type().Trim());
                _session.set_su_type(_users.get_su_type().Trim());
                _session.set_a_state(_users.get_a_state());
                _session.set_six_kind(_users.get_six_kind());
                _session.set_kc_kind(_users.get_kc_kind());
                _session.set_allow_sale(_users.get_allow_sale());
                _session.set_kc_allow_sale(_users.get_kc_allow_sale());
                _session.set_negative_sale(_users.get_negative_sale());
                if (!_users.get_allow_view_report().HasValue)
                {
                    _session.set_allow_view_report(0);
                }
                else
                {
                    _session.set_allow_view_report(_users.get_allow_view_report());
                }
                DataRow item = CallBLL.cz_admin_sysconfig_bll.GetItem();
                if (item == null)
                {
                    _session.set_u_skin("Blue");
                }
                else
                {
                    string str13 = item["agent_skin"].ToString();
                    if (string.IsNullOrEmpty(_session.get_u_skin()) || (str13.IndexOf(_session.get_u_skin()) < 0))
                    {
                        _session.set_u_skin(str13.Split(new char[] { '|' })[0]);
                    }
                }
                if (_child != null)
                {
                    _child.set_salt("");
                }
                _session.set_users_child_session(_child);
                DataTable zJInfo = CallBLL.cz_users_bll.GetZJInfo();
                if (zJInfo != null)
                {
                    _session.set_zjname(zJInfo.Rows[0]["u_name"].ToString().Trim());
                }
                if (!_session.get_u_type().ToLower().Equals("zj"))
                {
                    cz_rate_kc rateKCByUserName = CallBLL.cz_rate_kc_bll.GetRateKCByUserName(_session.get_u_name());
                    _session.set_fgs_name(rateKCByUserName.get_fgs_name());
                    _session.set_gd_name(rateKCByUserName.get_gd_name());
                    _session.set_zd_name(rateKCByUserName.get_zd_name());
                    _session.set_dl_name(rateKCByUserName.get_dl_name());
                    DataTable userOpOdds = CallBLL.cz_rate_kc_bll.GetUserOpOdds(_session.get_u_name());
                    if (userOpOdds != null)
                    {
                        if ((userOpOdds.Rows[0]["six_op_odds"] != null) && (userOpOdds.Rows[0]["six_op_odds"].ToString() != ""))
                        {
                            _session.set_six_op_odds(new int?(int.Parse(userOpOdds.Rows[0]["six_op_odds"].ToString())));
                        }
                        if ((userOpOdds.Rows[0]["kc_op_odds"] != null) && (userOpOdds.Rows[0]["kc_op_odds"].ToString() != ""))
                        {
                            _session.set_kc_op_odds(new int?(int.Parse(userOpOdds.Rows[0]["kc_op_odds"].ToString())));
                        }
                    }
                }
                context.Session["child_user_name"] = null;
                if (_child != null)
                {
                    context.Session["child_user_name"] = _child.get_u_name();
                }
                context.Session["user_name"] = _users.get_u_name();
                context.Session[_users.get_u_name() + "lottery_session_user_info"] = _session;
                PageBase.SetAppcationFlag(loginName);
                if (FileCacheHelper.get_RedisStatOnline().Equals(1) || FileCacheHelper.get_RedisStatOnline().Equals(2))
                {
                    bool flag4 = false;
                    if ((_session.get_users_child_session() != null) && _session.get_users_child_session().get_is_admin().Equals(1))
                    {
                        flag4 = true;
                    }
                    if (!flag4)
                    {
//                        if (FileCacheHelper.get_RedisStatOnline().Equals(1))
//                        {
//                            new PageBase_Redis().InitUserOnlineTopToRedis(str5, _session.get_u_type());
//                        }
//                        if (FileCacheHelper.get_RedisStatOnline().Equals(2))
//                        {
//                            new PageBase_Redis().InitUserOnlineTopToRedisStack(str5, _session.get_u_type());
//                        }
                    }
                }
                else
                {
                    MemberPageBase.stat_top_online(loginName);
                    MemberPageBase.stat_online(loginName, _session.get_u_type());
                }
                if (FileCacheHelper.get_RedisStatOnline() == 0)
                {
                    PageBase.ZeroIsOutFlag(loginName);
                }
                CallBLL.cz_user_psw_err_log_bll.ZeroErrTimes(loginName);
                cz_login_log _log = new cz_login_log();
                _log.set_ip(LSRequest.GetIP());
                _log.set_login_time(new DateTime?(DateTime.Now));
                _log.set_u_name(loginName);
                PageBase base2 = new PageBase();
//                _log.set_browser_type(Utils.GetBrowserInfo(HttpContext.Current));
                bool flag5 = CallBLL.cz_login_log_bll.Add(_log);
                if (_child == null)
                {
                    str14 = _users.get_is_changed().ToString();
                    if (string.IsNullOrEmpty(str14))
                    {
                        result.set_success(550);
                        result.set_tipinfo("新密碼首次登錄,需重置密碼!");
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session["modifypassword"] = "******";
                    }
                    else if (str14 == "0")
                    {
                        result.set_success(550);
                        result.set_tipinfo("新密碼首次登錄,需重置密碼!");
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session["modifypassword"] = "******";
                    }
                    else
                    {
                        nullable  = _users.get_last_changedate();
                        num2      = PageBase.PasswordExpire();
                        nullable3 = nullable;
                        time2     = DateTime.Now.AddDays((double)-num2);
                        if (nullable3.HasValue ? (nullable3.GetValueOrDefault() < time2) : false)
                        {
                            result.set_success(550);
                            result.set_tipinfo("密碼過期,需重置密碼!");
                            strResult = JsonHandle.ObjectToJson(result);
                            context.Session["modifypassword"] = "******";
                        }
                    }
                }
                else
                {
                    str14 = _child.get_is_changed().ToString();
                    if (string.IsNullOrEmpty(str14))
                    {
                        result.set_success(550);
                        result.set_tipinfo("新密碼首次登錄,需重置密碼!");
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session["modifypassword"] = "******";
                    }
                    else if (str14 == "0")
                    {
                        result.set_success(550);
                        result.set_tipinfo("新密碼首次登錄,需重置密碼!");
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session["modifypassword"] = "******";
                    }
                    else
                    {
                        nullable = _child.get_last_changedate();
                        num2     = PageBase.PasswordExpire();
                        if (nullable.HasValue && ((nullable3 = nullable).HasValue ? (nullable3.GetValueOrDefault() < (time2 = DateTime.Now.AddDays((double)-num2))) : false))
                        {
                            result.set_success(550);
                            result.set_tipinfo("密碼過期,需重置密碼!");
                            strResult = JsonHandle.ObjectToJson(result);
                            context.Session["modifypassword"] = "******";
                        }
                    }
                }
            }
        }
Esempio n. 23
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            if (MainFragmentStatus == null)
            {
                var mainFragmentStatusCache = FileCacheHelper.ReadCacheFile(
                    ContentActivity.CacheCatagory,
                    string.Format(
                        MainFragmentStatusCacheFile,
                        ((ContentActivity)Activity).AsyncTaskActivityGUID));
                if (!string.IsNullOrEmpty(mainFragmentStatusCache))
                {
                    MainFragmentStatus = JsonConvert.DeserializeObject <ContentMainFragmentState>(mainFragmentStatusCache);
                }
            }

            if (MainFragmentStatus == null)
            {
                MainFragmentStatus = new ContentMainFragmentState();
            }

            var v = inflater.Inflate(Resource.Layout.content_main_fragment, container, false);

            if (((ContentActivity)Activity).Publication == null)
            {
                return(v);
            }

            //llLeftPanelContainer = v.FindViewById<LinearLayout>(Resource.Id.llLeftPanelContainer);
            //frLeftPanelContainer = v.FindViewById<FrameLayout>(Resource.Id.frLeftPanelContainer);
            llLeftPanelContainerStub = v.FindViewById <LinearLayout>(Resource.Id.llLeftPanelContainerStub);

            llMainBoard = v.FindViewById <LinearLayout>(Resource.Id.llMainBoard);

            //rgMainTab = v.FindViewById<RadioGroup>(Resource.Id.rgMainTab);
            //rbContents = v.FindViewById<RadioButton>(Resource.Id.rbContents);
            //rbIndex = v.FindViewById<RadioButton>(Resource.Id.rbIndex);
            rbAnnotations = v.FindViewById <RadioButton>(Resource.Id.rbAnnotations);

            //rgMainTab.CheckedChange += MainTabCheckedChange;

            LogHelper.Debug("dbg", "ContentMainFragment::OnCreateView");

            //var fragment = Activity.SupportFragmentManager.FindShowingFragmentById(Resource.Id.frLeftPanelContainer);
            //if (fragment == null)
            //{

            //    //var tocPanelFragment = new TOCPanelFragment();
            //    //transaction.Add(Resource.Id.frLeftPanelContainer, tocPanelFragment, TOCPanelFragment.FragmentTag);


            //}
            //var transaction = Activity.SupportFragmentManager.BeginTransaction();

            //transaction.Add(Resource.Id.frRightPanelContainer, contentFragment, ContentFragment.FragmentTag).Commit();
            //Activity.SupportFragmentManager.SaveFragmentInstanceState(new ContentFragment());

            var loginFragment = new ContentFragment();

            Activity.SupportFragmentManager.BeginTransaction().Add(Resource.Id.frRightPanelContainer, loginFragment).Commit();


            OpenContentPage();
            //Refresh();
            //SetLeftPanelStatus();

            return(v);
        }
Esempio n. 24
0
        public DataTable GetLotteryList()
        {
            if (CacheHelper.GetCache("cz_lottery_FileCacheKey") != null)
            {
                return(CacheHelper.GetCache("cz_lottery_FileCacheKey") as DataTable);
            }
            DataTable table = CallBLL.cz_lottery_bll.GetList().Tables[0];

            CacheHelper.SetCache("cz_lottery_FileCacheKey", table);
            CacheHelper.SetPublicFileCache("cz_lottery_FileCacheKey", table, PageBase.GetPublicForderPath(FileCacheHelper.get_LotteryCachesFileName()));
            return(table);
        }
Esempio n. 25
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string str = this.Session["user_name"].ToString();

            this.login_u_type = this.Session["user_type"].ToString();
            this.userModel    = this.Session[str + "lottery_session_user_info"] as agent_userinfo_session;
            if (((!this.userModel.get_u_type().Trim().Equals("zj") && !this.userModel.get_u_type().Trim().Equals("fgs")) && (!this.userModel.get_u_type().Trim().Equals("gd") && !this.userModel.get_u_type().Trim().Equals("zd"))) && !this.userModel.get_u_type().Trim().Equals("dl"))
            {
                base.Response.Redirect("/MessagePage.aspx?code=u100035&url=&issuccess=1&isback=0");
            }
            DataTable lotteryList = base.GetLotteryList();

            this.isOpenSIX_M = base.GetMasterLotteryIsOpen(lotteryList, 1);
            this.isOpenKC_M  = base.GetMasterLotteryIsOpen(lotteryList, 2);
            DataTable table2 = lotteryList.DefaultView.ToTable(true, new string[] { "master_id" });

            for (int i = 0; i < table2.Rows.Count; i++)
            {
                if (Convert.ToInt32(table2.Rows[i][0]).Equals(1))
                {
                    this.lottrty_six = table2.Rows[i][0].ToString();
                }
                else if (Convert.ToInt32(table2.Rows[i][0]).Equals(2))
                {
                    this.lottrty_kc = table2.Rows[i][0].ToString();
                }
            }
            this.lid    = LSRequest.qq("lid");
            this.ml     = LSRequest.qq("ml");
            this.state  = LSRequest.qq("state");
            this.uid    = LSRequest.qq("uid");
            this.ut     = LSRequest.qq("ut");
            this.zstype = LSRequest.qq("zstype");
            if (this.userModel.get_u_type().Equals("dl") && string.IsNullOrEmpty(this.ut))
            {
                this.ut  = "dl";
                this.uid = this.userModel.get_u_id();
            }
            if (this.userModel.get_u_type().Equals("zd") && string.IsNullOrEmpty(this.ut))
            {
                this.ut  = "zd";
                this.uid = this.userModel.get_u_id();
            }
            if (this.userModel.get_u_type().Equals("gd") && string.IsNullOrEmpty(this.ut))
            {
                this.ut  = "gd";
                this.uid = this.userModel.get_u_id();
            }
            if (this.userModel.get_u_type().Equals("fgs") && string.IsNullOrEmpty(this.ut))
            {
                this.ut  = "fgs";
                this.uid = this.userModel.get_u_id();
            }
            if (!this.userModel.get_u_type().Equals("zj"))
            {
                cz_users userInfoByUID = CallBLL.cz_users_bll.GetUserInfoByUID(this.uid);
                if (!base.IsUpperLowerLevels(userInfoByUID.get_u_name(), this.userModel.get_u_type(), this.userModel.get_u_name()))
                {
                    base.Response.Redirect("/MessagePage.aspx?code=u100057&url=&issuccess=1&isback=0");
                    base.Response.End();
                }
            }
            this.sortNameState = LSRequest.qq("sortName");
            this.sortTypeState = LSRequest.qq("sortType");
            if (string.IsNullOrEmpty(this.sortNameState))
            {
                this.sortNameState = "0";
            }
            if (string.IsNullOrEmpty(this.sortTypeState))
            {
                this.sortTypeState = "0";
            }
            this.namesort = this.sortNameState;
            this.timesort = this.sortTypeState;
            if (string.IsNullOrEmpty(this.state))
            {
                this.state = "0";
            }
            this.flag = LSRequest.qq("flag");
            if (string.IsNullOrEmpty(this.flag))
            {
                this.flag = "0";
            }
            this.keyword = LSRequest.qq("keyword");
            this.page    = LSRequest.qq("page");
            if (string.IsNullOrEmpty(this.page))
            {
                this.page = "1";
            }
            this.url = string.Format("?lid={0}&ml={1}&state={2}&flag={3}&keyword={4}&sortName={5}&sortType={6}&page={7}&uid={8}&ut={9}&zstype={10}", new object[] { this.lid, this.ml, this.state, this.flag, this.keyword, this.namesort, this.timesort, this.page, this.uid, this.ut, this.zstype });
            if (LSRequest.qq("searchHidden").Equals("search"))
            {
                this.ml       = LSRequest.qq("ml");
                this.state    = LSRequest.qq("userState");
                this.flag     = LSRequest.qq("userFlag");
                this.keyword  = LSRequest.qq("searchkey");
                this.page     = LSRequest.qq("page");
                this.namesort = LSRequest.qq("sortName");
                this.timesort = LSRequest.qq("sortType");
                this.url      = string.Format("?lid={0}&ml={1}&state={2}&flag={3}&keyword={4}&sortName={5}&sortType={6}&page={7}&uid={8}&ut={9}&zstype={10}", new object[] { this.lid, this.ml, this.state, this.flag, this.keyword, this.namesort, this.timesort, 1, this.uid, this.ut, this.zstype });
                base.Response.Redirect(string.Format("hy_list.aspx{0}", this.url));
            }
            if (int.Parse(this.page) < 1)
            {
                this.page = "1";
            }
            if (FileCacheHelper.get_RedisStatOnline().Equals(1) || FileCacheHelper.get_RedisStatOnline().Equals(2))
            {
                this.userDT = CallBLL.cz_users_bll.GetUserHYList(this.state, "hy", this.flag, this.keyword, Convert.ToInt32(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, this.namesort, this.timesort, this.uid, this.ut, this.zstype, "redis");
            }
            else
            {
                this.userDT = CallBLL.cz_users_bll.GetUserHYList(this.state, "hy", this.flag, this.keyword, Convert.ToInt32(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, this.namesort, this.timesort, this.uid, this.ut, this.zstype);
            }
            this.FiledValue = new string[] { this.lid, this.ml, this.state, this.flag, this.namesort, this.timesort, this.keyword, this.uid, this.ut, this.zstype, this.sortNameState, this.sortTypeState };
            DataTable table3 = CallBLL.cz_users_bll.GetUserHYCreditSum(this.state, "hy", this.uid, this.ut, this.zstype);

            if (table3 != null)
            {
                this.six_usable_credit_sum = Utils.GetMathRound(Convert.ToDouble(table3.Rows[0]["six_usable_credit"].ToString()), 0);
                this.kc_usable_credit_sum  = Utils.GetMathRound(Convert.ToDouble(table3.Rows[0]["kc_usable_credit"].ToString()), 0);
            }
        }
Esempio n. 26
0
        private void AddUser()
        {
            cz_rate_kc rateKCByUserName = CallBLL.cz_rate_kc_bll.GetRateKCByUserName(this.d_u_name);

            base.En_User_Lock(rateKCByUserName.get_fgs_name());
            this.InitData();
            string str  = LSRequest.qq("userState");
            string str2 = LSRequest.qq("userPassword");
            string str3 = LSRequest.qq("userNicker");
            string str4 = LSRequest.qq("unlock");
            string s    = LSRequest.qq("userCredit_six");

            if (this.d_six_iscash.Equals("1"))
            {
                s = this.d_six_credit;
            }
            string str6  = LSRequest.qq("userRate_six");
            string str7  = LSRequest.qq("userAllowSale_six");
            string str8  = this.d_six_kind;
            string str9  = LSRequest.qq("allowmaxrate_six");
            string str10 = LSRequest.qq("lowmaxrate_six");
            string str11 = LSRequest.qq("userCredit_kc");

            if (this.d_kc_iscash.Equals("1"))
            {
                str11 = this.d_kc_credit;
            }
            string str12   = LSRequest.qq("userRate_kc");
            string str13   = LSRequest.qq("userAllowSale_kc");
            string str14   = this.d_kc_kind;
            string str15   = LSRequest.qq("allowmaxrate_kc");
            string str16   = LSRequest.qq("lowmaxrate_kc");
            string message = "";

            if (!base.ValidParamByUserEdit("dl", ref message, null, this.lottrty_six, this.lottrty_kc))
            {
                base.Response.Write(base.ShowDialogBox(message, null, 400));
                base.Response.End();
            }
            if (!string.IsNullOrEmpty(str2.Trim()) && !Regexlib.IsValidPassword(str2.Trim(), base.get_GetPasswordLU()))
            {
                if (base.get_GetPasswordLU().Equals("1"))
                {
                    base.Response.Write(base.ShowDialogBox("密碼要8-20位,且必需包含大寫字母、小寫字母和数字!", null, 400));
                }
                else
                {
                    base.Response.Write(base.ShowDialogBox("密碼要8-20位,且必需包含字母、和数字!", null, 400));
                }
                base.Response.End();
            }
            int num = 0;

            if (LSRequest.qq("sltlimithy").ToString().Trim().Equals("0"))
            {
                num = 0;
            }
            else
            {
                string str19 = LSRequest.qq("txtlimithy") ?? "";
                if (!string.IsNullOrEmpty(str19))
                {
                    num = int.Parse(str19);
                }
                if (num < int.Parse(this.currentLimit))
                {
                    base.Response.Write(base.ShowDialogBox(string.Format("代理下線人數不能小於 {0} 人", this.currentLimit), null, 400));
                    base.Response.End();
                }
            }
            if ((!str.Equals("0") && !str.Equals("1")) && !str.Equals("2"))
            {
                base.Response.End();
            }
            if (!string.IsNullOrEmpty(this.lottrty_six))
            {
                if ((!str8.ToUpper().Equals("A") && !str8.ToUpper().Equals("B")) && (!str8.ToUpper().Equals("C") && !str8.ToUpper().Equals("0")))
                {
                    base.Response.End();
                }
                if (!str7.ToUpper().Equals("0") && !str7.ToUpper().Equals("1"))
                {
                    base.Response.Write("<script>alert(\"(⑥合彩)補貨功能选择错误!!\");</script>");
                    base.Response.End();
                }
                if ((this.d_up_six_allow_sale == "0") && (str7 == "1"))
                {
                    base.Response.Write("<script>alert(\"(⑥合彩)補貨功能选择错误!!\");</script>");
                    base.Response.End();
                }
            }
            if (!string.IsNullOrEmpty(this.lottrty_kc))
            {
                if ((!str14.ToUpper().Equals("A") && !str14.ToUpper().Equals("B")) && (!str14.ToUpper().Equals("C") && !str14.ToUpper().Equals("0")))
                {
                    base.Response.End();
                }
                if (!str13.ToUpper().Equals("0") && !str13.ToUpper().Equals("1"))
                {
                    base.Response.Write("<script>alert(\"(快彩)補貨功能选择错误!!\");</script>");
                    base.Response.End();
                }
                if ((this.d_up_kc_allow_sale == "0") && (str13 == "1"))
                {
                    base.Response.Write("<script>alert(\"(快彩)補貨功能选择错误!!\");</script>");
                    base.Response.End();
                }
            }
            if ((double.Parse(s) - double.Parse(this.d_six_credit)) > double.Parse(this.d_up_six_usable_credit))
            {
                base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                base.Response.Write(base.ShowDialogBox("⑥合彩: 設定增加‘信用額度’超過上级可以用餘額!", null, 400));
                base.Response.End();
            }
            if (double.Parse(str6) > this.d_maxRate_six)
            {
                base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                base.Response.Write(base.ShowDialogBox("⑥合彩: 分公司占成 數不正确,请核实后重新输入!", null, 400));
                base.Response.End();
            }
            double num2 = double.Parse(s) - double.Parse(this.d_six_credit);

            if (double.Parse(s) < (double.Parse(this.d_six_credit) - Convert.ToDouble(this.d_six_usable_credit)))
            {
                base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                base.Response.Write(base.ShowDialogBox("⑥合彩: 設定減少‘信用額度’超過可‘回收’餘額!", null, 400));
                base.Response.End();
            }
            if (str9.Equals("1"))
            {
                if (string.IsNullOrEmpty(str10))
                {
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.Response.Write(base.ShowDialogBox("⑥合彩:‘占成上限’不可為空,請修改!", null, 400));
                    base.Response.End();
                }
                try
                {
                    int.Parse(str10);
                }
                catch
                {
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.Response.Write(base.ShowDialogBox("⑥合彩: ‘占成上限’只能為數字,請重新設定!", null, 400));
                    base.Response.End();
                }
                if (Convert.ToInt32(str10) > 100)
                {
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.Response.Write(base.ShowDialogBox("⑥合彩: ‘占成上限’不可高於 100%,請重新設定!", null, 400));
                    base.Response.End();
                }
                else if (Convert.ToInt32(str10) < 0)
                {
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.Response.Write(base.ShowDialogBox("⑥合彩: ‘占成上限’不可低於等於 0%,請重新設定!", null, 400));
                    base.Response.End();
                }
                if (double.Parse(str10) < this.d_downRate_six)
                {
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.Response.Write(base.ShowDialogBox(string.Format("⑥合彩: ‘占成上限’不可低於 {0}%,請重新設定!", this.d_downRate_six), null, 400));
                    base.Response.End();
                }
            }
            else
            {
                str10 = "0";
            }
            if ((double.Parse(str11) - double.Parse(this.d_kc_credit)) > double.Parse(this.d_up_kc_usable_credit))
            {
                base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                base.Response.Write(base.ShowDialogBox("快彩: 設定增加‘信用額度’超過上级可以用餘額!", null, 400));
                base.Response.End();
            }
            if (double.Parse(str12) > this.d_maxRate_kc)
            {
                base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                base.Response.Write(base.ShowDialogBox("快彩: 分公司占成 數不正确,请核实后重新输入!", null, 400));
                base.Response.End();
            }
            double num3 = double.Parse(str11) - double.Parse(this.d_kc_credit);

            if (double.Parse(str11) < (double.Parse(this.d_kc_credit) - Convert.ToDouble(this.d_kc_usable_credit)))
            {
                base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                base.Response.Write(base.ShowDialogBox("快彩: 設定減少‘信用額度’超過可‘回收’餘額!", null, 400));
                base.Response.End();
            }
            if (str15.Equals("1"))
            {
                if (string.IsNullOrEmpty(str16))
                {
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.Response.Write(base.ShowDialogBox("快彩:‘占成上限’不可為空,請修改!", null, 400));
                    base.Response.End();
                }
                try
                {
                    int.Parse(str16);
                }
                catch
                {
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.Response.Write(base.ShowDialogBox("快彩: ‘占成上限’只能為數字,請重新設定!", null, 400));
                    base.Response.End();
                }
                if (Convert.ToInt32(str16) > 100)
                {
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.Response.Write(base.ShowDialogBox("快彩: ‘占成上限’不可高於 100%,請重新設定!", null, 400));
                    base.Response.End();
                }
                else if (Convert.ToInt32(str16) < 0)
                {
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.Response.Write(base.ShowDialogBox("快彩: ‘占成上限’不可低於等於 0%,請重新設定!", null, 400));
                    base.Response.End();
                }
                if (double.Parse(str16) < this.d_downRate_kc)
                {
                    base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                    base.Response.Write(base.ShowDialogBox(string.Format("快彩: ‘占成上限’不可低於 {0}%,請重新設定!", this.d_downRate_kc), null, 400));
                    base.Response.End();
                }
            }
            else
            {
                str16 = "0";
            }
            int     num4 = 0;
            decimal num5 = 0M;
            decimal num6 = 0M;

            if (!string.IsNullOrEmpty(this.lottrty_six))
            {
                num4 = Convert.ToInt32(str6);
                num5 = Convert.ToDecimal(num2);
                num6 = Convert.ToDecimal(num2);
            }
            int     num7 = 0;
            decimal num8 = 0M;
            decimal num9 = 0M;

            if (!string.IsNullOrEmpty(this.lottrty_kc))
            {
                num7 = Convert.ToInt32(str12);
                num8 = Convert.ToDecimal(num3);
                num9 = Convert.ToDecimal(num3);
            }
            cz_users _users = new cz_users();

            _users.set_u_id(this.r_u_id.ToUpper());
            _users.set_u_name(this.d_u_name);
            _users.set_limit_hy(new int?(num));
            if (!string.IsNullOrEmpty(str4) && (str4 == "1"))
            {
                _users.set_retry_times(0);
            }
            if (!string.IsNullOrEmpty(str2))
            {
                string ramSalt = Utils.GetRamSalt(6);
                _users.set_u_psw(DESEncrypt.EncryptString(str2, ramSalt));
                _users.set_salt(ramSalt);
            }
            _users.set_u_nicker(str3);
            _users.set_a_state(new int?(Convert.ToInt32(str)));
            _users.set_u_type(this.d_u_type);
            _users.set_six_rate(new int?(num4));
            _users.set_six_credit(new decimal?(num5));
            _users.set_six_usable_credit(new decimal?(num6));
            _users.set_allow_sale(new int?(Convert.ToInt32(str7)));
            if (str9.Equals("1"))
            {
                _users.set_six_allow_maxrate(1);
                _users.set_six_low_maxrate(new int?(Convert.ToInt32(str10)));
            }
            else
            {
                _users.set_six_allow_maxrate(0);
                _users.set_six_low_maxrate(0);
            }
            _users.set_kc_rate(new int?(num7));
            _users.set_kc_credit(new decimal?(num8));
            _users.set_kc_usable_credit(new decimal?(num9));
            _users.set_kc_allow_sale(new int?(Convert.ToInt32(str13)));
            if (str15.Equals("1"))
            {
                _users.set_kc_allow_maxrate(1);
                _users.set_kc_low_maxrate(new int?(Convert.ToInt32(str16)));
            }
            else
            {
                _users.set_kc_allow_maxrate(0);
                _users.set_kc_low_maxrate(0);
            }
            bool flag2 = true;
            bool flag3 = true;
            bool flag4 = false;
            bool flag5 = false;

            if (str7.Equals("0") && this.d_six_allow_sale.Equals("1"))
            {
                flag4 = true;
            }
            if (str13.Equals("0") && this.d_kc_allow_sale.Equals("1"))
            {
                flag5 = true;
            }
            if (this.d_six_ExistsBet && this.d_six_OpenPhase)
            {
                flag2 = false;
                _users.set_allow_sale(new int?(int.Parse(this.d_six_allow_sale)));
                flag4 = false;
            }
            if (this.d_kc_ExistsBet && this.d_kc_OpenPhase)
            {
                flag3 = false;
                _users.set_kc_allow_sale(new int?(int.Parse(this.d_kc_allow_sale)));
                flag5 = false;
            }
            if (string.IsNullOrEmpty(this.lottrty_six))
            {
                flag2 = false;
            }
            if (string.IsNullOrEmpty(this.lottrty_kc))
            {
                flag3 = false;
            }
            DataTable userInfoTableByUID = CallBLL.cz_users_bll.GetUserInfoTableByUID(this.r_u_id);

            if (CallBLL.cz_users_bll.UpdateUserInfo(_users, flag2, flag3, flag4, flag5, this.d_up_u_type, this.d_up_u_name))
            {
                if (!this.d_kc_rate.Equals(_users.get_kc_rate().ToString()))
                {
                    FileCacheHelper.UpdateRateFile_kc();
                }
                if (!this.d_six_rate.Equals(_users.get_six_rate().ToString()))
                {
                    FileCacheHelper.UpdateRateFile_six();
                }
                base.user_edit_agent_log(userInfoTableByUID, CallBLL.cz_users_bll.GetUserInfoTableByUID(this.r_u_id), _users.get_u_name(), _users.get_u_type());
                base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                base.Response.Write(base.ShowDialogBox("修改代理成功!", base.UserReturnBackUrl, 0));
                base.Response.End();
            }
            else
            {
                base.Un_User_Lock(rateKCByUserName.get_fgs_name());
                base.Response.Write(base.ShowDialogBox("修改代理失敗!", base.UserReturnBackUrl, 400));
                base.Response.End();
            }
        }