Пример #1
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     try
     {
         DataTable      resultsData   = new DataTable();
         AspxCommonInfo aspxCommonObj = new AspxCommonInfo();
         aspxCommonObj.StoreID     = GetStoreID;
         aspxCommonObj.PortalID    = GetPortalID;
         aspxCommonObj.CultureName = GetCurrentCultureName;
         List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSPC(aspxCommonObj);
         string          filename   = "MyReport_CustomerTags" + "_" + DateTime.Now.ToString("M_dd_yyyy_H_M_s") + ".xls";
         string          filePath   = HttpContext.Current.Server.MapPath(ResolveUrl(this.AppRelativeTemplateSourceDirectory)) + filename;
         ExportLargeData excelLdata = new ExportLargeData();
         excelLdata.ExportTOExcel(filePath, "[dbo].[usp_Aspx_GetCustomerItemTagsForExport]", parameter, resultsData);
     }
     catch (Exception ex)
     {
         ProcessException(ex);
     }
 }
Пример #2
0
 public static List <OutOfStockInfo> NotificationitemsGetAll(AspxCommonInfo aspxCommonObj)
 {
     try
     {
         List <KeyValuePair <string, object> > parameterCollection = CommonParmBuilder.GetParamSPC(aspxCommonObj);
         NotificationItemList ih   = new NotificationItemList();
         SQLHandler           sqLH = new SQLHandler();
         DataSet ds = sqLH.ExecuteAsDataSet("[dbo].[usp_Aspx_NotificationItemsGetAll]", parameterCollection);
         List <OutOfStockInfo> OutOfStockDetails = new List <OutOfStockInfo>();
         if (ds.Tables.Count > 0)
         {
             OutOfStockDetails = DataSourceHelper.FillCollection <OutOfStockInfo>(ds.Tables[0]);
         }
         return(OutOfStockDetails);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Пример #3
0
 protected void ButtonCustomerTagsDetail_Click(object sender, System.EventArgs e)
 {
     try
     {
         AspxCommonInfo aspxCommonObj = new AspxCommonInfo();
         aspxCommonObj.StoreID     = GetStoreID;
         aspxCommonObj.PortalID    = GetPortalID;
         aspxCommonObj.UserName    = HdnGridData.Value;
         aspxCommonObj.CultureName = GetCurrentCultureName;
         List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSPUC(aspxCommonObj);
         string          filename = "MyReport_StoreOrder" + "_" + DateTime.Now.ToString("M_dd_yyyy_H_M_s") + ".csv";
         string          filePath = HttpContext.Current.Server.MapPath(ResolveUrl(this.AppRelativeTemplateSourceDirectory)) + filename;
         ExportLargeData csvLdata = new ExportLargeData();
         csvLdata.ExportToCSV(true, ",", "[dbo].[usp_Aspx_ShowCustomerTagListForExport]", parameter, filePath);
     }
     catch (Exception ex)
     {
         ProcessException(ex);
     }
 }
 public List <ServiceAvailableTime> GetServiceAvailableTime(GetServiceAvailableTime getServiceTimeObj, AspxCommonInfo aspxCommonObj)
 {
     try
     {
         List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSPC(aspxCommonObj);
         parameter.Add(new KeyValuePair <string, object>("@CategoryID", getServiceTimeObj.CategoryID));
         parameter.Add(new KeyValuePair <string, object>("@BranchID", getServiceTimeObj.BranchID));
         parameter.Add(new KeyValuePair <string, object>("@EmployeeID", getServiceTimeObj.EmployeeID));
         parameter.Add(new KeyValuePair <string, object>("@ServiceDateID", getServiceTimeObj.ServiceDateID));
         parameter.Add(new KeyValuePair <string, object>("@ServiceDate", getServiceTimeObj.ServiceDate));
         parameter.Add(new KeyValuePair <string, object>("@ItemID", getServiceTimeObj.ItemID));
         SQLHandler sqlh = new SQLHandler();
         List <ServiceAvailableTime> lstServTime = sqlh.ExecuteAsList <ServiceAvailableTime>("[dbo].[usp_Aspx_GetServiceTime]", parameter);
         return(lstServTime);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Пример #5
0
 public List <RssFeedItemInfo> GetItemRssContent(AspxCommonInfo aspxCommonObj, string rssOption, int count)
 {
     try
     {
         var rssFeedContent = new List <RssFeedItemInfo>();
         List <KeyValuePair <string, object> > Parameter = CommonParmBuilder.GetParamSPUC(aspxCommonObj);
         Parameter.Add(new KeyValuePair <string, object>("@Count", count));
         SQLHandler SQLH = new SQLHandler();
         switch (rssOption)
         {
         case "specialitems":
             rssFeedContent = SQLH.ExecuteAsList <RssFeedItemInfo>("[dbo].[usp_Aspx_GetRssFeedSpecialItem]", Parameter);
             break;
         }
         return(rssFeedContent);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        public List <ServiceAvailableTime> GetServiceAvailableTime(GetServiceAvailableTime getServiceTimeObj, AspxCommonInfo aspxCommonObj)
        {
            List <ServiceAvailableTime> serviceAvailableTimes;

            try
            {
                List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSPC(aspxCommonObj);
                parameter.Add(new KeyValuePair <string, object>("CategoryID", (object)getServiceTimeObj.CategoryID));
                parameter.Add(new KeyValuePair <string, object>("BranchID", (object)getServiceTimeObj.BranchID));
                parameter.Add(new KeyValuePair <string, object>("EmployeeID", (object)getServiceTimeObj.EmployeeID));
                parameter.Add(new KeyValuePair <string, object>("ServiceDateID", getServiceTimeObj.ServiceDateID));
                parameter.Add(new KeyValuePair <string, object>("ServiceDate", getServiceTimeObj.ServiceDate));
                parameter.Add(new KeyValuePair <string, object>("ItemID", (object)getServiceTimeObj.ItemID));
                serviceAvailableTimes = (new OracleHandler()).ExecuteAsList <ServiceAvailableTime>("usp_Aspx_GetServiceTime", parameter);
            }
            catch (Exception exception)
            {
                throw exception;
            }
            return(serviceAvailableTimes);
        }
 protected void ButtonCustomerByOrder_Click(object sender, System.EventArgs e)
 {
     try
     {
         AspxCommonInfo aspxCommonObj = new AspxCommonInfo();
         aspxCommonObj.StoreID     = GetStoreID;
         aspxCommonObj.PortalID    = GetPortalID;
         aspxCommonObj.CultureName = GetCurrentCultureName;
         StoreSettingConfig ssc            = new StoreSettingConfig();
         string             CurrencyCode   = ssc.GetStoreSettingsByKey(StoreSetting.MainCurrency, GetStoreID, GetPortalID, CultureName);
         string             CurrencySymbol = StoreSetting.GetSymbolFromCurrencyCode(CurrencyCode, GetStoreID, GetPortalID);
         List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSPC(aspxCommonObj);
         parameter.Add(new KeyValuePair <string, object>("@CurrencySymbol", CurrencySymbol));
         string          filename = "MyReport_CustomerByTotalOrder" + "_" + DateTime.Now.ToString("M_dd_yyyy_H_M_s") + ".csv";
         string          filePath = HttpContext.Current.Server.MapPath(ResolveUrl(this.AppRelativeTemplateSourceDirectory)) + filename;
         ExportLargeData csvLdata = new ExportLargeData();
         csvLdata.ExportToCSV(true, ",", "[dbo].[usp_Aspx_GetCustomerOrderTotalForExport]", parameter, filePath);
     }
     catch (Exception ex)
     {
         ProcessException(ex);
     }
 }
 protected void Button1_Click(object sender, EventArgs e)
 {
     try
     {
         DataTable      resultsData   = new DataTable();
         AspxCommonInfo aspxCommonObj = new AspxCommonInfo();
         aspxCommonObj.StoreID     = GetStoreID;
         aspxCommonObj.PortalID    = GetPortalID;
         aspxCommonObj.CultureName = GetCurrentCultureName;
         StoreSettingConfig ssc            = new StoreSettingConfig();
         string             CurrencyCode   = ssc.GetStoreSettingsByKey(StoreSetting.MainCurrency, GetStoreID, GetPortalID, CultureName);
         string             CurrencySymbol = StoreSetting.GetSymbolFromCurrencyCode(CurrencyCode, GetStoreID, GetPortalID);
         List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSPC(aspxCommonObj);
         parameter.Add(new KeyValuePair <string, object>("@CurrencySymbol", CurrencySymbol));
         string          filename   = "MyReport_StoreShipping" + "_" + DateTime.Now.ToString("M_dd_yyyy_H_M_s") + ".xls";
         string          filePath   = HttpContext.Current.Server.MapPath(ResolveUrl(this.AppRelativeTemplateSourceDirectory)) + filename;
         ExportLargeData excelLdata = new ExportLargeData();
         string          showReport = HdnValue.Value;
         if (showReport == "1")
         {
             excelLdata.ExportTOExcel(filePath, "[dbo].[usp_Aspx_ShippingReportDetailsForExport]", parameter, resultsData);
         }
         else if (showReport == "2")
         {
             excelLdata.ExportTOExcel(filePath, "[dbo].[usp_Aspx_GetShippingDetailsByCurrentMonthForExport]", parameter, resultsData);
         }
         else
         {
             excelLdata.ExportTOExcel(filePath, "[dbo].[usp_Aspx_GetShippingReportDetailsBy24hoursForExport]", parameter, resultsData);
         }
     }
     catch (Exception ex)
     {
         ProcessException(ex);
     }
 }
Пример #9
0
 public static void NotificationSaveUpdateSettings(NotificationSettingsInfo saveUpdateInfo, AspxCommonInfo aspxCommonObj)
 {
     try
     {
         List <KeyValuePair <string, object> > parameterCollection = CommonParmBuilder.GetParamSPUC(aspxCommonObj);
         parameterCollection.Add(new KeyValuePair <string, object>("@AllActive", saveUpdateInfo.AllActive));
         parameterCollection.Add(new KeyValuePair <string, object>("@UserNotificationActive", saveUpdateInfo.UserNotificationActive));
         parameterCollection.Add(new KeyValuePair <string, object>("@UserNotificationCount", saveUpdateInfo.UserNotificationCount));
         parameterCollection.Add(new KeyValuePair <string, object>("@SubscriptionNotificationActive ", saveUpdateInfo.SubscriptionNotificationActive));
         parameterCollection.Add(new KeyValuePair <string, object>("@SubscriptionNotificationCount", saveUpdateInfo.SubscriptionNotificationCount));
         parameterCollection.Add(new KeyValuePair <string, object>("@OutofStockNotificationActive", saveUpdateInfo.OutofStockNotificationActive));
         parameterCollection.Add(new KeyValuePair <string, object>("@OutofStockNotificationCount", saveUpdateInfo.OutofStockNotificationCount));
         parameterCollection.Add(new KeyValuePair <string, object>("@ItemsLowStockNotificationActive", saveUpdateInfo.ItemsLowStockNotificationActive));
         parameterCollection.Add(new KeyValuePair <string, object>("@ItemsLowStockCount", saveUpdateInfo.ItemsLowStockCount));
         parameterCollection.Add(new KeyValuePair <string, object>("@OrdersNotificationAtive", saveUpdateInfo.OrdersNotificationAtive));
         parameterCollection.Add(new KeyValuePair <string, object>("@OrdersNotificationCount", saveUpdateInfo.OrdersNotificationCount));
         SQLHandler sqlH = new SQLHandler();
         sqlH.ExecuteNonQuery("[dbo].[usp_Aspx_NotificationSaveUpdateSettings]", parameterCollection);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
        //------------------get items by dyanamic Advance serach-----------------------

        public List <AdvanceSearchDetailsInfo> GetItemsByDyanamicAdvanceSearch(int offset, int limit, AspxCommonInfo aspxCommonObj, ItemsByDynamicAdvanceSearchInfo searchObj)
        {
            string spName = string.Empty;

            try
            {
                List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSPUC(aspxCommonObj);
                parameter.Add(new KeyValuePair <string, object>("offset", offset));
                parameter.Add(new KeyValuePair <string, object>("limit", limit));
                parameter.Add(new KeyValuePair <string, object>("CategoryID", searchObj.CategoryID));
                parameter.Add(new KeyValuePair <string, object>("IsGiftCard", searchObj.IsGiftCard));
                parameter.Add(new KeyValuePair <string, object>("SearchText", searchObj.SearchText));
                parameter.Add(new KeyValuePair <string, object>("BrandID", searchObj.BrandID));
                parameter.Add(new KeyValuePair <string, object>("PriceFrom", searchObj.PriceFrom));
                parameter.Add(new KeyValuePair <string, object>("PriceTo", searchObj.PriceTo));
                parameter.Add(new KeyValuePair <string, object>("Attributes", searchObj.AttributeIDs));
                parameter.Add(new KeyValuePair <string, object>("RowTotal", searchObj.RowTotal));
                OracleHandler sqlH = new OracleHandler();
                if (searchObj.SortBy == 1)
                {
                    spName = "[dbo].[usp_Aspx_AdvanceSearchSortByItemIDDesc]";
                }
                else if (searchObj.SortBy == 2)
                {
                    spName = "[dbo].[usp_Aspx_AdvanceSearchSortByItemID]";
                }
                else if (searchObj.SortBy == 3)
                {
                    spName = "[dbo].[usp_Aspx_AdvanceSearchSortByPriceDesc]";
                }
                else if (searchObj.SortBy == 4)
                {
                    spName = "[dbo].[usp_Aspx_AdvanceSearchSortByPrice]";
                }
                else if (searchObj.SortBy == 5)
                {
                    spName = "[dbo].[usp_Aspx_AdvanceSearchSortByName]";
                }
                else if (searchObj.SortBy == 6)
                {
                    spName = "[dbo].[usp_Aspx_AdvanceSearchSortByViewCount]";
                }
                else if (searchObj.SortBy == 7)
                {
                    spName = "[dbo].[usp_Aspx_AdvanceSearchSortByIsFeatured]";
                }
                else if (searchObj.SortBy == 8)
                {
                    spName = "[dbo].[usp_Aspx_AdvanceSearchSortByIsSpecial]";
                }
                else if (searchObj.SortBy == 9)
                {
                    spName = "[dbo].[usp_Aspx_AdvanceSearchSortBySoldItem]";
                }
                else if (searchObj.SortBy == 10)
                {
                    spName = "[dbo].[usp_Aspx_AdvanceSearchSortByDiscount]";
                }
                else if (searchObj.SortBy == 11)
                {
                    spName = "usp_Aspx_AdvanceSearchSortByRatedValue";
                }
                List <AdvanceSearchDetailsInfo> lstAdvanceSearch = sqlH.ExecuteAsList <AdvanceSearchDetailsInfo>(spName, parameter);
                return(lstAdvanceSearch);
            }
            catch (Exception e)
            {
                throw e;
            }
        }
Пример #11
0
        public List <SpecialItemsInfo> GetAllSpecialItems(int offset, int limit, AspxCommonInfo aspxCommonObj, int sortBy, int rowTotal)
        {
            string spName = string.Empty;

            try
            {
                List <KeyValuePair <string, object> > parameterCollection = CommonParmBuilder.GetParamSPUC(aspxCommonObj);
                parameterCollection.Add(new KeyValuePair <string, object>("@offset", offset));
                parameterCollection.Add(new KeyValuePair <string, object>("@limit", limit));
                parameterCollection.Add(new KeyValuePair <string, object>("@RowTotal", rowTotal));
                SQLHandler sqlH = new SQLHandler();
                if (sortBy == 1)
                {
                    spName = "[dbo].[usp_Aspx_GetSpecialItemDetailsSortByItemIDDesc]";
                }
                else if (sortBy == 2)
                {
                    spName = "[dbo].[usp_Aspx_GetSpecialItemDetailsSortByItemIDAsc]";
                }
                else if (sortBy == 3)
                {
                    spName = "[dbo].[usp_Aspx_GetSpecialItemDetailsSortByPriceDesc]";
                }
                else if (sortBy == 4)
                {
                    spName = "[dbo].[usp_Aspx_GetSpecialItemDetailsSortByPriceAsc]";
                }
                else if (sortBy == 5)
                {
                    spName = "[dbo].[usp_Aspx_GetSpecialItemDetailsSortByName]";
                }
                else if (sortBy == 6)
                {
                    spName = "[dbo].[usp_Aspx_GetSpecialItemDetailsSortByViewCount]";
                }
                else if (sortBy == 7)
                {
                    spName = "[dbo].[usp_Aspx_GetSpecialItemDetailsSortByIsFeatured]";
                }
                else if (sortBy == 8)
                {
                    spName = "[dbo].[usp_Aspx_GetSpecialItemDetailsSortByIsSpecial]";
                }
                else if (sortBy == 9)
                {
                    spName = "[dbo].[usp_Aspx_GetSpecialItemDetailsSortBySoldItem]";
                }
                else if (sortBy == 10)
                {
                    spName = "[dbo].[usp_Aspx_GetSpecialItemDetailsSortByDiscount]";
                }
                else if (sortBy == 11)
                {
                    spName = "[dbo].[usp_Aspx_GetSpecialItemDetailsSortByRatedValue]";
                }
                List <SpecialItemsInfo> lstCatDetail = sqlH.ExecuteAsList <SpecialItemsInfo>(spName, parameterCollection);
                return(lstCatDetail);
            }
            catch (Exception e)
            {
                throw e;
            }
        }
Пример #12
0
        public static List <ItemBasicDetailsInfo> GetUserTaggedItems(int offset, int limit, string tagIDs, int SortBy, int rowTotal, AspxCommonInfo aspxCommonObj)
        {
            string spName = string.Empty;

            try
            {
                List <KeyValuePair <string, object> > parameterCollection = CommonParmBuilder.GetParamSPUC(aspxCommonObj);
                parameterCollection.Add(new KeyValuePair <string, object>("@offset", offset));
                parameterCollection.Add(new KeyValuePair <string, object>("@limit", limit));
                parameterCollection.Add(new KeyValuePair <string, object>("@TagIDs", tagIDs));
                parameterCollection.Add(new KeyValuePair <string, object>("@RowTotal", rowTotal));
                SQLHandler sqlH = new SQLHandler();
                if (SortBy == 1)
                {
                    spName = "[dbo].[usp_Aspx_GetItemsByTagIDSortByItemIDDesc]";
                }
                else if (SortBy == 2)
                {
                    spName = "[dbo].[usp_Aspx_GetItemsByTagIDSortByItemIDAsc]";
                }
                else if (SortBy == 3)
                {
                    spName = "[dbo].[usp_Aspx_GetItemsByTagIDSortByPriceDesc]";
                }
                else if (SortBy == 4)
                {
                    spName = "[dbo].[usp_Aspx_GetItemsByTagIDSortByPriceAsc]";
                }
                else if (SortBy == 5)
                {
                    spName = "[dbo].[usp_Aspx_GetItemsByTagIDSortByName]";
                }
                else if (SortBy == 6)
                {
                    spName = "[dbo].[usp_Aspx_GetItemsByTagIDSortByViewCount]";
                }
                else if (SortBy == 7)
                {
                    spName = "[dbo].[usp_Aspx_GetItemsByTagIDSortByIsFeatured]";
                }
                else if (SortBy == 8)
                {
                    spName = "[dbo].[usp_Aspx_GetItemsByTagIDSortByIsSpecial]";
                }
                else if (SortBy == 9)
                {
                    spName = "[dbo].[usp_Aspx_GetItemsByTagIDSortBySoldItem]";
                }
                else if (SortBy == 10)
                {
                    spName = "[dbo].[usp_Aspx_GetItemsByTagIDSortByDiscount]";
                }
                else if (SortBy == 11)
                {
                    spName = "[dbo].[usp_Aspx_GetItemsByTagIDSortByRatedValue]";
                }
                List <ItemBasicDetailsInfo> lstItemBasic = sqlH.ExecuteAsList <ItemBasicDetailsInfo>(spName, parameterCollection);
                return(lstItemBasic);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public static List <ItemBasicDetailsInfo> GetUserTaggedItems(int offset, int limit, string tagIDs, int SortBy, int rowTotal, AspxCommonInfo aspxCommonObj)
        {
            List <ItemBasicDetailsInfo> itemBasicDetailsInfos;
            string empty = string.Empty;

            try
            {
                List <KeyValuePair <string, object> > paramSPUC = CommonParmBuilder.GetParamSPUC(aspxCommonObj);
                paramSPUC.Add(new KeyValuePair <string, object>("@offset", (object)offset));
                paramSPUC.Add(new KeyValuePair <string, object>("@limit", (object)limit));
                paramSPUC.Add(new KeyValuePair <string, object>("@TagIDs", tagIDs));
                paramSPUC.Add(new KeyValuePair <string, object>("@RowTotal", (object)rowTotal));
                OracleHandler sQLHandler = new OracleHandler();
                if (SortBy == 1)
                {
                    empty = "[dbo].[usp_Aspx_GetItemsByTagIDSortByItemIDDesc]";
                }
                else if (SortBy == 2)
                {
                    empty = "[dbo].[usp_Aspx_GetItemsByTagIDSortByItemIDAsc]";
                }
                else if (SortBy == 3)
                {
                    empty = "[dbo].[usp_Aspx_GetItemsByTagIDSortByPriceDesc]";
                }
                else if (SortBy == 4)
                {
                    empty = "[dbo].[usp_Aspx_GetItemsByTagIDSortByPriceAsc]";
                }
                else if (SortBy == 5)
                {
                    empty = "[dbo].[usp_Aspx_GetItemsByTagIDSortByName]";
                }
                else if (SortBy == 6)
                {
                    empty = "[dbo].[usp_Aspx_GetItemsByTagIDSortByViewCount]";
                }
                else if (SortBy == 7)
                {
                    empty = "[dbo].[usp_Aspx_GetItemsByTagIDSortByIsFeatured]";
                }
                else if (SortBy == 8)
                {
                    empty = "[dbo].[usp_Aspx_GetItemsByTagIDSortByIsSpecial]";
                }
                else if (SortBy == 9)
                {
                    empty = "[dbo].[usp_Aspx_GetItemsByTagIDSortBySoldItem]";
                }
                else if (SortBy == 10)
                {
                    empty = "[dbo].[usp_Aspx_GetItemsByTagIDSortByDiscount]";
                }
                else if (SortBy == 11)
                {
                    empty = "[dbo].[usp_Aspx_GetItemsByTagIDSortByRatedValue]";
                }
                itemBasicDetailsInfos = sQLHandler.ExecuteAsList <ItemBasicDetailsInfo>(empty, paramSPUC);
            }
            catch (Exception exception)
            {
                throw exception;
            }
            return(itemBasicDetailsInfos);
        }