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)); parameter.Add(new KeyValuePair<string, object>("@GiftCardType", _csvGiftCardHiddenCsv.Value)); string filename = "MyReport_GiftCardItems" + "_" + 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_GetGiftCardReportsForExport]", parameter, resultsData); } catch (Exception ex) { ProcessException(ex); } }
protected void ButtonTax_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_StoreTax" + "_" + DateTime.Now.ToString("M_dd_yyyy_H_M_s") + ".csv"; string filePath = HttpContext.Current.Server.MapPath(ResolveUrl(this.AppRelativeTemplateSourceDirectory)) + filename; ExportLargeData csvLdata = new ExportLargeData(); string showReport = HdnValue.Value; if (showReport == "1") csvLdata.ExportToCSV(true, ",", "[dbo].[usp_Aspx_GetTaxRuleForStoreTaxReportForExport]", parameter, filePath); else if (showReport == "2") csvLdata.ExportToCSV(true, ",", "[dbo].[usp_Aspx_GetTaxDetailsByCurrentMonthForExport]", parameter, filePath); else csvLdata.ExportToCSV(true, ",", "[dbo].[usp_Aspx_GetTaxReportDetailsBy24hoursForExport]", parameter, filePath); } catch (Exception ex) { ProcessException(ex); } }
protected void ButtonLowStock_Click(object sender, System.EventArgs e) { try { StoreSettingConfig ssc = new StoreSettingConfig(); AspxCommonInfo aspxCommonObj = new AspxCommonInfo(); aspxCommonObj.StoreID = GetStoreID; aspxCommonObj.PortalID = GetPortalID; aspxCommonObj.CultureName = GetCurrentCultureName; 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)); LowStockQuantity = int.Parse(ssc.GetStoreSettingsByKey(StoreSetting.LowStockQuantity, GetStoreID, GetPortalID, GetCurrentCultureName)); parameter.Add(new KeyValuePair<string, object>("@LowStockQuantity", LowStockQuantity)); string filename = "MyReport_LowStockItems" + "_" + 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_GetLowStockItemsForExport]", 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; List<KeyValuePair<string, object>> parameter = CommonParmBuilder.GetParamSPC(aspxCommonObj); string filename = "MyReport_OrderedItems" + "_" + 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_GetItemsOrderedForExport]", parameter, resultsData); } catch (Exception ex) { ProcessException(ex); } }
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); } }
protected void btnExportDetailToCSV_Click(object sender, EventArgs e) { try { AspxCommonInfo aspxCommonObj = new AspxCommonInfo(); aspxCommonObj.StoreID = GetStoreID; aspxCommonObj.PortalID = GetPortalID; aspxCommonObj.UserName = GetUsername; 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>("@CouponCode", HdnValueDetail.Value)); parameter.Add(new KeyValuePair<string, object>("@CurrencySymbol", CurrencySymbol)); string filename = "MyReport_CouponPerSales" + "_" + 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_GetCouponPerSalesDetailViewForExport]", parameter, filePath); } catch (Exception ex) { ProcessException(ex); } }