Beispiel #1
0
        public ActionResult Create(FormCollection formCollection)
        {
            //  try
            //  {
            FloorBusiness floorBusiness = new FloorBusiness(new FloorDataAccess());
            Floor         floor         = new Floor
            {
                FloorId          = Convert.ToInt32(formCollection["FloorId"]),
                FloorName        = Convert.ToString(formCollection["FloorName"]),
                CreatedByUserId  = 1, // (int)Session["FloorId"];
                ModifiedByUserId = 2, // (int)Session["FloorId"];
                CreatedDate      = DateTime.Now,
                ModifiedDate     = DateTime.Now,
            };

            floorBusiness.Create(floor);
            return(RedirectToAction("Index"));
            //}
            //catch
            //{
            //    return View();
            //}
        }