public string Post(DeliveryOrderSchemeWiseEntity SchemeWise)
        {
            DataSet             ds = new DataSet();
            ManageSQLConnection manageSQLConnection             = new ManageSQLConnection();
            List <KeyValuePair <string, string> > sqlParameters = new List <KeyValuePair <string, string> >();

            sqlParameters.Add(new KeyValuePair <string, string>("@FromDate", SchemeWise.FromDate));
            sqlParameters.Add(new KeyValuePair <string, string>("@ToDate", SchemeWise.ToDate));
            sqlParameters.Add(new KeyValuePair <string, string>("@GodownCode", SchemeWise.GCode));
            sqlParameters.Add(new KeyValuePair <string, string>("@Schcode", SchemeWise.SchCode));
            sqlParameters.Add(new KeyValuePair <string, string>("@RCode", SchemeWise.RCode));
            ds = manageSQLConnection.GetDataSetValues("GetDeliveryOrdersOtherScheme", sqlParameters);
            ManageDOOthers manageDOSPLPDS = new ManageDOOthers();
            ManageReport   manageReport   = new ManageReport();

            if (manageReport.CheckDataAvailable(ds))
            {
                CommonEntity entity = new CommonEntity
                {
                    dataSet  = ds,
                    GCode    = SchemeWise.GCode,
                    FromDate = SchemeWise.FromDate,
                    Todate   = SchemeWise.ToDate,
                    UserName = SchemeWise.UserName,
                    GName    = SchemeWise.GName,
                    RName    = SchemeWise.RName
                };
                // manageDOAllScheme.GenerateDOAllSchemeReport(entity);
                Task.Run(() => manageDOSPLPDS.GenerateDOOthersScheme(entity)); //Generate the Report
            }
            return(JsonConvert.SerializeObject(ds.Tables[0]));
        }
        public string Post(DeliveryOrderSchemeWiseEntity marginAmount)
        {
            DataSet             ds = new DataSet();
            ManageSQLConnection manageSQLConnection             = new ManageSQLConnection();
            List <KeyValuePair <string, string> > sqlParameters = new List <KeyValuePair <string, string> >();

            sqlParameters.Add(new KeyValuePair <string, string>("@FromDate", marginAmount.FromDate));
            sqlParameters.Add(new KeyValuePair <string, string>("@ToDate", marginAmount.ToDate));
            sqlParameters.Add(new KeyValuePair <string, string>("@GodownCode", marginAmount.GCode));
            sqlParameters.Add(new KeyValuePair <string, string>("@RCode", marginAmount.RCode));
            ds = manageSQLConnection.GetDataSetValues("GetDeliveryOrderMarginAmount", sqlParameters);
            ManageDOMargin manageDOMargin = new ManageDOMargin();
            ManageReport   manageReport   = new ManageReport();

            if (manageReport.CheckDataAvailable(ds))
            {
                CommonEntity entity = new CommonEntity
                {
                    dataSet  = ds,
                    GCode    = marginAmount.GCode,
                    FromDate = marginAmount.FromDate,
                    Todate   = marginAmount.ToDate,
                    UserName = marginAmount.UserName,
                    GName    = marginAmount.GName,
                    RName    = marginAmount.RName
                };
                // commodityIssueMemo.GenerateCommodityIssueMemoReport(entity);
                Task.Run(() => manageDOMargin.GenerateDOMarginReport(entity)); //Generate the Report
            }
            return(JsonConvert.SerializeObject(ds.Tables[0]));
        }