Пример #1
0
        public DataTable _SelectOrder(string id)
        {
            SqlParameter prm = new SqlParameter();

            if (id == null)
            {
                prm = new SqlParameter("@OrderID", SqlDbType.VarChar)
                {
                    Value = DBNull.Value
                };
            }
            else
            {
                prm = new SqlParameter("@OrderID", SqlDbType.VarChar)
                {
                    Value = id
                };
            }



            dt = dl.SelectData("Order_History_Select", prm);

            return(dt);
        }
Пример #2
0
        public String _MessageDialog(string id)
        {
            var ID      = string.Empty;
            var key     = string.Empty;
            var msgType = string.Empty;

            if (id != null)
            {
                var msgarr = id.Split('_');
                ID      = msgarr[0];
                key     = msgarr[1];
                msgType = msgarr[2];
            }
            SqlParameter[] prm = new SqlParameter[2];
            prm[0] = new SqlParameter("@key", SqlDbType.VarChar)
            {
                Value = key
            };
            prm[1] = new SqlParameter("@msgType", SqlDbType.VarChar)
            {
                Value = ID
            };
            dt = dl.SelectData("Message_Select", prm);
            var msg = dt.Rows[0][msgType].ToString();

            return(msg);
        }
Пример #3
0
        public static bool UserAccess(string id)
        {
            bool      flag     = false;
            BaseDL    bdl      = new BaseDL();
            DataTable dt       = new DataTable();
            string    viewname = id;

            SqlParameter[] prms = new SqlParameter[3];
            prms[0] = new SqlParameter("@UserID", SqlDbType.VarChar)
            {
                Value = HttpContext.Current.Session["UserID"].ToString().Split('_')[0]
            };
            prms[1] = new SqlParameter("@ViewName", SqlDbType.VarChar)
            {
                Value = viewname
            };
            prms[2] = new SqlParameter("@Option", SqlDbType.Int)
            {
                Value = 1
            };
            dt = bdl.SelectData("User_Authorization_SelectAll", prms);
            if (dt.Rows.Count > 0)
            {
                flag = true;
            }
            else
            {
                flag = false;
            }

            return(flag);
        }
Пример #4
0
        public DataTable GetBookType()
        {
            BaseDL bdl = new BaseDL();

            SqlParameter[] prms = new SqlParameter[0];
            return(bdl.SelectData("M_BookType_SelectAll", prms));
        }
Пример #5
0
        public RegisterModel SearchMember(RegisterModel rml)
        {
            BaseDL bdl = new BaseDL();

            SqlParameter[] prms = new SqlParameter[1];
            prms[0] = new SqlParameter("@MemberID", SqlDbType.Int)
            {
                Value = rml.MemberID
            };
            //prms[1] = new SqlParameter("@StaffName", SqlDbType.VarChar) { Value = sm.StaffName };
            DataTable dt = bdl.SelectData("M_Member_Search", prms);

            if (dt.Rows.Count > 0)
            {
                if (!string.IsNullOrWhiteSpace(dt.Rows[0]["Photo"].ToString()))
                {
                    rml.Photo = dt.Rows[0]["Photo"].ToString();
                }
                else
                {
                    rml.Photo = "Default.png";
                }
                rml.MemberID       = dt.Rows[0]["MemberID"].ToString();
                rml.MemberName     = dt.Rows[0]["MemberName"].ToString();
                rml.MemberPassword = dt.Rows[0]["MemberPassword"].ToString();
                rml.ContactNo      = dt.Rows[0]["ContactNo"].ToString();
                rml.Address        = dt.Rows[0]["Address"].ToString();
            }

            return(rml);
        }
Пример #6
0
        public DataTable GetMember()
        {
            BaseDL bdl = new BaseDL();

            SqlParameter[] prms = new SqlParameter[0];
            return(bdl.SelectData("M_Member_SelecAll", prms));
        }
Пример #7
0
        public string DataIsExists(UserBalanceModel UBModel)
        {
            BaseDL   BDL = new BaseDL();
            Function FUN = new Function();

            SqlParameter[] prms = new SqlParameter[2];

            DateTime dt = DateTime.ParseExact(UBModel.PayDate.Replace("-", "/"), "dd/MM/yyyy", CultureInfo.GetCultureInfo("en-us"));

            prms[0] = new SqlParameter("@PayDate", SqlDbType.Date)
            {
                Value = dt
            };
            prms[1] = new SqlParameter("@UserID", SqlDbType.VarChar)
            {
                Value = string.IsNullOrWhiteSpace(UBModel.UserID) ? (object)DBNull.Value : UBModel.UserID
            };
            DataTable DtResult = BDL.SelectData("User_Transition_DataExists", prms);

            if (DtResult.Rows.Count > 0)
            {
                return("true");
            }
            return("false");
        }
Пример #8
0
        public string GetMessage(string id)
        {
            BaseDL dl  = new BaseDL();
            string ID  = string.Empty;
            string key = string.Empty;

            if (id != null)
            {
                var msgarr = id.Split('_');
                ID  = msgarr[0];
                key = msgarr[1];
            }

            SqlParameter[] prm = new SqlParameter[2];
            prm[0] = new SqlParameter("@ID", SqlDbType.VarChar)
            {
                Value = ID
            };
            prm[1] = new SqlParameter("@KEY", SqlDbType.VarChar)
            {
                Value = key
            };
            DataTable dt  = dl.SelectData("M_Message_Select", prm);
            var       msg = dt.Rows[0]["Message1"].ToString();

            return(msg);
        }
Пример #9
0
        public DataTable GetAllStaff()
        {
            BaseDL bdl = new BaseDL();

            SqlParameter[] prms = new SqlParameter[0];
            //prms[0] = new SqlParameter("@StaffCD", SqlDbType.VarChar) { Value = sm.StaffCD };
            //prms[1] = new SqlParameter("@StaffName", SqlDbType.VarChar) { Value = sm.StaffName };
            return(bdl.SelectData("M_Staff_SelectAll", prms));
        }
Пример #10
0
        public DataTable Get_M_GroupName()
        {
            BaseDL    bdl         = new BaseDL();
            DataTable dtgroupname = new DataTable();

            SqlParameter[] prms = new SqlParameter[1];
            dtgroupname = bdl.SelectData("M_Group_Select", null);
            return(dtgroupname);
        }
Пример #11
0
        public DataTable Get_M_BrandName()
        {
            BaseDL    bdl           = new BaseDL();
            DataTable dtcompanyname = new DataTable();

            SqlParameter[] prms = new SqlParameter[1];
            dtcompanyname = bdl.SelectData("M_Brand_Select", null);
            return(dtcompanyname);
        }
Пример #12
0
        public string DailyUserBalance_UserSelectBind()
        {
            BaseDL   BDL = new BaseDL();
            Function FUN = new Function();

            SqlParameter[] prms         = new SqlParameter[0];
            DataTable      DtUserSelect = BDL.SelectData("M_UserBalance_Select", prms);

            return(FUN.DataTableToJSONWithJSONNet(DtUserSelect));
        }
Пример #13
0
        public string GetTeam()
        {
            BaseDL   bdl = new BaseDL();
            Function fun = new Function();

            SqlParameter[] prms      = new SqlParameter[0];
            DataTable      DtCountry = bdl.SelectData("M_Team_Select", prms);

            return(fun.DataTableToJSONWithJSONNet(DtCountry));
        }
Пример #14
0
        public string GetCompetition(CompetitionModel CModel)
        {
            BaseDL   bdl = new BaseDL();
            Function fun = new Function();

            SqlParameter[] prms          = new SqlParameter[0];
            DataTable      DtCompetition = bdl.SelectData("M_Competition_Select", prms);

            return(fun.DataTableToJSONWithJSONNet(DtCompetition));
        }
Пример #15
0
        public string GetOdds()
        {
            BaseDL   bdl = new BaseDL();
            Function fun = new Function();

            SqlParameter[] prms   = new SqlParameter[0];
            DataTable      DtOdds = bdl.SelectData("M_Odds_Select", prms);

            return(fun.DataTableToJSONWithJSONNet(DtOdds));
        }
Пример #16
0
        public string GetUser()
        {
            BaseDL   BDL = new BaseDL();
            Function FUN = new Function();

            SqlParameter[] prms   = new SqlParameter[0];
            DataTable      DtUser = BDL.SelectData("M_User_Select", prms);

            return(FUN.DataTableToJSONWithJSONNet(DtUser));
        }
Пример #17
0
        public string GetBookie()
        {
            BaseDL   bdl = new BaseDL();
            Function fun = new Function();

            SqlParameter[] prms       = new SqlParameter[0];
            DataTable      DTGamblers = bdl.SelectData("M_Bookie_Select", prms);

            return(fun.DataTableToJSONWithJSONNet(DTGamblers));
        }
Пример #18
0
        public DataTable Get_InformationTitleName(string id)
        {
            BaseDL       dl  = new BaseDL();
            SqlParameter prm = new SqlParameter("@InformationID", SqlDbType.Int)
            {
                Value = Convert.ToInt16(id)
            };
            DataTable dt = dl.SelectData("Select_InformationTitle", prm);


            return(dt);
        }
Пример #19
0
        public BookModel BookDelete(BookModel bm)
        {
            BaseDL bdl = new BaseDL();

            SqlParameter[] prms = new SqlParameter[1];
            prms[0] = new SqlParameter("@BookID", SqlDbType.Int)
            {
                Value = bm.BookID
            };
            DataTable dt = bdl.SelectData("M_Delete_Book", prms);

            return(bm);
        }
Пример #20
0
        public DataTable Order_Portal_List_Select(string companyCD)
        {
            BaseDL    bdl            = new BaseDL();
            DataTable dtorder_portal = new DataTable();

            SqlParameter[] prms = new SqlParameter[1];
            prms[0] = new SqlParameter("@companyCD", SqlDbType.VarChar)
            {
                Value = companyCD
            };
            dtorder_portal = bdl.SelectData("Order_Potal_Select", prms);
            return(dtorder_portal);
        }
Пример #21
0
        public DataTable Check_Duplicate_GroupEntry(MultipleModel mModel)
        {
            BaseDL    bdl       = new BaseDL();
            DataTable dtgroupID = new DataTable();

            SqlParameter[] prms = new SqlParameter[1];
            prms[0] = new SqlParameter("@groupID", SqlDbType.VarChar)
            {
                Value = mModel.GroupModel.GroupID
            };
            dtgroupID = bdl.SelectData("M_Group_SelectBy_GroupID", prms);
            return(dtgroupID);
        }
Пример #22
0
        public DataTable BookCheck(string id)
        {
            BaseDL    bdl = new BaseDL();
            DataTable dt  = new DataTable();

            SqlParameter[] prms = new SqlParameter[1];
            prms[0] = new SqlParameter("@BookID", SqlDbType.VarChar)
            {
                Value = id
            };
            dt = bdl.SelectData("M_Book_Select_byID", prms);

            return(dt);
        }
Пример #23
0
        public string UserGambling_Select(MatchModel MModel)
        {
            BaseDL   bdl = new BaseDL();
            Function fun = new Function();

            SqlParameter[] prms = new SqlParameter[1];
            prms[0] = new SqlParameter("@MatchID", SqlDbType.BigInt)
            {
                Value = MModel.MatchID
            };
            DataTable DTMatch = bdl.SelectData("UserGambling_Select", prms);

            return(fun.DataTableToJSONWithJSONNet(DTMatch));
        }
Пример #24
0
        public string GetUserBalanceByDetailDate(UserBalanceModel UBModel)
        {
            BaseDL   bdl = new BaseDL();
            Function fun = new Function();

            SqlParameter[] prms = new SqlParameter[1];
            prms[0] = new SqlParameter("@UserID", SqlDbType.VarChar)
            {
                Value = string.IsNullOrWhiteSpace(UBModel.UserID) ? (object)DBNull.Value : UBModel.UserID
            };
            DataTable DtCinemaIncome = bdl.SelectData("M_UserBalance_DetailSelect", prms);

            return(fun.DataTableToJSONWithJSONNet(DtCinemaIncome));
        }
Пример #25
0
        public string GetDailyUserBalance_List(UserBalanceModel UBModel)
        {
            BaseDL   BDL = new BaseDL();
            Function FUN = new Function();

            SqlParameter[] prms = new SqlParameter[1];
            prms[0] = new SqlParameter("@UserID", SqlDbType.VarChar)
            {
                Value = string.IsNullOrWhiteSpace(UBModel.UserID) ? (object)DBNull.Value : UBModel.UserID
            };
            DataTable DtBLList = BDL.SelectData("M_UserBalance_BalanceSelect", prms);

            return(FUN.DataTableToJSONWithJSONNet(DtBLList));
        }
Пример #26
0
        public string BookieConfirm_Select(BookieModel BModel)
        {
            BaseDL   bdl = new BaseDL();
            Function fun = new Function();
            DateTime dt  = DateTime.ParseExact(BModel.MatchDate.Replace("-", "/"), "dd/MM/yyyy", CultureInfo.GetCultureInfo("en-us"));

            SqlParameter[] prms = new SqlParameter[1];
            prms[0] = new SqlParameter("@MatchDate", SqlDbType.Date)
            {
                Value = dt
            };
            DataTable DTBookieConfirm = bdl.SelectData("M_Match_BookieConfirm_Select", prms);

            return(fun.DataTableToJSONWithJSONNet(DTBookieConfirm));
        }
Пример #27
0
        public string UserGamblingResult_Select(MatchModel MModel)
        {
            DateTime dt  = DateTime.ParseExact(MModel.MatchDate.Replace("-", "/"), "dd/MM/yyyy", CultureInfo.GetCultureInfo("en-us"));
            BaseDL   bdl = new BaseDL();
            Function fun = new Function();

            SqlParameter[] prms = new SqlParameter[1];
            prms[0] = new SqlParameter("@MatchDate", SqlDbType.Date)
            {
                Value = dt
            };
            DataTable DTMatch = bdl.SelectData("UserGamblingResult_Select", prms);

            return(fun.DataTableToJSONWithJSONNet(DTMatch));
        }
Пример #28
0
        public DataTable GetInformation(M_CompanyModel mc)
        {
            BaseDL             bdl    = new BaseDL();
            M_CompanyModel     mdl    = new M_CompanyModel();
            T_InformationModel tmodel = new T_InformationModel();
            DataTable          dtinfo = new DataTable();

            SqlParameter[] prms = new SqlParameter[1];
            prms[0] = new SqlParameter("@companyCD", SqlDbType.VarChar)
            {
                Value = mc.CompanyCD
            };
            dtinfo = bdl.SelectData("T_Information_Select_ForHomePage", prms);
            return(dtinfo);
        }
Пример #29
0
        public DataTable Order_Input_M_SKU(string makeritemCD)
        {
            DataTable dt = new DataTable();
            BaseDL    dl = new BaseDL();

            if (!string.IsNullOrWhiteSpace(makeritemCD))
            {
                SqlParameter[] prms = new SqlParameter[1];
                prms[0] = new SqlParameter("@MakerItemCD", SqlDbType.VarChar)
                {
                    Value = makeritemCD
                };
                dt = dl.SelectData("OrderInput_M_SKU_Select", prms);
            }
            return(dt);
        }
Пример #30
0
        public DataTable M_Message_Select(string messageKey, string msgType)
        {
            BaseDL    bdl       = new BaseDL();
            DataTable dtMessage = new DataTable();

            SqlParameter[] prms = new SqlParameter[2];
            prms[0] = new SqlParameter("@key", SqlDbType.VarChar)
            {
                Value = messageKey
            };
            prms[1] = new SqlParameter("@msgType", SqlDbType.VarChar)
            {
                Value = msgType
            };
            dtMessage = bdl.SelectData("Message_Select", prms);
            return(dtMessage);
        }