Пример #1
0
        public DataTable GetTableTitck(DateTime DateTimeTitck_S, DateTime DateTimeTitck_E)
        {
            OleDbParameter[] ps = new OleDbParameter[] {
                new OleDbParameter("@DateTimeTitck_S", DateTimeTitck_S.ToShortDateString()),
                new OleDbParameter("@DateTimeTitck_E", DateTimeTitck_E.ToShortDateString())
            };
            DataTable dataTable = OLEDBHelp.GetTable("select [ZhongJiangID] as 订单号,[ZhongJiangTitck] as 奖票,[ChuangGuan] as 串关,[ZhongJiangMoney] as 奖金,[ZhongJianTime] as 创建时间,[PlayGame] as 玩法,[BeiShu] as 倍数,[RongCuo] as 已容错 from ZhongJiangTable where [ZhongJianTime]>=@DateTimeTitck_S and [ZhongJianTime]<=@DateTimeTitck_E order by [ZhongJianTime] desc", ps);

            return(dataTable);
        }
Пример #2
0
        /// <summary>
        /// 读取数据
        /// </summary>
        /// <param name="DateTimeTitck_S"></param>
        /// <param name="DateTimeTitck_E"></param>
        /// <returns></returns>
        public void SelectDate(DateTime DateTimeTitck_S, DateTime DateTimeTitck_E)
        {
            DataTable dataTable = new DataTable();

            try
            {
                OleDbParameter[] ps = new OleDbParameter[] {
                    new OleDbParameter("@DateTimeTitck_S", DateTimeTitck_S.ToShortDateString()),
                    new OleDbParameter("@DateTimeTitck_E", DateTimeTitck_E.ToShortDateString())
                };
                dataTable = OLEDBHelp.GetTable("select [BuyTitckID] as 订单号,[PlayType] as 玩法,[Multiple] as 倍数,[TouZhu] as 投注内容,[TouZhuValue] as 投注赔率,[CreateTime] as 创建时间 from TouZhuTitck where [CreateTime]>=@DateTimeTitck_S and [CreateTime]<=@DateTimeTitck_E order by [CreateTime] desc", ps);
                if (dataTable.Rows.Count > 0)
                {
                    for (int i = 0; i < dataTable.Rows.Count; i++)
                    {
                        SuanJiangClass suanJiangClass = new SuanJiangClass();
                        suanJiangClass.BuyTitckID  = dataTable.Rows[i]["订单号"].ToString();
                        suanJiangClass.PlayType    = dataTable.Rows[i]["玩法"].ToString();
                        suanJiangClass.Multiple    = dataTable.Rows[i]["倍数"].ToString();
                        suanJiangClass.TouZhu      = dataTable.Rows[i]["投注内容"].ToString();
                        suanJiangClass.TouZhuValue = dataTable.Rows[i]["投注赔率"].ToString();
                        suanJiangClass.CreateTime  = DateTime.Parse(dataTable.Rows[i]["创建时间"].ToString());
                        switch (suanJiangClass.PlayType)
                        {
                        case "9001": ChuLiValue9001(suanJiangClass); break;

                        case "9002": ChuLiValue9002(suanJiangClass); break;

                        case "9003": ChuLiValue9003(suanJiangClass); break;

                        case "9004": ChuLiValue9004(suanJiangClass); break;

                        case "9005": ChuLiValue9005(suanJiangClass); break;

                        case "9006": ChuLiValue9006(suanJiangClass); break;
                        }
                    }
                }
            }
            catch (Exception error)
            {
                Log.WriteLog(error, "Error");
            }
        }