コード例 #1
0
        public static ItemDetails[] BindDatatable()
        {
            DataTable dt = new DataTable();
            List<ItemDetails> details = new List<ItemDetails>();
            //InterfacesBS.InterfacesBL.InterfaceItems allData = new BusinessLogicBS.BusinessClasses.ItemsClass();
            budhashop.CLASS.CallCache callCache = new budhashop.CLASS.CallCache();

            DataSet allDataDS = callCache.getCache();
            dt = allDataDS.Tables[0];

            foreach (DataRow dtrow in dt.Rows)
            {
                bool FeatureChk = bool.Parse(dtrow["FeaturedFlag"].ToString());
                //int category = int.Parse(dtrow["CategoryId"].ToString());
                if (FeatureChk)//&& category == int.Parse(CatgId)
                {
                    ItemDetails user = new ItemDetails();
                    user.ItemId = dtrow["ItemId"].ToString();
                    user.ItemPath = dtrow["ImagePath"].ToString();
                    user.ItemName = dtrow["ItemName"].ToString();
                    user.ItemPrice = dtrow["BilledRate"].ToString();
                    user.CatId = dtrow["CategoryId"].ToString();
                    details.Add(user);
                }
            }

            return details.ToArray();
        }
コード例 #2
0
        public static ItemDetails[] BindGrptable()
        {
            DataTable dt = new DataTable();
            List<ItemDetails> details = new List<ItemDetails>();
            //InterfacesBS.InterfacesBL.InterfaceItems allData = new BusinessLogicBS.BusinessClasses.ItemsClass();
            budhashop.CLASS.CallCache callCache = new budhashop.CLASS.CallCache();

            DataSet allDataDS = callCache.getCache();
            dt = allDataDS.Tables[1];

            foreach (DataRow dtrow in dt.Rows)
            {

                ItemDetails user = new ItemDetails();
                user.ItemId = dtrow["GroupId"].ToString();
                user.ItemName = dtrow["GroupName"].ToString();
                user.ItemPath = dtrow["ImagePath"].ToString();
                user.ItemPrice = dtrow["BilledRate"].ToString();
                user.CatId = "1";
                details.Add(user);

            }

            return details.ToArray();
        }
コード例 #3
0
        public static ItemDetails[] BindDatatable()
        {
            DataTable          dt      = new DataTable();
            List <ItemDetails> details = new List <ItemDetails>();

            //InterfacesBS.InterfacesBL.InterfaceItems allData = new BusinessLogicBS.BusinessClasses.ItemsClass();
            budhashop.CLASS.CallCache callCache = new budhashop.CLASS.CallCache();

            DataSet allDataDS = callCache.getCache();

            dt = allDataDS.Tables[0];

            foreach (DataRow dtrow in dt.Rows)
            {
                bool FeatureChk = bool.Parse(dtrow["FeaturedFlag"].ToString());
                //int category = int.Parse(dtrow["CategoryId"].ToString());
                if (FeatureChk)//&& category == int.Parse(CatgId)
                {
                    ItemDetails user = new ItemDetails();
                    user.ItemId    = dtrow["ItemId"].ToString();
                    user.ItemPath  = dtrow["ImagePath"].ToString();
                    user.ItemName  = dtrow["ItemName"].ToString();
                    user.ItemPrice = dtrow["BilledRate"].ToString();
                    user.CatId     = dtrow["CategoryId"].ToString();
                    details.Add(user);
                }
            }

            return(details.ToArray());
        }
コード例 #4
0
        public static CatDetails[] FetchCatNames()
        {
            DataTable catgDt = new DataTable();

            budhashop.CLASS.CallCache callCache = new budhashop.CLASS.CallCache();
            DataSet allDataDS = callCache.getCache();

            catgDt = allDataDS.Tables[3];



            List <CatDetails> details = new List <CatDetails>();

            foreach (DataRow dtrow in catgDt.Rows)
            {
                CatDetails user = new CatDetails();
                user.CatId   = dtrow["CategoryId"].ToString();
                user.CatName = dtrow["CategoryName"].ToString();


                details.Add(user);
            }

            return(details.ToArray());
        }
コード例 #5
0
        public static ItemDetails[] BindGrptable()
        {
            DataTable          dt      = new DataTable();
            List <ItemDetails> details = new List <ItemDetails>();

            //InterfacesBS.InterfacesBL.InterfaceItems allData = new BusinessLogicBS.BusinessClasses.ItemsClass();
            budhashop.CLASS.CallCache callCache = new budhashop.CLASS.CallCache();

            DataSet allDataDS = callCache.getCache();

            dt = allDataDS.Tables[1];

            foreach (DataRow dtrow in dt.Rows)
            {
                ItemDetails user = new ItemDetails();
                user.ItemId    = dtrow["GroupId"].ToString();
                user.ItemName  = dtrow["GroupName"].ToString();
                user.ItemPath  = dtrow["ImagePath"].ToString();
                user.ItemPrice = dtrow["BilledRate"].ToString();
                user.CatId     = "1";
                details.Add(user);
            }

            return(details.ToArray());
        }
コード例 #6
0
        public static ItemDetails[] itemInfo(string itemId, string grp)
        {
            DataTable          dt      = new DataTable();
            DataTable          dtg     = new DataTable();
            List <ItemDetails> details = new List <ItemDetails>();

            //InterfacesBS.InterfacesBL.InterfaceItems allData = new BusinessLogicBS.BusinessClasses.ItemsClass();
            budhashop.CLASS.CallCache callCache = new budhashop.CLASS.CallCache();

            DataSet allDataDS = callCache.getCache();

            dt  = allDataDS.Tables[0];
            dtg = allDataDS.Tables[1];
            int chk = Int32.Parse(grp.ToString());

            if (chk == 1)
            {
                var         cartItem = dtg.AsEnumerable().First(p => p.Field <long>("GroupId") == long.Parse(itemId));
                ItemDetails user     = new ItemDetails();
                user.ItemId    = cartItem["GroupId"].ToString();
                user.ItemName  = cartItem["GroupName"].ToString();
                user.ItemDesc  = cartItem["Description"].ToString();
                user.ItemPath  = cartItem["ImagePath"].ToString(); //change this to actual image path when done
                user.ItemPrice = cartItem["BilledRate"].ToString();
                user.ItemQty   = cartItem["Qty"].ToString();
                user.CatId     = "1";



                details.Add(user);
            }
            else
            {
                var         cartItem = dt.AsEnumerable().First(p => p.Field <long>("ItemId") == long.Parse(itemId));
                ItemDetails user     = new ItemDetails();
                user.ItemId    = cartItem["ItemId"].ToString();
                user.ItemName  = cartItem["ItemName"].ToString();
                user.ItemDesc  = cartItem["Description"].ToString();
                user.ItemPath  = cartItem["ImagePath"].ToString();
                user.ItemPrice = cartItem["BilledRate"].ToString();
                user.ItemQty   = cartItem["Qty"].ToString();
                user.CatId     = cartItem["CategoryId"].ToString();
                user.Type      = cartItem["TypeItem"].ToString();

                details.Add(user);
            }

            return(details.ToArray());
        }
コード例 #7
0
        public static string getCatName(string CatId)
        {
            DataTable catgDt = new DataTable();

            budhashop.CLASS.CallCache callCache = new budhashop.CLASS.CallCache();
            DataSet allDataDS = callCache.getCache();

            catgDt = allDataDS.Tables[3];

            var catItem = catgDt.AsEnumerable().First(p => p.Field <long>("CategoryId") == long.Parse(CatId));

            string catName = catItem["CategoryName"].ToString();

            return(catName);
        }
コード例 #8
0
        public static ItemDetails[] BindItemsData(string CatgId, string SubCatId)
        {
            DataTable          dt      = new DataTable();
            List <ItemDetails> details = new List <ItemDetails>();

            //InterfacesBS.InterfacesBL.InterfaceItems allData = new BusinessLogicBS.BusinessClasses.ItemsClass();
            budhashop.CLASS.CallCache callCache = new budhashop.CLASS.CallCache();

            DataSet allDataDS = callCache.getCache();

            dt = allDataDS.Tables[0];

            foreach (DataRow dtrow in dt.Rows)
            {
                int    category      = int.Parse(dtrow["CategoryId"].ToString());
                string subCatagoryId = dtrow["SubCatId"].ToString();
                if (SubCatId == "" || SubCatId == "undefined" || SubCatId == "true")
                {
                    if (category == int.Parse(CatgId))
                    {
                        ItemDetails user = new ItemDetails();
                        user.ItemId    = dtrow["ItemId"].ToString();
                        user.ItemPath  = dtrow["ImagePath"].ToString();
                        user.ItemName  = dtrow["ItemName"].ToString();
                        user.ItemPrice = dtrow["BilledRate"].ToString();
                        user.CatId     = dtrow["CategoryId"].ToString();
                        details.Add(user);
                    }
                }
                else
                {
                    if (subCatagoryId == SubCatId && category == int.Parse(CatgId))
                    {
                        ItemDetails user = new ItemDetails();
                        user.ItemId    = dtrow["ItemId"].ToString();
                        user.ItemPath  = dtrow["ImagePath"].ToString();
                        user.ItemName  = dtrow["ItemName"].ToString();
                        user.ItemPrice = dtrow["BilledRate"].ToString();
                        user.CatId     = dtrow["CategoryId"].ToString();
                        details.Add(user);
                    }
                }
            }

            return(details.ToArray());
        }
コード例 #9
0
        //[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
        public static ItemDetails[] SearchItemNames(string searchStr)
        {
            DataTable          dt      = new DataTable();
            DataTable          dtg     = new DataTable();
            List <ItemDetails> details = new List <ItemDetails>();

            //InterfacesBS.InterfacesBL.InterfaceItems allData = new BusinessLogicBS.BusinessClasses.ItemsClass();
            budhashop.CLASS.CallCache callCache = new budhashop.CLASS.CallCache();

            DataSet allDataDS = callCache.getCache();

            dt  = allDataDS.Tables[0];
            dtg = allDataDS.Tables[1];
            var cartItemgrp = dtg.AsEnumerable().Where(p => p.Field <string>("GroupName").ToLower().Contains(searchStr.ToLower())).ToList();;
            var cartItem    = dt.AsEnumerable().Where(p => p.Field <string>("ItemName").ToLower().Contains(searchStr.ToLower())).ToList();;

            foreach (DataRow dtrow in cartItemgrp)
            {
                ItemDetails user = new ItemDetails();
                user.ItemId    = dtrow["GroupId"].ToString();
                user.ItemName  = dtrow["GroupName"].ToString();
                user.ItemDesc  = dtrow["Description"].ToString();
                user.ItemPath  = dtrow["ImagePath"].ToString();//change this to actual image path when done
                user.ItemPrice = dtrow["BilledRate"].ToString();
                user.ItemQty   = dtrow["Qty"].ToString();
                user.CatId     = "1";


                details.Add(user);
            }
            foreach (DataRow dtrow in cartItem)
            {
                ItemDetails user = new ItemDetails();
                user.ItemId    = dtrow["ItemId"].ToString();
                user.ItemName  = dtrow["ItemName"].ToString();
                user.ItemDesc  = dtrow["Description"].ToString();
                user.ItemPath  = dtrow["ImagePath"].ToString();
                user.ItemPrice = dtrow["BilledRate"].ToString();
                user.ItemQty   = dtrow["Qty"].ToString();
                user.CatId     = dtrow["CategoryId"].ToString();

                details.Add(user);
            }

            return(details.ToArray());
        }
コード例 #10
0
        public static SubCatDetails[] FetchSubCatNames(string catId)
        {
            DataTable subCatgDt = new DataTable();

            budhashop.CLASS.CallCache callCache = new budhashop.CLASS.CallCache();
            DataSet allDataDS = callCache.getCache();

            subCatgDt = allDataDS.Tables[4];

            List <SubCatDetails> details = new List <SubCatDetails>();

            foreach (DataRow dtrow in subCatgDt.Rows)
            {
                SubCatDetails user = new SubCatDetails();
                user.SubCatId   = dtrow["SubCatId"].ToString();
                user.SubCatName = dtrow["SubCatName"].ToString();
                string catgId = dtrow["CategoryId"].ToString();
                if (catgId == catId)
                {
                    details.Add(user);
                }
            }
            return(details.ToArray());
        }
コード例 #11
0
        public static ItemDetails[] BindItemsData(string CatgId, string SubCatId)
        {
            DataTable dt = new DataTable();
            List<ItemDetails> details = new List<ItemDetails>();
            //InterfacesBS.InterfacesBL.InterfaceItems allData = new BusinessLogicBS.BusinessClasses.ItemsClass();
            budhashop.CLASS.CallCache callCache = new budhashop.CLASS.CallCache();

            DataSet allDataDS = callCache.getCache();
            dt = allDataDS.Tables[0];

            foreach (DataRow dtrow in dt.Rows)
            {

                int category = int.Parse(dtrow["CategoryId"].ToString());
                string subCatagoryId = dtrow["SubCatId"].ToString();
                if (SubCatId == "" || SubCatId == "undefined" || SubCatId == "true")
                {
                    if (category == int.Parse(CatgId))
                    {
                        ItemDetails user = new ItemDetails();
                        user.ItemId = dtrow["ItemId"].ToString();
                        user.ItemPath = dtrow["ImagePath"].ToString();
                        user.ItemName = dtrow["ItemName"].ToString();
                        user.ItemPrice = dtrow["BilledRate"].ToString();
                        user.CatId = dtrow["CategoryId"].ToString();
                        details.Add(user);
                    }
                }
                else
                {
                    if (subCatagoryId == SubCatId && category == int.Parse(CatgId))
                    {
                        ItemDetails user = new ItemDetails();
                        user.ItemId = dtrow["ItemId"].ToString();
                        user.ItemPath = dtrow["ImagePath"].ToString();
                        user.ItemName = dtrow["ItemName"].ToString();
                        user.ItemPrice = dtrow["BilledRate"].ToString();
                        user.CatId = dtrow["CategoryId"].ToString();
                        details.Add(user);
                    }
                }
            }

            return details.ToArray();
        }
コード例 #12
0
        public static ItemDetails[] SearchItemNames(string searchStr)
        {
            DataTable dt = new DataTable();
            DataTable dtg = new DataTable();
            List<ItemDetails> details = new List<ItemDetails>();
            //InterfacesBS.InterfacesBL.InterfaceItems allData = new BusinessLogicBS.BusinessClasses.ItemsClass();
            budhashop.CLASS.CallCache callCache = new budhashop.CLASS.CallCache();

            DataSet allDataDS = callCache.getCache();
            dt = allDataDS.Tables[0];
            dtg = allDataDS.Tables[1];
            var cartItemgrp = dtg.AsEnumerable().Where(p => p.Field<string>("GroupName").ToLower().Contains(searchStr.ToLower())).ToList(); ;
            var cartItem = dt.AsEnumerable().Where(p => p.Field<string>("ItemName").ToLower().Contains(searchStr.ToLower())).ToList(); ;

            foreach (DataRow dtrow in cartItemgrp)
            {

                ItemDetails user = new ItemDetails();
                user.ItemId = dtrow["GroupId"].ToString();
                user.ItemName = dtrow["GroupName"].ToString();
                user.ItemDesc = dtrow["Description"].ToString();
                user.ItemPath = dtrow["ImagePath"].ToString();//change this to actual image path when done
                user.ItemPrice = dtrow["BilledRate"].ToString();
                user.ItemQty = dtrow["Qty"].ToString();
                user.CatId = "1";

                details.Add(user);

            }
            foreach (DataRow dtrow in cartItem)
            {

                ItemDetails user = new ItemDetails();
                user.ItemId = dtrow["ItemId"].ToString();
                user.ItemName = dtrow["ItemName"].ToString();
                user.ItemDesc = dtrow["Description"].ToString();
                user.ItemPath = dtrow["ImagePath"].ToString();
                user.ItemPrice = dtrow["BilledRate"].ToString();
                user.ItemQty = dtrow["Qty"].ToString();
                user.CatId = dtrow["CategoryId"].ToString();

                details.Add(user);

            }

            return details.ToArray();
        }
コード例 #13
0
        public static ItemDetails[] itemInfo(string itemId, string grp)
        {
            DataTable dt = new DataTable();
            DataTable dtg = new DataTable();
            List<ItemDetails> details = new List<ItemDetails>();
            //InterfacesBS.InterfacesBL.InterfaceItems allData = new BusinessLogicBS.BusinessClasses.ItemsClass();
            budhashop.CLASS.CallCache callCache = new budhashop.CLASS.CallCache();

            DataSet allDataDS = callCache.getCache();
            dt = allDataDS.Tables[0];
            dtg = allDataDS.Tables[1];
            int chk = Int32.Parse(grp.ToString());
            if (chk == 1)
            {
                var cartItem = dtg.AsEnumerable().First(p => p.Field<long>("GroupId") == long.Parse(itemId));
                ItemDetails user = new ItemDetails();
                user.ItemId = cartItem["GroupId"].ToString();
                user.ItemName = cartItem["GroupName"].ToString();
                user.ItemDesc = cartItem["Description"].ToString();
                user.ItemPath = cartItem["ImagePath"].ToString(); //change this to actual image path when done
                user.ItemPrice = cartItem["BilledRate"].ToString();
                user.ItemQty = cartItem["Qty"].ToString();
                user.CatId = "1";

                details.Add(user);

            }
            else
            {
                var cartItem = dt.AsEnumerable().First(p => p.Field<long>("ItemId") == long.Parse(itemId));
                ItemDetails user = new ItemDetails();
                user.ItemId = cartItem["ItemId"].ToString();
                user.ItemName = cartItem["ItemName"].ToString();
                user.ItemDesc = cartItem["Description"].ToString();
                user.ItemPath = cartItem["ImagePath"].ToString();
                user.ItemPrice = cartItem["BilledRate"].ToString();
                user.ItemQty = cartItem["Qty"].ToString();
                user.CatId = cartItem["CategoryId"].ToString();
                user.Type = cartItem["TypeItem"].ToString();

                details.Add(user);

            }

            return details.ToArray();
        }
コード例 #14
0
        public static string getCatName(string CatId)
        {
            DataTable catgDt = new DataTable();
            budhashop.CLASS.CallCache callCache = new budhashop.CLASS.CallCache();
            DataSet allDataDS = callCache.getCache();
            catgDt = allDataDS.Tables[3];

            var catItem = catgDt.AsEnumerable().First(p => p.Field<long>("CategoryId") == long.Parse(CatId));

            string catName = catItem["CategoryName"].ToString();

            return catName;
        }
コード例 #15
0
        public static SubCatDetails[] FetchSubCatNames(string catId)
        {
            DataTable subCatgDt = new DataTable();
            budhashop.CLASS.CallCache callCache = new budhashop.CLASS.CallCache();
            DataSet allDataDS = callCache.getCache();
            subCatgDt = allDataDS.Tables[4];

            List<SubCatDetails> details = new List<SubCatDetails>();

            foreach (DataRow dtrow in subCatgDt.Rows)
            {
                SubCatDetails user = new SubCatDetails();
                user.SubCatId = dtrow["SubCatId"].ToString();
                user.SubCatName = dtrow["SubCatName"].ToString();
                string catgId = dtrow["CategoryId"].ToString();
                if (catgId == catId)
                    details.Add(user);
            }
            return details.ToArray();
        }
コード例 #16
0
        public static CatDetails[] FetchCatNames()
        {
            DataTable catgDt = new DataTable();
            budhashop.CLASS.CallCache callCache = new budhashop.CLASS.CallCache();
            DataSet allDataDS = callCache.getCache();
            catgDt = allDataDS.Tables[3];

            List<CatDetails> details = new List<CatDetails>();

            foreach (DataRow dtrow in catgDt.Rows)
            {

                CatDetails user = new CatDetails();
                user.CatId = dtrow["CategoryId"].ToString();
                user.CatName = dtrow["CategoryName"].ToString();

                details.Add(user);

            }

            return details.ToArray();
        }