public IActionResult Index() { BasicSlittingDetailModel model = new BasicSlittingDetailModel { SlittingDate = DateTime.Now }; ViewBag.CoreList = SelectionList.CoreList().Select(x => new { x.CoreId, Name = x.Name + " " + x.Thickness, x.Weight }); ViewBag.OrderList = SelectionList.OrderList().Select(x => new { x.OrderId, x.OrderNo }); ViewBag.TreatmentList = SelectionList.SlittingTreatmentList().Select(x => new { x.TreatmentId, x.Name }); ViewBag.QualityList = SelectionList.SlittingStatusList().Select(x => new { x.SlittingStatusId, x.Name }); ViewBag.JumboList = SelectionList.JumboList().Select(x => new { x.JumboId, x.JumboNo }); return(View(model)); }
public IActionResult Create(string type) { BasicSlittingDetailModel model = new BasicSlittingDetailModel { IsPrimarySlitting = type == "P", SlittingDate = DateTime.Now }; ViewBag.CoreList = SelectionList.CoreList().Select(x => new { x.CoreId, Name = x.Name + " " + x.Thickness, x.Weight }); ViewBag.OrderList = SelectionList.OrderList().Select(x => new { x.OrderId, x.OrderNo }); ViewBag.TreatmentList = SelectionList.SlittingTreatmentList().Select(x => new { x.TreatmentId, x.Name }); ViewBag.QualityList = SelectionList.SlittingStatusList().Select(x => new { x.SlittingStatusId, x.Name }); if (type == "P") { return(View("NewCreateSlitting", model)); } else { return(View("CreateSecondarySlitting", model)); } }