Exemplo n.º 1
0
 public void GetEmailListJSON(int _thispage, int _pagesize, string _wherestr1, string _userId, ref string _jsonstr)
 {
     using (DbOperHandler dbOperHandler = new ComData().Doh())
     {
         dbOperHandler.Reset();
         dbOperHandler.ConditionExpress = "Id=@Id";
         dbOperHandler.AddConditionParameter("@Id", _userId);
         string str = string.Concat(dbOperHandler.GetField("N_User", "ParentId"));
         dbOperHandler.Reset();
         dbOperHandler.ConditionExpress = _wherestr1;
         int    totalCount = dbOperHandler.Count("N_UserEmail");
         string sql        = SqlHelp.GetSql0("row_number() over (order by STime desc) as rowid," + str + " as parentid,dbo.f_GetUserName(SendId) as SendName,dbo.f_GetUserName(ReceiveId) as ReceiveName,*", "N_UserEmail", "STime", _pagesize, _thispage, "desc", _wherestr1);
         dbOperHandler.Reset();
         dbOperHandler.SqlCmd = sql;
         DataTable dataTable = dbOperHandler.GetDataTable();
         _jsonstr = string.Concat(new string[]
         {
             "{\"result\" :\"1\",\"returnval\" :\"操作成功\",\"pagebar\" :\"",
             PageBar.GetPageBar(80, "js", 2, totalCount, _pagesize, _thispage, "javascript:ajaxList(<#page#>);"),
             "\",",
             dtHelp.DT2JSON(dataTable, _pagesize * (_thispage - 1)),
             "}"
         });
         dataTable.Clear();
         dataTable.Dispose();
     }
 }
Exemplo n.º 2
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 sql        = SqlHelp.GetSql0(pid + " as pid,*", "V_User", order, _pagesize, _thispage, orderby, _wherestr1);
         dbOperHandler.Reset();
         dbOperHandler.SqlCmd = sql;
         DataTable dataTable = dbOperHandler.GetDataTable();
         _jsonstr = string.Concat(new string[]
         {
             "{\"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();
     }
 }
Exemplo n.º 3
0
 public void GetListCount(string _wherestr1, ref string _jsonstr)
 {
     using (DbOperHandler dbOperHandler = new ComData().Doh())
     {
         dbOperHandler.Reset();
         dbOperHandler.ConditionExpress = _wherestr1;
         int num = dbOperHandler.Count("N_UserEmail");
         _jsonstr = "{\"result\" :\"1\",\"count\" :\"" + num + "\"}";
     }
 }
Exemplo n.º 4
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();
     }
 }
Exemplo n.º 5
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();
     }
 }
Exemplo n.º 6
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();
     }
 }
Exemplo n.º 7
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();
     }
 }
 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();
     }
 }
Exemplo n.º 9
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();
     }
 }
Exemplo n.º 10
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();
     }
 }
Exemplo n.º 11
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();
     }
 }
Exemplo n.º 12
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();
     }
 }
Exemplo n.º 13
0
 public void GetListJSON_ZH(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_UserBetZh");
         string sql        = SqlHelp.GetSql0("row_number() over (order by STime desc) as rowid,*,substring(Convert(varchar(20),STime,120),6,11) as ShortTime", "Flex_UserBetZh", "STime", _pagesize, _thispage, "desc", _wherestr1);
         dbOperHandler.Reset();
         dbOperHandler.SqlCmd = sql;
         DataTable dataTable = dbOperHandler.GetDataTable();
         _jsonstr = string.Concat(new string[]
         {
             "{\"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();
     }
 }
Exemplo n.º 14
0
 public void GetHisStoryJSON(int _thispage, int _pagesize, string _wherestr1, ref string _jsonstr)
 {
     using (DbOperHandler dbOperHandler = new ComData().Doh())
     {
         dbOperHandler.Reset();
         dbOperHandler.ConditionExpress = _wherestr1;
         int    totalCount = dbOperHandler.Count("Flex_History");
         string sql        = SqlHelp.GetSql0("row_number() over (order by Id desc) as rowid,*", "Flex_History", "Id", _pagesize, _thispage, "desc", _wherestr1);
         dbOperHandler.Reset();
         dbOperHandler.SqlCmd = sql;
         DataTable dataTable = dbOperHandler.GetDataTable();
         _jsonstr = string.Concat(new string[]
         {
             "{\"result\" :\"1\",\"returnval\" :\"操作成功\",\"pagebar\" :\"",
             PageBar.GetPageBar(80, "js", 2, totalCount, _pagesize, _thispage, "javascript:ajaxList(<#page#>);"),
             "\",",
             dtHelp.DT2JSON(dataTable, _pagesize * (_thispage - 1)),
             "}"
         });
         dataTable.Clear();
         dataTable.Dispose();
     }
 }
Exemplo n.º 15
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("V_UserMoneyStatAllPoint");
         string sql        = SqlHelp.GetSql0("row_number() over (order by STime desc) as rowid,[UserId],dbo.f_GetUserName(UserId) as UserName,STime,Point", "V_UserMoneyStatAllPoint", "STime", _pagesize, _thispage, "desc", _wherestr1);
         dbOperHandler.Reset();
         dbOperHandler.SqlCmd = sql;
         DataTable dataTable = dbOperHandler.GetDataTable();
         _jsonstr = string.Concat(new string[]
         {
             "{\"result\" :\"1\",\"returnval\" :\"操作成功\",\"pagebar\" :\"",
             PageBar.GetPageBar(6, "js", 2, totalCount, _pagesize, _thispage, "javascript:ajaxList(<#page#>);"),
             "\",",
             dtHelp.DT2JSON(dataTable),
             "}"
         });
         dataTable.Clear();
         dataTable.Dispose();
     }
 }
Exemplo n.º 16
0
 public void GetActive7Money(string userId, ref string _jsonstr)
 {
     using (DbOperHandler dbOperHandler = new ComData().Doh())
     {
         dbOperHandler.Reset();
         dbOperHandler.ConditionExpress = "Code=@Code";
         dbOperHandler.AddConditionParameter("@Code", "Active7");
         object[] fields = dbOperHandler.GetFields("Act_ActiveSet", "StartTime,EndTime,IsUse");
         if (Convert.ToInt32(fields[2]) == 1)
         {
             if (new DateTimePubDAL().GetDateTime() >= Convert.ToDateTime(fields[0]) && new DateTimePubDAL().GetDateTime() <= Convert.ToDateTime(fields[1]))
             {
                 Random             random             = new Random();
                 decimal            num                = random.Next(this.site.SignMinTotal, this.site.SignMaxTotal);
                 SysActiveRecordDAL sysActiveRecordDAL = new SysActiveRecordDAL();
                 string             clientIP           = IPHelp.ClientIP;
                 dbOperHandler.Reset();
                 dbOperHandler.ConditionExpress = "ActiveType='Active7' and datediff(d,STime,getdate())=0";
                 int num2 = dbOperHandler.Count("Act_ActiveRecord");
                 if (num2 <= this.site.SignNum)
                 {
                     if (!sysActiveRecordDAL.Exists("UserId=" + userId + " and ActiveType='Active7' and datediff(d,STime,getdate())=0"))
                     {
                         if (!sysActiveRecordDAL.Exists("CheckIp='" + clientIP + "' and ActiveType='Active7' and datediff(d,STime,getdate())=0"))
                         {
                             dbOperHandler.Reset();
                             dbOperHandler.ConditionExpress = "UserId=" + userId;
                             int num3 = dbOperHandler.Count("N_UserBank");
                             if (num3 > 0)
                             {
                                 dbOperHandler.Reset();
                                 dbOperHandler.ConditionExpress = "UserId=" + userId + " and state=0";
                                 int num4 = dbOperHandler.Count("N_UserBet");
                                 if (num4 > 0)
                                 {
                                     _jsonstr = "您还有未开奖的订单,请开奖后再领取!";
                                 }
                                 else
                                 {
                                     dbOperHandler.Reset();
                                     dbOperHandler.SqlCmd = "select Bet,Cancellation from N_UserMoneyStatAll where UserId=" + userId + " and datediff(d,STime,getdate())=0";
                                     DataTable dataTable = dbOperHandler.GetDataTable();
                                     if (dataTable.Rows.Count > 0)
                                     {
                                         if (Convert.ToDecimal(dataTable.Rows[0]["Bet"]) - Convert.ToDecimal(dataTable.Rows[0]["Cancellation"]) < 50m)
                                         {
                                             _jsonstr = "签到领现失败,您的流水未得到50元!";
                                         }
                                         else
                                         {
                                             sysActiveRecordDAL.SaveLog(userId, "Active7", "签到领现", num, "您签到领取了" + num + "元");
                                             _jsonstr = "签到领现成功" + num + "元";
                                             new LogSysDAL().Save("系统活动", string.Concat(new object[]
                                             {
                                                 userId,
                                                 "领取签到佣金",
                                                 num,
                                                 "元"
                                             }));
                                         }
                                     }
                                     else
                                     {
                                         _jsonstr = "签到领现失败,您的流水未得到50元!";
                                     }
                                 }
                             }
                             else
                             {
                                 _jsonstr = "签到领现失败,您未绑定银行!";
                             }
                         }
                         else
                         {
                             _jsonstr = "签到领现失败,您当前IP今天已领取!";
                         }
                     }
                     else
                     {
                         _jsonstr = "签到领现失败,您今天已领取!";
                     }
                 }
                 else
                 {
                     _jsonstr = "签到领现失败,今天领取已得到名额!";
                 }
             }
             else
             {
                 _jsonstr = "领取失败,活动时间已过!";
             }
         }
         else
         {
             _jsonstr = "领取失败,活动已关闭!";
         }
     }
 }