Ejemplo n.º 1
0
        public int GetTsIssueNum(string lotteryId)
        {
            DateTime now = DateTime.Now;
            int      num = 0;

            using (DbOperHandler dbOperHandler = new ComData().Doh())
            {
                switch (lotteryId)
                {
                case "1010":
                case "3004":
                    dbOperHandler.Reset();
                    dbOperHandler.SqlCmd = "select datediff(d,'2016-10-08',Convert(varchar(10),getdate(),120)) as d";
                    num = 1658122 + Convert.ToInt32(dbOperHandler.GetDataTable().Rows[0]["d"]) * 880;
                    break;

                case "1017":
                    dbOperHandler.Reset();
                    dbOperHandler.SqlCmd = "select datediff(d,'2016-10-08',Convert(varchar(10),getdate(),120)) as d";
                    num = 1658117 + Convert.ToInt32(dbOperHandler.GetDataTable().Rows[0]["d"]) * 880;
                    break;

                case "1012":
                    dbOperHandler.Reset();
                    dbOperHandler.SqlCmd = "select datediff(d,'2016-10-23',Convert(varchar(10),getdate(),120)) as d";
                    DataTable dataTable1 = dbOperHandler.GetDataTable();
                    num = !(now > Convert.ToDateTime(now.ToString("yyyy-MM-dd") + " 00:00:00")) || !(now < Convert.ToDateTime(now.ToString("yyyy-MM-dd") + " 00:01:45")) ? 2588087 + Convert.ToInt32(dataTable1.Rows[0]["d"]) * 660 : 2588087 + (Convert.ToInt32(dataTable1.Rows[0]["d"]) - 1) * 660;
                    break;

                case "1013":
                    dbOperHandler.Reset();
                    dbOperHandler.SqlCmd = "select datediff(d,'2017-01-01',Convert(varchar(10),getdate(),120)) as d";
                    DataTable dataTable2 = dbOperHandler.GetDataTable();
                    num = !(now > Convert.ToDateTime(now.ToString("yyyy-MM-dd") + " 00:00:00")) || !(now < Convert.ToDateTime(now.ToString("yyyy-MM-dd") + " 06:50:00")) ? 106000000 + Convert.ToInt32(dataTable2.Rows[0]["d"]) * 203 : 106000000 + (Convert.ToInt32(dataTable2.Rows[0]["d"]) - 1) * 203;
                    break;

                case "4001":
                    dbOperHandler.Reset();
                    dbOperHandler.SqlCmd = "select datediff(d,'2017-02-10',Convert(varchar(10),getdate(),120)) as d";
                    DataTable dataTable3 = dbOperHandler.GetDataTable();
                    num = !(DateTime.Now > Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd") + " 00:00:00")) ||
                          !(DateTime.Now < Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd") + " 09:07:01")) ?
                          599795 + Convert.ToInt32(dataTable3.Rows[0]["d"]) * 179 :
                          599795 + (Convert.ToInt32(dataTable3.Rows[0]["d"]) - 1) * 179;
                    break;
                }
            }
            return(num);
        }
Ejemplo n.º 2
0
 public void GetListJSON(string _wherestr1, ref string _jsonstr)
 {
     using (DbOperHandler dbOperHandler = new ComData().Doh())
     {
         dbOperHandler.Reset();
         dbOperHandler.ConditionExpress = _wherestr1;
         string sql0 = SqlHelp.GetSql0("title,[Content],[STime]", "Sys_News", "STime", 1, 1, "desc", _wherestr1);
         dbOperHandler.Reset();
         dbOperHandler.SqlCmd = sql0;
         DataTable dataTable = dbOperHandler.GetDataTable();
         _jsonstr = "{\"result\" :\"1\",\"returnval\" :\"操作成功\"," + dtHelp.DT2JSON(dataTable) + "}";
         dataTable.Clear();
         dataTable.Dispose();
     }
 }
Ejemplo n.º 3
0
 public void AutoActiveOper(string AdminId, string ActiveCode, string ActiveName, string ProcName)
 {
     if (new ActiveAutoDAL().Exists(ActiveCode))
     {
         return;
     }
     using (DbOperHandler dbOperHandler = new ComData().Doh())
     {
         dbOperHandler.Reset();
         dbOperHandler.ExecuteProcActive(ProcName);
     }
     this.Add(ActiveCode);
     new LogSysDAL().Save("系统自动", "活动补发" + ActiveName);
     new LogAdminOperDAL().SaveLog(AdminId, "0", "活动管理", "手动补发" + ActiveName);
 }
Ejemplo n.º 4
0
 public void GetPlayTypeXml(ref string _jsonstr)
 {
     using (DbOperHandler dbOperHandler = new ComData().Doh())
     {
         dbOperHandler.Reset();
         dbOperHandler.SqlCmd = "SELECT [Id],[TypeId],[Title] FROM [Sys_PlayBigType] where TypeId=2 and IsOpen=1 order by sort ";
         DataTable dataTable1 = dbOperHandler.GetDataTable();
         dbOperHandler.Reset();
         dbOperHandler.SqlCmd = "SELECT [Id]\r\n                                  ,[Title0]\r\n                                  ,[Title]\r\n                                  ,[Title2]\r\n                                  ,[Radio]\r\n                              FROM [Sys_PlaySmallType] \r\n                              where IsOpen=1 and flag=0 order by Id ";
         DataTable dataTable2 = dbOperHandler.GetDataTable();
         _jsonstr = this.ConverTableToXML(dataTable1, dataTable2);
         dataTable1.Clear();
         dataTable1.Dispose();
     }
 }
Ejemplo n.º 5
0
 public bool UpdateBetNumber(int type, string title)
 {
     using (DbOperHandler dbOperHandler = new ComData().Doh())
     {
         dbOperHandler.Reset();
         dbOperHandler.SqlCmd = "select top 1 Type,Title,Number from Sys_LotteryData where Id=" + title;
         DataTable dataTable = dbOperHandler.GetDataTable();
         if (dataTable.Rows.Count > 0)
         {
             LotteryCheck.AdminRunOper(Convert.ToInt32(dataTable.Rows[0]["Type"].ToString()), dataTable.Rows[0]["Title"].ToString(), dataTable.Rows[0]["Number"].ToString());
             return(true);
         }
     }
     return(false);
 }
Ejemplo n.º 6
0
        public bool Exists(string _wherestr)
        {
            int num = 0;

            using (DbOperHandler dbOperHandler = new ComData().Doh())
            {
                dbOperHandler.Reset();
                dbOperHandler.ConditionExpress = _wherestr;
                if (dbOperHandler.Exist("Pay_temp"))
                {
                    num = 1;
                }
            }
            return(num == 1);
        }
Ejemplo n.º 7
0
 public void GetListIndexJSONFlex(int _thispage, int _pagesize, ref string _jsonstr)
 {
     using (DbOperHandler dbOperHandler = new ComData().Doh())
     {
         dbOperHandler.Reset();
         dbOperHandler.ConditionExpress = " IsUsed=1 and IsIndex=1";
         string sql0 = SqlHelp.GetSql0(dbOperHandler.Count("Sys_News").ToString() + " as totalcount,row_number() over (order by STime desc) as rowid,Convert(varchar(10),STime,120) as shortTime,substring(title,0,18)+'...' as shortTitle,*", "Sys_News", "STime", _pagesize, _thispage, "desc", " IsUsed=1 and IsIndex=1");
         dbOperHandler.Reset();
         dbOperHandler.SqlCmd = sql0;
         DataTable dataTable = dbOperHandler.GetDataTable();
         _jsonstr = this.ConverTableToJSON2(dataTable);
         dataTable.Clear();
         dataTable.Dispose();
     }
 }
Ejemplo n.º 8
0
 public void GetListJSON(string _wherestr1, ref string _jsonstr)
 {
     using (DbOperHandler dbOperHandler = new ComData().Doh())
     {
         dbOperHandler.Reset();
         string text = "select top 1 * from Act_ActiveSet where " + _wherestr1;
         text += " order by Id asc";
         dbOperHandler.Reset();
         dbOperHandler.SqlCmd = text;
         DataTable dataTable = dbOperHandler.GetDataTable();
         _jsonstr = "{\"result\" :\"1\",\"returnval\" :\"操作成功\"," + dtHelp.DT2JSON(dataTable) + "}";
         dataTable.Clear();
         dataTable.Dispose();
     }
 }
Ejemplo n.º 9
0
 public void GetListJSON(int _thispage, int _pagesize, string _wherestr1, ref string _jsonstr)
 {
     using (DbOperHandler dbOperHandler = new ComData().Doh())
     {
         dbOperHandler.Reset();
         dbOperHandler.ConditionExpress = _wherestr1;
         int    totalCount = dbOperHandler.Count("Log_UserLogin");
         string sql0       = SqlHelp.GetSql0("*", "Log_UserLogin", "LoginTime", _pagesize, _thispage, "desc", _wherestr1);
         dbOperHandler.Reset();
         dbOperHandler.SqlCmd = sql0;
         DataTable dataTable = dbOperHandler.GetDataTable();
         _jsonstr = "{\"result\" :\"1\",\"returnval\" :\"操作成功\",\"pagebar\" :\"" + PageBar.GetPageBar(6, "js", 2, totalCount, _pagesize, _thispage, "javascript:ajaxList(<#page#>);") + "\"," + dtHelp.DT2JSON(dataTable, _pagesize * (_thispage - 1)) + "}";
         dataTable.Clear();
         dataTable.Dispose();
     }
 }
Ejemplo n.º 10
0
 public void GetListJSON2(int _thispage, int _pagesize, string _wherestr1, string orderby, string order, string pid, string uid, ref string _jsonstr)
 {
     using (DbOperHandler dbOperHandler = new ComData().Doh())
     {
         dbOperHandler.Reset();
         dbOperHandler.ConditionExpress = _wherestr1;
         int    totalCount = dbOperHandler.Count("V_User");
         string sql0       = SqlHelp.GetSql0(pid + " as pid,*", "V_User", order, _pagesize, _thispage, orderby, _wherestr1);
         dbOperHandler.Reset();
         dbOperHandler.SqlCmd = sql0;
         DataTable dataTable = dbOperHandler.GetDataTable();
         _jsonstr = "{\"result\" :\"1\",\"returnval\" :\"操作成功\",\"nav\" :\"" + this.GetUserNav(pid, uid) + "\",\"pagebar\" :\"" + PageBar.GetPageBar(6, "js", 2, totalCount, _pagesize, _thispage, "javascript:ajaxList(<#page#>);") + "\"," + dtHelp.DT2JSON(dataTable, _pagesize * (_thispage - 1)) + "}";
         dataTable.Clear();
         dataTable.Dispose();
     }
 }
Ejemplo n.º 11
0
 public void GetListJSON(int _thispage, int _pagesize, string _wherestr1, string _wherestr2, ref string _jsonstr)
 {
     using (DbOperHandler dbOperHandler = new ComData().Doh())
     {
         dbOperHandler.Reset();
         dbOperHandler.ConditionExpress = _wherestr1;
         int    totalCount = dbOperHandler.Count("Flex_UserBet");
         string sql0       = SqlHelp.GetSql0(_wherestr2 + "as isme,row_number() over (order by Id desc) as rowid,Id,SsId,UserId,UserName,UserMoney,PlayId,PlayName,PlayCode,LotteryId,LotteryName,IssueNum,SingleMoney,moshi,Times,Num,DX,DS,cast(Times*Total as decimal(15,4)) as Total,Point,PointMoney,Bonus,Bonus2,WinNum,WinBonus,RealGet,Pos,STime,STime2,substring(Convert(varchar(20),STime2,120),6,11) as ShortTime,IsOpen,State,IsWin,number,poslen", "Flex_UserBet", "Id", _pagesize, _thispage, "desc", _wherestr1);
         dbOperHandler.Reset();
         dbOperHandler.SqlCmd = sql0;
         DataTable dataTable = dbOperHandler.GetDataTable();
         _jsonstr = "{\"result\" :\"1\",\"returnval\" :\"操作成功\",\"pagebar\" :\"" + PageBar.GetPageBar(6, "js", 2, totalCount, _pagesize, _thispage, "javascript:ajaxList(<#page#>);") + "\"," + dtHelp.DT2JSON(dataTable, _pagesize * (_thispage - 1)) + "}";
         dataTable.Clear();
         dataTable.Dispose();
     }
 }
Ejemplo n.º 12
0
 public void GetListJSON(int _thispage, int _pagesize, string _wherestr1, ref string _jsonstr)
 {
     using (DbOperHandler dbOperHandler = new ComData().Doh())
     {
         dbOperHandler.Reset();
         dbOperHandler.ConditionExpress = _wherestr1;
         int    totalCount = dbOperHandler.Count("N_UserBank");
         string sql0       = SqlHelp.GetSql0("row_number() over (order by Id asc) as rowid,'************'+substring(Payaccount,len(Payaccount)-3,4) as tPayaccount,substring(PayName,1,1)+'**' as tPayName,*", "N_UserBank", "Id", _pagesize, _thispage, "asc", _wherestr1);
         dbOperHandler.Reset();
         dbOperHandler.SqlCmd = sql0;
         DataTable dataTable = dbOperHandler.GetDataTable();
         _jsonstr = "{\"result\" :\"1\",\"returnval\" :\"操作成功\",\"pagebar\" :\"" + PageBar.GetPageBar(6, "js", 2, totalCount, _pagesize, _thispage, "javascript:ajaxList(<#page#>);") + "\"," + dtHelp.DT2JSON(dataTable, _pagesize * (_thispage - 1)) + "}";
         dataTable.Clear();
         dataTable.Dispose();
     }
 }
Ejemplo n.º 13
0
 public void Test(string _userid)
 {
     using (DbOperHandler dbOperHandler = new ComData().Doh())
     {
         dbOperHandler.Reset();
         dbOperHandler.SqlCmd = string.Format("select UserId,isnull(sum(inmoney),0) money from Act_ActiveRecord where CONVERT(varchar(10), STime, 120) = '{0}' group by UserId", _userid);
         DataTable dataTable = dbOperHandler.GetDataTable();
         if (dataTable.Rows.Count > 0)
         {
             for (int i = 0; i < dataTable.Rows.Count; i++)
             {
                 dbOperHandler.Reset();
             }
         }
     }
 }
Ejemplo n.º 14
0
 public void DeleteUserLogs(string d1, string d2)
 {
     using (DbOperHandler dbOperHandler = new ComData().Doh())
     {
         dbOperHandler.Reset();
         dbOperHandler.ConditionExpress = string.Concat(new string[]
         {
             "LoginTime<='",
             d2,
             "' and LoginTime>='",
             d1,
             "'"
         });
         dbOperHandler.Delete("Log_UserLogin");
     }
 }
Ejemplo n.º 15
0
 public void DeleteLotteryData(string d1, string d2)
 {
     using (DbOperHandler dbOperHandler = new ComData().Doh())
     {
         dbOperHandler.Reset();
         dbOperHandler.ConditionExpress = string.Concat(new string[]
         {
             "Stime<='",
             d2,
             "' and Stime>='",
             d1,
             "'"
         });
         dbOperHandler.Delete("Sys_LotteryData");
     }
 }
Ejemplo n.º 16
0
 public void DeleteUserBet(string d1, string d2)
 {
     using (DbOperHandler dbOperHandler = new ComData().Doh())
     {
         dbOperHandler.Reset();
         dbOperHandler.ConditionExpress = string.Concat(new string[]
         {
             "Stime2<='",
             d2,
             "' and Stime2>='",
             d1,
             "'"
         });
         dbOperHandler.Delete("N_UserBet");
     }
 }
Ejemplo n.º 17
0
 public void ClearUser()
 {
     using (DbOperHandler dbOperHandler = new ComData().Doh())
     {
         dbOperHandler.Reset();
         dbOperHandler.ConditionExpress = "datediff(minute,ontime ,getdate())>5";
         if (dbOperHandler.Exist("N_User"))
         {
             dbOperHandler.Reset();
             dbOperHandler.ConditionExpress = "datediff(minute,ontime ,getdate())>5";
             dbOperHandler.AddFieldItem("IsOnline", "0");
             dbOperHandler.AddFieldItem("SessionId", Guid.NewGuid().ToString().Replace("-", ""));
             dbOperHandler.Update("N_User");
         }
     }
 }
Ejemplo n.º 18
0
 public void GetListJSON_ActiveRecord(int _thispage, int _pagesize, string _wherestr1, ref string _jsonstr)
 {
     using (DbOperHandler dbOperHandler = new ComData().Doh())
     {
         dbOperHandler.Reset();
         dbOperHandler.ConditionExpress = _wherestr1;
         int    totalCount = dbOperHandler.Count("Act_ActiveRecord");
         string sql0       = SqlHelp.GetSql0("Id,UserId,dbo.f_GetUserName(UserId) as UserName,ActiveType,ActiveName,InMoney,Remark,STime", "Act_ActiveRecord", "STime", _pagesize, _thispage, "desc", _wherestr1);
         dbOperHandler.Reset();
         dbOperHandler.SqlCmd = sql0;
         DataTable dataTable = dbOperHandler.GetDataTable();
         _jsonstr = "{\"result\" :\"1\",\"returnval\" :\"操作成功\",\"pagebar\" :\"" + PageBar.GetPageBar(6, "js", 2, totalCount, _pagesize, _thispage, "javascript:ajaxList(<#page#>);") + "\"," + dtHelp.DT2JSON(dataTable, _pagesize * (_thispage - 1)) + "}";
         dataTable.Clear();
         dataTable.Dispose();
     }
 }
Ejemplo n.º 19
0
 public void GetUserLoginListJSON(int _thispage, int _pagesize, string _wherestr1, ref string _jsonstr)
 {
     using (DbOperHandler dbOperHandler = new ComData().Doh())
     {
         dbOperHandler.Reset();
         dbOperHandler.ConditionExpress = _wherestr1;
         int    totalCount = dbOperHandler.Count("Log_UserLogin");
         string sql0       = SqlHelp.GetSql0("row_number() over (order by Id desc) as rowid,*", "Log_UserLogin", "Id", _pagesize, _thispage, "desc", _wherestr1);
         dbOperHandler.Reset();
         dbOperHandler.SqlCmd = sql0;
         DataTable dataTable = dbOperHandler.GetDataTable();
         _jsonstr = "{\"result\" :\"1\",\"returnval\" :\"操作成功\",\"pagebar\" :\"" + PageBar.GetPageBar(80, "js", 2, totalCount, _pagesize, _thispage, "javascript:ajaxList(<#page#>);") + "\"," + dtHelp.DT2JSONNOHTML(dataTable, 0, "recordcount", "table", true) + "}";
         dataTable.Clear();
         dataTable.Dispose();
     }
 }
Ejemplo n.º 20
0
 public void GetListUpChargeJSON(int _thispage, int _pagesize, string _wherestr1, ref string _jsonstr)
 {
     using (DbOperHandler dbOperHandler = new ComData().Doh())
     {
         dbOperHandler.Reset();
         dbOperHandler.ConditionExpress = _wherestr1;
         int    totalCount = dbOperHandler.Count("N_UserChargeLog");
         string sql0       = SqlHelp.GetSql0("row_number() over (order by Id desc) as rowid,dbo.f_GetUserName(UserId) as UserName,dbo.f_GetUserName(ToUserId) as ToUserName,*", "N_UserChargeLog", "Id", _pagesize, _thispage, "desc", _wherestr1);
         dbOperHandler.Reset();
         dbOperHandler.SqlCmd = sql0;
         DataTable dataTable = dbOperHandler.GetDataTable();
         _jsonstr = "{\"result\" :\"1\",\"returnval\" :\"操作成功\",\"pagebar\" :\"" + PageBar.GetPageBar(6, "js", 2, totalCount, _pagesize, _thispage, "javascript:ajaxList(<#page#>);") + "\"," + dtHelp.DT2JSON(dataTable, _pagesize * (_thispage - 1)) + "}";
         dataTable.Clear();
         dataTable.Dispose();
     }
 }
Ejemplo n.º 21
0
 public void GetListJSON(int _thispage, int _pagesize, string _wherestr1, ref string _jsonstr)
 {
     using (DbOperHandler dbOperHandler = new ComData().Doh())
     {
         dbOperHandler.Reset();
         dbOperHandler.ConditionExpress = _wherestr1;
         int    totalCount = dbOperHandler.Count("Sys_News");
         string sql0       = SqlHelp.GetSql0("row_number() over (order by STime desc) as rowid,Convert(varchar(10),STime,120) as shortTime,substring(title,0,18)+'...' as shortTitle,Substring(Convert(varchar(10),STime,120),6,2) as tmonth,Substring(Convert(varchar(10),STime,120),9,2) as tday,*", "Sys_News", "STime", _pagesize, _thispage, "desc", _wherestr1);
         dbOperHandler.Reset();
         dbOperHandler.SqlCmd = sql0;
         DataTable dataTable = dbOperHandler.GetDataTable();
         _jsonstr = "{\"result\" :\"1\",\"returnval\" :\"操作成功\",\"pagebar\" :\"" + PageBar.GetPageBar(6, "js", 2, totalCount, _pagesize, _thispage, "javascript:ajaxList(<#page#>);") + "\"," + dtHelp.DT2JSON(dataTable) + "}";
         dataTable.Clear();
         dataTable.Dispose();
     }
 }
Ejemplo n.º 22
0
 public void GetListJSON_ZHDetail(int _thispage, int _pagesize, string _wherestr1, string _wherestr2, ref string _jsonstr)
 {
     using (DbOperHandler dbOperHandler = new ComData().Doh())
     {
         dbOperHandler.Reset();
         dbOperHandler.ConditionExpress = _wherestr1;
         int    totalCount = dbOperHandler.Count("V_UserBetZhDetail");
         string sql0       = SqlHelp.GetSql0("row_number() over (order by IssueNum asc) as rowid,*,substring(Convert(varchar(20),STime2,120),6,11) as ShortTime", "V_UserBetZhDetail", "IssueNum", _pagesize, _thispage, "asc", _wherestr1);
         dbOperHandler.Reset();
         dbOperHandler.SqlCmd = sql0;
         DataTable dataTable = dbOperHandler.GetDataTable();
         _jsonstr = "{\"result\" :\"1\",\"returnval\" :\"操作成功\",\"pagebar\" :\"" + PageBar.GetPageBar(6, "js", 2, totalCount, _pagesize, _thispage, "javascript:ajaxZhList(<#page#>);") + "\"," + dtHelp.DT2JSON(dataTable, _pagesize * (_thispage - 1)) + "}";
         dataTable.Clear();
         dataTable.Dispose();
     }
 }
Ejemplo n.º 23
0
        public SiteModel CreateEntity()
        {
            SiteModel siteModel = new SiteModel();

            using (DbOperHandler dbOperHandler = new ComData().Doh())
            {
                dbOperHandler.Reset();
                dbOperHandler.SqlCmd = "SELECT * FROM [Sys_Info] where Id=1";
                DataTable dataTable = dbOperHandler.GetDataTable();
                DataRow   dataRow   = dataTable.Rows[0];
                siteModel.Name           = "时时彩";
                siteModel.Dir            = App.Path;
                siteModel.WebIsOpen      = Convert.ToInt32(dataRow["WebIsOpen"].ToString());
                siteModel.WebCloseSeason = dataRow["WebCloseSeason"].ToString();
                siteModel.ZHIsOpen       = Convert.ToInt32(dataRow["ZHIsOpen"].ToString());
                siteModel.RegIsOpen      = Convert.ToInt32(dataRow["RegIsOpen"].ToString());
                siteModel.BetIsOpen      = Convert.ToInt32(dataRow["BetIsOpen"].ToString());
                siteModel.CSUrl          = dataRow["CSUrl"].ToString();
                siteModel.SignMinTotal   = Convert.ToInt32(dataRow["SignMinTotal"].ToString());
                siteModel.SignMaxTotal   = Convert.ToInt32(dataRow["SignMaxTotal"].ToString());
                siteModel.SignNum        = Convert.ToInt32(dataRow["SignNum"].ToString());
                siteModel.WarnTotal      = Convert.ToDecimal(dataRow["WarnTotal"].ToString());
                siteModel.MaxBet         = Convert.ToDecimal(dataRow["MaxBet"].ToString());
                siteModel.MaxWin         = Convert.ToDecimal(dataRow["MaxWin"].ToString());
                siteModel.MaxWinFK       = Convert.ToDecimal(dataRow["MaxWinFK"].ToString());
                siteModel.MaxLevel       = Convert.ToDecimal(dataRow["MaxLevel"].ToString());
                siteModel.MinCharge      = Convert.ToDecimal(dataRow["MinCharge"].ToString());
                siteModel.Points         = Convert.ToInt32(dataRow["Points"].ToString());
                siteModel.PriceOutCheck  = Convert.ToDecimal(dataRow["PriceOutCheck"].ToString());
                siteModel.PriceOut       = Convert.ToDecimal(dataRow["PriceOut"].ToString());
                siteModel.PriceOut2      = Convert.ToDecimal(dataRow["PriceOut2"].ToString());
                siteModel.PriceNum       = Convert.ToInt32(dataRow["PriceNum"].ToString());
                siteModel.PriceOutPerson = Convert.ToInt32(dataRow["PriceOutPerson"].ToString());
                siteModel.AutoLottery    = Convert.ToInt32(dataRow["AutoLottery"].ToString());
                siteModel.ProfitModel    = Convert.ToInt32(dataRow["ProfitModel"].ToString());
                siteModel.ProfitMargin   = Convert.ToInt32(dataRow["ProfitMargin"].ToString());
                siteModel.AutoRanking    = Convert.ToInt32(dataRow["AutoRanking"].ToString());
                siteModel.PriceTime1     = dataRow["PriceTime1"].ToString();
                siteModel.PriceTime2     = dataRow["PriceTime2"].ToString();
                siteModel.BankTime       = Convert.ToDecimal(dataRow["BankTime"].ToString());
                siteModel.ClientVersion  = dataRow["ClientVersion"].ToString();
                siteModel.UpdateTime     = Convert.ToDateTime(dataRow["UpdateTime"].ToString());
                siteModel.NewsUpdateTime = Convert.ToDateTime(dataRow["NewsUpdateTime"].ToString());
                siteModel.Version        = dataRow["ClientVersion"].ToString();
            }
            return(siteModel);
        }
Ejemplo n.º 24
0
 public string GetCurrentSn(int loid)
 {
     using (DbOperHandler dbOperHandler = new ComData().Doh())
     {
         DateTime now = DateTime.Now;
         string   str;
         if (loid == 3002 || loid == 3003)
         {
             DateTime dateTime = Convert.ToDateTime(now.Year.ToString() + "-01-01 20:30:00");
             dbOperHandler.Reset();
             dbOperHandler.SqlCmd = "select datediff(d,'" + dateTime.ToString("yyyy-MM-dd HH:mm:ss") + "','" + now.ToString("yyyy-MM-dd HH:mm:ss") + "') as d";
             int Num = Convert.ToInt32(dbOperHandler.GetDataTable().Rows[0]["d"]) - 7;
             str = now.Year.ToString() + Func.AddZero(Num, 3);
         }
         else
         {
             dbOperHandler.Reset();
             dbOperHandler.SqlCmd = "select top 1 Sn from Sys_LotteryTime where LotteryId=" + (object)loid + " and Time < '" + now.ToString("HH:mm:ss") + "' order by time desc";
             DataTable dataTable = dbOperHandler.GetDataTable();
             if (dataTable.Rows.Count < 1)
             {
                 dbOperHandler.Reset();
                 dbOperHandler.SqlCmd = "select top 1 Sn from Sys_LotteryTime where LotteryId=" + (object)loid + " order by time desc";
                 dataTable            = dbOperHandler.GetDataTable();
                 str = now.AddDays(-1.0).ToString("yyyyMMdd") + "-" + dataTable.Rows[0]["Sn"].ToString();
             }
             else
             {
                 str = now.ToString("yyyyMMdd") + "-" + dataTable.Rows[0]["Sn"].ToString();
                 if (now > Convert.ToDateTime(now.ToString("yyyy-MM-dd") + " 00:00:00") && now < Convert.ToDateTime(now.ToString("yyyy-MM-dd") + " 10:00:01") && loid == 1003)
                 {
                     str = now.AddDays(-1.0).ToString("yyyyMMdd") + "-" + dataTable.Rows[0]["Sn"].ToString();
                 }
             }
             if (loid == 4001)
             {
                 DateTime dateTime = Convert.ToDateTime("2016-01-01 00:00:00");
                 dbOperHandler.Reset();
                 dbOperHandler.SqlCmd = "select datediff(d,'" + dateTime.ToString("yyyy-MM-dd HH:mm:ss") + "','" + now.ToString("yyyy-MM-dd HH:mm:ss") + "') as d";
                 str = string.Concat((object)(530900 + (Convert.ToInt32(dbOperHandler.GetDataTable().Rows[0]["d"]) - 7) * 179 + Convert.ToInt32(dataTable.Rows[0]["Sn"].ToString())));
             }
             dataTable.Clear();
             dataTable.Dispose();
         }
         return(str);
     }
 }
Ejemplo n.º 25
0
        public bool Exists(string _type)
        {
            int num = 0;

            using (DbOperHandler dbOperHandler = new ComData().Doh())
            {
                dbOperHandler.Reset();
                dbOperHandler.ConditionExpress = "ActiveType=@ActiveType and STime=@STime";
                dbOperHandler.AddConditionParameter("@ActiveType", _type);
                dbOperHandler.AddConditionParameter("@STime", DateTime.Now.ToString("yyyy-MM-dd"));
                if (dbOperHandler.Exist("Act_AutoRecord"))
                {
                    num = 1;
                }
            }
            return(num == 1);
        }
Ejemplo n.º 26
0
        public int Save(string SendId, string ReceiveId, string Title, string Contents)
        {
            int result;

            using (DbOperHandler dbOperHandler = new ComData().Doh())
            {
                dbOperHandler.Reset();
                dbOperHandler.AddFieldItem("SendId", SendId);
                dbOperHandler.AddFieldItem("ReceiveId", ReceiveId);
                dbOperHandler.AddFieldItem("Title", Title);
                dbOperHandler.AddFieldItem("Contents", Contents);
                dbOperHandler.AddFieldItem("STime", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
                dbOperHandler.AddFieldItem("IsRead", "0");
                result = dbOperHandler.Insert("N_UserEmail");
            }
            return(result);
        }
Ejemplo n.º 27
0
 public int Save(string userId, string PayMethod, string PayBank, string PayBankAddress, string PayAccount, string PayName)
 {
     using (DbOperHandler dbOperHandler = new ComData().Doh())
     {
         new DateTimePubDAL().GetDateTime();
         dbOperHandler.Reset();
         dbOperHandler.AddFieldItem("UserId", (object)userId);
         dbOperHandler.AddFieldItem(nameof(PayMethod), (object)PayMethod);
         dbOperHandler.AddFieldItem(nameof(PayBank), (object)PayBank);
         dbOperHandler.AddFieldItem(nameof(PayBankAddress), (object)PayBankAddress);
         dbOperHandler.AddFieldItem(nameof(PayAccount), (object)PayAccount);
         dbOperHandler.AddFieldItem(nameof(PayName), (object)PayName);
         dbOperHandler.AddFieldItem("AddTime", (object)DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
         dbOperHandler.AddFieldItem("IsLock", (object)0);
         return(dbOperHandler.Insert("N_UserBank"));
     }
 }
Ejemplo n.º 28
0
        public bool Exists(int _type, string _title)
        {
            int num = 0;

            using (DbOperHandler dbOperHandler = new ComData().Doh())
            {
                dbOperHandler.Reset();
                dbOperHandler.ConditionExpress = "Title=@Title and Type=@Type";
                dbOperHandler.AddConditionParameter("@Title", _title);
                dbOperHandler.AddConditionParameter("@Type", _type);
                if (dbOperHandler.Exist("Sys_LotteryData"))
                {
                    num = 1;
                }
            }
            return(num == 1);
        }
Ejemplo n.º 29
0
        public bool Exists(int _type, string _title, string _number)
        {
            int num = 0;

            using (DbOperHandler dbOperHandler = new ComData().Doh())
            {
                dbOperHandler.Reset();
                dbOperHandler.ConditionExpress = "Type=@Type and NumberAll=@NumberAll";
                dbOperHandler.AddConditionParameter("@Type", (object)_type);
                dbOperHandler.AddConditionParameter("@NumberAll", (object)_number);
                if (dbOperHandler.Exist("Sys_LotteryData"))
                {
                    num = 1;
                }
            }
            return(num == 1);
        }
Ejemplo n.º 30
0
 public bool UpdateAllBetNumber(int type)
 {
     using (DbOperHandler dbOperHandler = new ComData().Doh())
     {
         dbOperHandler.Reset();
         dbOperHandler.SqlCmd = "select top 1 Type,Title,Number from Sys_LotteryData where Type=" + (object)type + " order by Title desc";
         DataTable dataTable = dbOperHandler.GetDataTable();
         if (dataTable.Rows.Count > 0)
         {
             for (int index = 0; index < dataTable.Rows.Count; ++index)
             {
                 LotteryCheck.AdminRunOper(Convert.ToInt32(dataTable.Rows[index]["Type"].ToString()), dataTable.Rows[index]["Title"].ToString(), dataTable.Rows[index]["Number"].ToString());
             }
         }
     }
     return(true);
 }