Ejemplo n.º 1
0
        public void DownloadPrimarySalesExcelTemplate(string ddlValue)
        {
            try
            {
                string Monthname  = ddlValue.Substring(0, ddlValue.IndexOf("-"));
                int    Month      = DateTime.ParseExact(Monthname, "MMM", new CultureInfo("en-US")).Month;
                string Yearnumber = ddlValue.Substring(ddlValue.IndexOf("-") + 1);
                int    Year       = Int32.Parse(Yearnumber);
                Ds = new DataSet();
                DataTable dtHelpContent = new DataTable();
                DataRow   drLines;
                dtHelpContent.Columns.Add("Instructions");
                drLines = dtHelpContent.NewRow();
                drLines["Instructions"] = "1.Please Download the primary sales Master Data";
                dtHelpContent.Rows.Add(drLines);
                drLines = dtHelpContent.NewRow();
                drLines["Instructions"] = "2. Please Download the primary sales excel Template for upload";
                dtHelpContent.Rows.Add(drLines);
                drLines = dtHelpContent.NewRow();
                drLines["Instructions"] = "3.Do not enter above 500 characters in Excel sheet columns on upload template";
                dtHelpContent.Rows.Add(drLines);
                drLines = dtHelpContent.NewRow();
                drLines["Instructions"] = "4.Do not alter the excel file structure(i.e.adding or removing the column)";
                dtHelpContent.Rows.Add(drLines);
                drLines = dtHelpContent.NewRow();
                drLines["Instructions"] = "5.Do not rename the columns";
                dtHelpContent.Rows.Add(drLines);
                drLines = dtHelpContent.NewRow();
                drLines["Instructions"] = "6.Click the “Choose/Browse file” button to get the file";
                dtHelpContent.Rows.Add(drLines);
                drLines = dtHelpContent.NewRow();
                drLines["Instructions"] = "7.Click the upload button to upload the data";
                dtHelpContent.Rows.Add(drLines);
                drLines = dtHelpContent.NewRow();
                drLines["Instructions"] = "8.Please do not modify the Row_No column values";
                dtHelpContent.Rows.Add(drLines);
                drLines = dtHelpContent.NewRow();
                drLines["Instructions"] = "9.Please Enter document_Date in YYYY-MM-DD format";
                dtHelpContent.Rows.Add(drLines);
                drLines = dtHelpContent.NewRow();
                drLines["Instructions"] = "10.Please do not use WRAPTEXT/ALT+ENTER while enter the values. If you use then system will consider this as a special character.";
                dtHelpContent.Rows.Add(drLines);

                Ds = Bl.GetPrimarySalesMasterData("TEMP", Month, Year);
                Ds.Tables.Add(dtHelpContent);
                Ds.Tables[0].TableName = "Primary sales Header";
                //   Ds.Tables[1].TableName = "Primary sales Details";
                Ds.Tables[1].TableName = "Help";
                HttpResponse  response = System.Web.HttpContext.Current.Response;
                DownloadExcel excel    = new DownloadExcel();
                excel.Convert(Ds, "Primary_sales_upload_template" + "_" + DateTime.Now.ToShortDateString(), response);
            }
            finally
            {
                Ds.Dispose();
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Excel Download Active Products from Product Master
        /// </summary>
        public void GetActiveProducts()
        {
            DataControl.BLRegion objBlRegion = new BLRegion();
            string  companyCode = _objCurrentInfo.GetCompanyCode();
            DataSet Ds          = new DataSet();

            Ds = objBlRegion.GetActiveProducts(companyCode);
            Ds.Tables[0].TableName = "Product Details";
            HttpResponse  response = System.Web.HttpContext.Current.Response;
            DownloadExcel excel    = new DownloadExcel();

            excel.Convert(Ds, "Product_Master_Data" + "_" + DateTime.Now.ToShortDateString(), response);
        }
Ejemplo n.º 3
0
        public void DownloadSubList()
        {
            DataControl.BLUser      objUser    = new BLUser();
            DataControl.CurrentInfo objCurInfo = new CurrentInfo();
            string  companyCode = objCurInfo.GetCompanyCode();
            DataSet Ds          = new DataSet();

            Ds = objUser.DownloadSubList(companyCode);
            Ds.Tables[0].TableName = "State Details";
            Ds.Tables[1].TableName = "City Details";
            Ds.Tables.RemoveAt(3);
            Ds.Tables.RemoveAt(2);
            HttpResponse  response = System.Web.HttpContext.Current.Response;
            DownloadExcel excel    = new DownloadExcel();

            excel.Convert(Ds, "State_City" + "_" + DateTime.Now.ToShortDateString(), response);
        }
Ejemplo n.º 4
0
        public void DownloadPrimarySalesMasterExcelTemplate(string ddlValue)
        {
            string Monthname  = ddlValue.Substring(0, ddlValue.IndexOf("-"));
            int    Month      = DateTime.ParseExact(Monthname, "MMM", new CultureInfo("en-US")).Month;
            string Yearnumber = ddlValue.Substring(ddlValue.IndexOf("-") + 1);
            int    Year       = Int32.Parse(Yearnumber);

            Ds = new DataSet();
            Ds = Bl.GetPrimarySalesMasterData("MASTER", Month, Year);
            Ds.Tables[0].TableName = "Region Details";
            Ds.Tables[1].TableName = "Customer Details";
            Ds.Tables[2].TableName = "Product Details";
            Ds.Tables[3].TableName = "Depot Details";
            Ds.Tables[4].TableName = "Document Type Details";
            HttpResponse  response = System.Web.HttpContext.Current.Response;
            DownloadExcel excel    = new DownloadExcel();

            excel.Convert(Ds, "Primary_Sales_Master_Data" + "_" + DateTime.Now.ToShortDateString(), response);
        }
Ejemplo n.º 5
0
        public void DownloadMasterList()
        {
            DataControl.BLUser      objUser    = new BLUser();
            DataControl.CurrentInfo objCurInfo = new CurrentInfo();
            string  companyCode = objCurInfo.GetCompanyCode();
            DataSet Ds          = new DataSet();

            Ds = objUser.DownloadMasterList(companyCode);
            Ds.Tables[0].TableName = "Region Details";
            Ds.Tables[1].TableName = "Region Type Details";
            Ds.Tables[2].TableName = "Region Classification Details";
            Ds.Tables[3].TableName = "Expense Group Details";
            Ds.Tables[4].TableName = "Price Group Details";
            Ds.Tables[5].TableName = "State Details";
            Ds.Tables[6].TableName = "City Details";
            HttpResponse  response = System.Web.HttpContext.Current.Response;
            DownloadExcel excel    = new DownloadExcel();

            excel.Convert(Ds, "Master_List" + "_" + DateTime.Now.ToShortDateString(), response);
        }