Example #1
0
        public List <EstimatedDyedMain_Result> GetEstimatedDyeingList(string brand, int brandSection, string season, DateTime?fromDate, DateTime?toDate, out List <DyeingColorQuantitiesRequired_Result> ColorsValues, out int BatchNo)
        {
            using (var entities = new WorkFlowManagerDBEntities())
            {
                var getDyeingList = (from s in entities.EstimatedDyedMain(brand, brandSection, season, fromDate, toDate)
                                     orderby s.SalesOrderID
                                     select s).ToList();

                ColorsValues = (from s in entities.DyeingColorQuantitiesRequired(brand, brandSection, season, fromDate, toDate)
                                select s).ToList();
                try
                {
                    BatchNo = (from b in entities.TblDyeingPlanDetails
                               select b.BatchNoCreated).Max();
                }
                catch (Exception)
                {
                    BatchNo = 0;
                }
                return(getDyeingList);
            }
        }