Beispiel #1
0
        private void UpdateData()
        {
            this.ValidInput();
            cz_system_set_six _six = new cz_system_set_six();

            _six.set_lottery_type(100);
            _six.set_add_time(new DateTime?(DateTime.Now));
            _six.set_ev_0(LSRequest.qq("ev_0").Trim());
            _six.set_ev_1(LSRequest.qq("ev_1").Trim());
            _six.set_ev_2(LSRequest.qq("ev_2").Trim());
            _six.set_ev_3(LSRequest.qq("ev_3").Trim());
            _six.set_ev_4(LSRequest.qq("ev_4").Trim());
            _six.set_ev_5(LSRequest.qq("ev_5").Trim());
            _six.set_ev_6(LSRequest.qq("ev_6").Trim());
            _six.set_ev_7(LSRequest.qq("ev_7").Trim());
            _six.set_ev_8(LSRequest.qq("ev_8").Trim());
            _six.set_ev_9(LSRequest.qq("ev_9").Trim());
            _six.set_ev_10(LSRequest.qq("ev_10").Trim());
            _six.set_ev_11(LSRequest.qq("ev_11").Trim());
            _six.set_ev_12(LSRequest.qq("ev_12").Trim());
            _six.set_ev_13(LSRequest.qq("ev_13").Trim());
            _six.set_ev_14(LSRequest.qq("ev_14").Trim());
            _six.set_ev_15(LSRequest.qq("ev_15").Trim());
            _six.set_ev_16(LSRequest.qq("ev_16").Trim());
            _six.set_ev_17(LSRequest.qq("ev_17").Trim());
            _six.set_ev_18(LSRequest.qq("ev_18").Trim());
            _six.set_single_number_isdown(new int?(int.Parse(LSRequest.qq("singleNumberSet"))));
            _six.set_is_tmab(new int?(int.Parse(LSRequest.qq("abamountSet"))));
            CallBLL.cz_system_set_six_bll.SetSystemSet(_six);
            base.sys_set_log(this.model, CallBLL.cz_system_set_six_bll.GetSystemSet(100));
            this.GetLmGroupCount();
            string url = "/SystemSet/SystemSet_six.aspx?lid=" + this.lotteryId;

            base.Response.Write(base.ShowDialogBox("系統初始化參數保存成功!", url, 0));
            if (this.isRestUserAgent)
            {
                FileCacheHelper.UpdateWebconfig(0);
            }
            if (this.isOut)
            {
                this.OutZJ();
            }
            base.Response.End();
        }
Beispiel #2
0
        private void InsertLottery(string lotteryIds)
        {
            if (string.IsNullOrEmpty(lotteryIds))
            {
                base.Response.Write(base.ShowDialogBox("彩種最少選擇一項!", null, 400));
                base.Response.End();
            }
            string str  = LSRequest.qq("chk_kl8_night");
            string str2 = LSRequest.qq("chk_k8sc_night");
            string str3 = LSRequest.qq("chk_pcdd_night");

            if (string.IsNullOrEmpty(str))
            {
                str = "";
            }
            if (string.IsNullOrEmpty(str2))
            {
                str2 = "";
            }
            if (string.IsNullOrEmpty(str3))
            {
                str3 = "";
            }
            DataTable oldDT = CallBLL.cz_lottery_config_bll.GetList();

            lotteryIds.Split(new char[] { ',' });
            List <string> list = new List <string>();
            string        str4 = "";
            string        str5 = "";
            string        str6 = "";

            foreach (DataRow row in oldDT.Rows)
            {
                string item = row["id"].ToString();
                string str8 = row["is_display"].ToString();
                string str9 = row["night_flag"].ToString();
                if (str8 == "1")
                {
                    list.Add(item);
                    int num2 = 5;
                    if (item == num2.ToString())
                    {
                        str4 = str9;
                    }
                    int num3 = 6;
                    if (item == num3.ToString())
                    {
                        str5 = str9;
                    }
                    int num4 = 7;
                    if (item == num4.ToString())
                    {
                        str6 = str9;
                    }
                }
            }
            string str10 = string.Join(",", list.ToArray());
            bool   flag  = true;
            bool   flag2 = true;
            bool   flag3 = true;

            if (str10 == lotteryIds)
            {
                if (this.is_in_time())
                {
                    if (!string.IsNullOrEmpty(str4))
                    {
                        if (str4 == str)
                        {
                            flag = false;
                        }
                        else if ((str == "") && (str4 == "0"))
                        {
                            flag = false;
                        }
                    }
                    else
                    {
                        flag = false;
                    }
                    if (!string.IsNullOrEmpty(str5))
                    {
                        if (str5 == str2)
                        {
                            flag2 = false;
                        }
                        else if ((str2 == "") && (str5 == "0"))
                        {
                            flag2 = false;
                        }
                    }
                    else
                    {
                        flag2 = false;
                    }
                    if (!string.IsNullOrEmpty(str6))
                    {
                        if (str6 == str3)
                        {
                            flag3 = false;
                        }
                        else if ((str3 == "") && (str6 == "0"))
                        {
                            flag3 = false;
                        }
                    }
                    else
                    {
                        flag3 = false;
                    }
                }
                else
                {
                    flag  = false;
                    flag2 = false;
                    flag3 = false;
                }
            }
            if ((!flag && !flag2) && !flag3)
            {
                base.Response.Write(base.ShowDialogBox("無變動彩種!", "", 400));
                base.Response.End();
            }
            Dictionary <int, string> dictionary = new Dictionary <int, string>();

            if (this.is_in_time())
            {
                string str11 = "";
                switch (str)
                {
                case "1":
                    str11 = "1";
                    break;

                case "":
                    str11 = "0";
                    break;
                }
                dictionary.Add(5, str11);
                string str12 = "";
                if (str2 == "1")
                {
                    str12 = "1";
                }
                else if (str2 == "")
                {
                    str12 = "0";
                }
                dictionary.Add(6, str12);
                string str13 = "";
                if (str3 == "1")
                {
                    str13 = "1";
                }
                else if (str3 == "")
                {
                    str13 = "0";
                }
                dictionary.Add(7, str13);
            }
            if (CallBLL.cz_lottery_config_bll.InsertLottery(lotteryIds, dictionary) > 0)
            {
                base.czsd_log(oldDT, CallBLL.cz_lottery_config_bll.GetList());
                FileCacheHelper.UpdateWebconfig(0);
                string url = "lotteryconfig.aspx";
                base.Response.Write(base.ShowDialogBox("配置彩種成功!,系統正在退出,請重新登錄!!", url, 0));
                base.Response.End();
            }
            else
            {
                base.Response.Write(base.ShowDialogBox("配置彩種失敗!", "", 400));
                base.Response.End();
            }
        }
Beispiel #3
0
 private void UpdateLmGroup()
 {
     if (((this.lmGroupTable_kl10 != null) || (this.lmGroupTable_xync != null)) || ((this.lmGroupTable_pcdd != null) || (this.lmGroupTable_jssfc != null)))
     {
         if (this.lmGroupTable_kl10 != null)
         {
             this.ValidLmGroup(0, this.lmGroupTable_kl10);
         }
         if (this.lmGroupTable_xync != null)
         {
             this.ValidLmGroup(3, this.lmGroupTable_xync);
         }
         if (this.lmGroupTable_pcdd != null)
         {
             this.ValidLmGroup(7, this.lmGroupTable_pcdd);
         }
         if (this.lmGroupTable_jssfc != null)
         {
             this.ValidLmGroup(14, this.lmGroupTable_jssfc);
         }
         List <cz_lm_group_set> list = new List <cz_lm_group_set>();
         if (this.lmGroupTable_kl10 != null)
         {
             list.AddRange(this.GetSqlModel(0, this.lmGroupTable_kl10));
         }
         if (this.lmGroupTable_xync != null)
         {
             list.AddRange(this.GetSqlModel(3, this.lmGroupTable_xync));
         }
         if (this.lmGroupTable_pcdd != null)
         {
             list.AddRange(this.GetSqlModel(7, this.lmGroupTable_pcdd));
         }
         if (this.lmGroupTable_jssfc != null)
         {
             list.AddRange(this.GetSqlModel(14, this.lmGroupTable_jssfc));
         }
         if (list.Count > 0)
         {
             if (CallBLL.cz_lm_group_set_bll.Update(list) > 0)
             {
                 bool flag = true;
                 if (this.lmGroupTable_kl10 != null)
                 {
                     DataTable listKC = CallBLL.cz_lm_group_set_bll.GetListKC(0);
                     if (flag)
                     {
                         flag = Utils.CompareDataTable(this.lmGroupTable_kl10, listKC);
                     }
                     base.lm_group_set_log_kc(this.lmGroupTable_kl10, listKC, 0);
                 }
                 if (this.lmGroupTable_xync != null)
                 {
                     DataTable newDT = CallBLL.cz_lm_group_set_bll.GetListKC(3);
                     if (flag)
                     {
                         flag = Utils.CompareDataTable(this.lmGroupTable_xync, newDT);
                     }
                     base.lm_group_set_log_kc(this.lmGroupTable_xync, newDT, 3);
                 }
                 if (this.lmGroupTable_pcdd != null)
                 {
                     DataTable table3 = CallBLL.cz_lm_group_set_bll.GetListKC(7);
                     if (flag)
                     {
                         flag = Utils.CompareDataTable(this.lmGroupTable_pcdd, table3);
                     }
                     base.lm_group_set_log_kc(this.lmGroupTable_pcdd, table3, 7);
                 }
                 if (this.lmGroupTable_jssfc != null)
                 {
                     DataTable table4 = CallBLL.cz_lm_group_set_bll.GetListKC(14);
                     if (flag)
                     {
                         flag = Utils.CompareDataTable(this.lmGroupTable_jssfc, table4);
                     }
                     base.lm_group_set_log_kc(this.lmGroupTable_jssfc, table4, 14);
                 }
                 if (!flag)
                 {
                     FileCacheHelper.UpdateWebconfig(0);
                 }
                 base.Response.Write(base.ShowDialogBox("快彩連碼設置成功!", null, 400));
                 base.Response.End();
             }
             else
             {
                 base.Response.Write(base.ShowDialogBox("快彩連碼設置失敗!", null, 400));
                 base.Response.End();
             }
         }
     }
 }