Esempio n. 1
0
        public ActionResult Edit(FormCollection frm)
        {
            var         ses      = sesrepo.GetSessionById((User as CustomPrincipal).UserId);
            int         orgid    = ses.OrganizationId;
            FA_Location location = db.GetLocationById(Convert.ToInt32(frm["LocationId"]));

            location.LocationName    = frm["LocationName"];
            location.LocationCode    = frm["LocationCode"];
            location.OrganizationId  = orgid;// Convert.ToInt32(frm["OrganizationId"]);
            location.LastUpdatedBy   = (User as CustomPrincipal).UserId;
            location.LastUpdatedDate = DateTime.Now;
            if (ModelState.IsValid)
            {
                db.UpdateLocation(location);
                return(RedirectToAction("Index"));
            }
            return(View(location));
        }