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);
     }
 }
Esempio n. 2
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);
     }
 }
Esempio n. 3
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);
     }
 }
Esempio n. 4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                IncludeCss("MostViewedItems", "/Templates/" + TemplateName + "/css/GridView/tablesort.css", "/Templates/" + TemplateName + "/css/MessageBox/style.css", "/Templates/" + TemplateName + "/css/PopUp/style.css", "/Templates/" + TemplateName + "/css/JQueryUI/jquery.ui.all.css");
                IncludeJs("MostViewedItems", "/js/GridView/jquery.grid.js", "/js/GridView/SagePaging.js",
                          "/js/GridView/jquery.global.js", "/js/GridView/jquery.dateFormat.js", "/js/DateTime/date.js", "/js/MessageBox/jquery.easing.1.3.js", "/js/MessageBox/alertbox.js",
                          "/js/AjaxFileUploader/ajaxupload.js", "/js/PopUp/custom.js", "/js/ExportToCSV/table2CSV.js",
                          "/Modules/AspxCommerce/AspxItemsManagement/js/MostViewedItems.js", "/js/CurrencyFormat/jquery.formatCurrency-1.4.0.js", "/js/CurrencyFormat/jquery.formatCurrency.all.js");

                StoreID     = GetStoreID;
                PortalID    = GetPortalID;
                Username    = GetUsername;
                CultureName = GetCurrentCultureName;
                StoreSettingConfig ssc = new StoreSettingConfig();
                CurrencyCode   = ssc.GetStoreSettingsByKey(StoreSetting.MainCurrency, GetStoreID, GetPortalID, CultureName);
                CurrencySymbol = StoreSetting.GetSymbolFromCurrencyCode(CurrencyCode, GetStoreID, GetPortalID);

                string modulePath = this.AppRelativeTemplateSourceDirectory;
                hst = AppLocalized.getLocale(modulePath);
            }
            IncludeLanguageJS();
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
Esempio 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);
     }
 }
Esempio n. 6
0
    private void LoadGlobalVariables()
    {
        StoreSettingConfig ssc          = new StoreSettingConfig();
        string             currencyCode = ssc.GetStoreSettingsByKey(StoreSetting.MainCurrency, GetStoreID, GetPortalID, GetCurrentCultureName);

        if (currencyCode != null)
        {
            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "region",
                                                    " var region='" +
                                                    StoreSetting.GetRegionFromCurrencyCode(currencyCode, GetStoreID,
                                                                                           GetPortalID) + "';", true);
            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "curSymbol",
                                                    " var curSymbol='" +
                                                    StoreSetting.GetSymbolFromCurrencyCode(currencyCode, GetStoreID,
                                                                                           GetPortalID) + "';", true);
        }
    }
Esempio n. 7
0
    public void LoadGlobalVariables()
    {
        Page.ClientScript.RegisterClientScriptInclude("AspxCommereCore", ResolveUrl("~/js/SageFrameCorejs/aspxcommercecore.js"));
        Page.ClientScript.RegisterClientScriptInclude("Session", ResolveUrl("~/js/Session.js"));
        IsUseFriendlyUrls = sfConfig.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
        PageExtension     = SageFrameSettingKeys.PageExtension;
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "globalServicePath", " var aspxservicePath='" + ResolveUrl("~/") + "Modules/AspxCommerce/AspxCommerceServices/" + "';", true);
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "globalRootPath", " var aspxRootPath='" + ResolveUrl("~/") + "';", true);
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "globalTemplateFolderPath", " var aspxTemplateFolderPath='" + ResolveUrl("~/") + "Templates/" + TemplateName + "';", true);
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "pageExtension", " var pageExtension='" + PageExtension + "';", true);
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "storeID", " var storeID='" + GetStoreID + "';", true);
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "portalID", " var portalID='" + GetPortalID + "';", true);
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "culturename", " var cultureName='" + GetCurrentCultureName + "';", true);
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "templatename", " var templateName='" + TemplateName + "';", true);
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "customerid", " var customerID='" + GetCustomerID + "';", true);
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "username", " var userName='******';", true);
        //  ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "noimagepath", " var aspxTemplateFolderPath='" + ResolveUrl("~/") + "Templates/" + TemplateName + "';", true);
        //  ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "defaultlogourl", " var aspxTemplateFolderPath='" + ResolveUrl("~/") + "Templates/" + TemplateName + "';", true);
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "isfriendlyurl", " var IsUseFriendlyUrls='" + IsUseFriendlyUrls + "';", true);
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "sessioncode", " var sessionCode='" + HttpContext.Current.Session.SessionID.ToString() + "';", true);
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "clientIPAddress", " var clientIPAddress='" + HttpContext.Current.Request.UserHostAddress + "';", true);
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "LoginURL", " var LoginURL='" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalLoginpage) + "';", true);
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "itemImagePath", " var itemImagePath='Modules/AspxCommerce/AspxItemsManagement/uploads/';", true);
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "categoryImagePath", " var categoryImagePath='Modules/AspxCommerce/AspxCategoryManagement/uploads/';", true);
        string userIP      = HttpContext.Current.Request.UserHostAddress;
        string countryName = "";
        IPAddressToCountryResolver ipToCountry = new IPAddressToCountryResolver();

        ipToCountry.GetCountry(userIP, out countryName);
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "clientCountry", " var aspxCountryName='" + countryName + "';", true);
        StoreSettingConfig ssc          = new StoreSettingConfig();
        string             currencyCode = ssc.GetStoreSettingsByKey(StoreSetting.MainCurrency, GetStoreID, GetPortalID, GetCurrentCultureName);

        if (currencyCode != null)
        {
            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "region",
                                                    " var region='" +
                                                    StoreSetting.GetRegionFromCurrencyCode(currencyCode, GetStoreID,
                                                                                           GetPortalID) + "';", true);
            ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "curSymbol",
                                                    " var curSymbol='" +
                                                    StoreSetting.GetSymbolFromCurrencyCode(currencyCode, GetStoreID,
                                                                                           GetPortalID) + "';", true);
        }
        if (IsUseFriendlyUrls)
        {
            if (GetPortalID > 1)
            {
                sageRedirectPath = ResolveUrl("~/portal/" + GetPortalSEOName + "/");
                sageNavigateUrl  = ResolveUrl("~/portal/" + GetPortalSEOName + "/" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage) + PageExtension);
            }
            else
            {
                sageRedirectPath = ResolveUrl("~/");
                sageNavigateUrl  = ResolveUrl("~/" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage) + PageExtension);
            }
        }
        else
        {
            sageRedirectPath = ResolveUrl("{~/Default" + PageExtension + "?ptlid=" + GetPortalID + "&ptSEO=" + GetPortalSEOName + "&pgnm=");
            sageNavigateUrl  = ResolveUrl("~/Default" + PageExtension + "?ptlid=" + GetPortalID + "&ptSEO=" + GetPortalSEOName + "&pgnm=" + sfConfig.GetSettingsByKey(SageFrameSettingKeys.PortalDefaultPage));
        }
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "globalRedirectPath", " var aspxRedirectPath='" + sageRedirectPath + "';", true);
    }