Ejemplo n.º 1
0
        public ActionResult UpdateMixingDesign(AddMixDesign mix)
        {
            try
            {
                // TODO: Add insert logic here
                int             uId           = Convert.ToInt32(Session["UserId"].ToString());
                ObjectParameter statusCode    = new ObjectParameter("StatusCode", typeof(int));
                ObjectParameter statusMessage = new ObjectParameter("StatusMessage", typeof(string));

                db.AddUpdateConcMixDesing(mix.Id, mix.FactoryId, mix.ConcreteRank, mix.CementWeight, mix.WaterWeight, mix.WashedSand,
                                          mix.Rubble3by4, mix.Rubble3by8, mix.WhiteSand, mix.Cement, mix.Water, mix.WashedSand2,
                                          mix.Rubble3by42, mix.Rubble3by82, mix.WhiteSand2, mix.C28Day, mix.Landing, mix.Status, null, mix.Comments,
                                          mix.CreatedBy, mix.CreatedDate, uId, null, statusCode, statusMessage);

                if (mix.Status == "Waiting")
                {
                    TempData["AlertMessage"] = "Waiting";
                }

                return(RedirectToAction("ApproveMixingDesign", "MixingDesign", new
                {
                    id = 1
                }));
            }
            catch
            {
                return(View());
            }
        }
Ejemplo n.º 2
0
        public ActionResult AddMixingDesign(AddMixDesign mix)
        {
            try
            {
                // TODO: Add insert logic here

                ObjectParameter statusCode    = new ObjectParameter("StatusCode", typeof(int));
                ObjectParameter statusMessage = new ObjectParameter("StatusMessage", typeof(string));

                db.AddUpdateConcMixDesing(0, mix.FactoryId, mix.ConcreteRank, mix.CementWeight, mix.WaterWeight, mix.WashedSand,
                                          mix.Rubble3by4, mix.Rubble3by8, mix.WhiteSand, "Pending", null, mix.Comments,
                                          null, null, null, null, statusCode, statusMessage);


                return(View("MixingDesign"));
            }
            catch
            {
                return(View());
            }
        }