public void ProcessC(int id, ProductionProcessC productionProcessC, int concernId)
 {
     productionProcessC.OrderId      = id;
     productionProcessC.CreationDate = DateTime.Now;
     productionProcessC.ConcernId    = concernId;
     _context.CProductions.Add(productionProcessC);
     _context.SaveChanges();
 }
        public ActionResult ProcessC(int id, ProductionProcessC productionProcess)
        {
            var concernId = Convert.ToInt32(Session["ConcernId"]);
            var userId    = Convert.ToInt32(Session["UserId"]);

            if (concernId > 0 && userId > 0)
            {
                _production.ProcessC(id, productionProcess, concernId);
                return(RedirectToAction(nameof(ProductionProces)));
            }
            return(RedirectToAction("LogIn", "GlobalData", new { Area = "Global" }));
        }
        public void UpdateProcessC(int id, ProductionProcessC productionProcessC, int concernId)
        {
            var update = _context.CProductions.FirstOrDefault(m => m.OrderId == id);

            update.GradeA           = productionProcessC.GradeA;
            update.GradeB           = productionProcessC.GradeB;
            update.GradeC           = productionProcessC.GradeC;
            update.GradeD           = productionProcessC.GradeD;
            update.IsFinal          = productionProcessC.IsFinal;
            update.OpeninBalance    = productionProcessC.OpeninBalance;
            update.ReceivFromB      = productionProcessC.ReceivFromB;
            update.Refected         = productionProcessC.Refected;
            update.SenDFinal        = productionProcessC.SenDFinal;
            update.ThirdPartyStatus = productionProcessC.ThirdPartyStatus;
            _context.SaveChanges();
        }