public ActionResult Edit([Bind(Include = "ParameterID,ParameterName,ParameterOrder,Mainformula")] tblParameter tblparameter)
        {
            int c_id = Convert.ToInt32(Session["CompanyID"]);

            if (ModelState.IsValid)
            {
                tblparameter.CompanyID       = c_id;
                db.Entry(tblparameter).State = EntityState.Modified;
                db.SaveChanges();
                DisplaySuccessMessage("Has update a tblParameter record");
                return(RedirectToAction("Index"));
            }
            DisplayErrorMessage();
            return(View(tblparameter));
        }
Example #2
0
        public ActionResult Edit([Bind(Include = "ResourceID,MobileNumber,ResourceLocation,TemplateID,tblEnergies,tblTemplate,CooridatesGoogle")] tblResource tblresource)
        {
            int c_id = Convert.ToInt32(Session["CompanyID"]);

            if (ModelState.IsValid)
            {
                tblresource.CompanyID       = c_id;
                db.Entry(tblresource).State = EntityState.Modified;
                db.SaveChanges();
                DisplaySuccessMessage("Has update a tblResource record");
                return(RedirectToAction("Index"));
            }
            ViewBag.TemplateID = new SelectList(db.tblTemplates, "TemplateID", "TemplateName", tblresource.TemplateID);
            DisplayErrorMessage();
            return(View(tblresource));
        }