Exemplo n.º 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.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>("@CurrencySymbol", CurrencySymbol));
         string          filename   = "MyReport_Shipments" + "_" + 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_GetShipmentsDetailsForExport]", parameter, resultsData);
     }
     catch (Exception ex)
     {
         ProcessException(ex);
     }
 }
Exemplo n.º 2
0
 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 ButtonShippingCsv_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_StoreShipping" + "_" + 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_ShippingReportDetailsForExport]", parameter, filePath);
         }
         else if (showReport == "2")
         {
             csvLdata.ExportToCSV(true, ",", "[dbo].[usp_Aspx_GetShippingDetailsByCurrentMonthForExport]", parameter, filePath);
         }
         else
         {
             csvLdata.ExportToCSV(true, ",", "[dbo].[usp_Aspx_GetShippingReportDetailsBy24hoursForExport]", 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_NewAccount" + "_" + 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_GetNewAccountDetailsForExport]", parameter, resultsData);
         }
         else if (showReport == "2")
         {
             excelLdata.ExportTOExcel(filePath, "[dbo].[usp_Aspx_GetNewAccountDetailsByCurrentMonthForExport]", parameter, resultsData);
         }
         else
         {
             excelLdata.ExportTOExcel(filePath, "[dbo].[usp_Aspx_GetNewAccountDetailsBy24hoursForExport]", parameter, resultsData);
         }
     }
     catch (Exception ex)
     {
         ProcessException(ex);
     }
 }
Exemplo n.º 5
0
 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);
     }
 }
Exemplo n.º 6
0
 protected void ButtonCustomerReview_Click(object sender, System.EventArgs e)
 {
     try
     {
         AspxCommonInfo aspxCommonObj = new AspxCommonInfo();
         aspxCommonObj.StoreID  = GetStoreID;
         aspxCommonObj.PortalID = GetPortalID;
         List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSP(aspxCommonObj);
         string          filename = "MyReport_CustomerReview" + "_" + 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_GetCustomerReviewsForExport]", parameter, filePath);
     }
     catch (Exception ex)
     {
         ProcessException(ex);
     }
 }
Exemplo n.º 7
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     try
     {
         DataTable      resultsData   = new DataTable();
         AspxCommonInfo aspxCommonObj = new AspxCommonInfo();
         aspxCommonObj.StoreID  = GetStoreID;
         aspxCommonObj.PortalID = GetPortalID;
         List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSP(aspxCommonObj);
         string          filename   = "MyReport_PopularTags" + "_" + 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_GetPopularityTagsForExport]", parameter, resultsData);
     }
     catch (Exception ex)
     {
         ProcessException(ex);
     }
 }
Exemplo n.º 8
0
 protected void Button2_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);
         parameter.Add(new KeyValuePair <string, object>("@ItemID", _csvItemReviewDetailHdnValue.Value));
         string          filename   = "MyReport_ItemReview" + "_" + 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_GetItemWiseReviewsListForExport]", parameter, resultsData);
     }
     catch (Exception ex)
     {
         ProcessException(ex);
     }
 }