Ejemplo n.º 1
0
        public ActionResult Create(Consultancy.Project.Models.Consultancy consultancy)
        {
            if (ModelState.IsValid)
            {
                consultancy.AddedDate    = DateTime.Now;
                consultancy.ModifiedDate = null;
                consultancy.DeleteFlag   = false;
                consultancy.DeletedDate  = DateTime.Now;

                _dbContext.Consultancies.Add(consultancy);
                _dbContext.SaveChanges();
                return(RedirectToAction("Index"));
            }
            ModelState.AddModelError("", "Problem in Creating Consultancy Info");
            return(View(consultancy));
        }
Ejemplo n.º 2
0
        public ActionResult Create(Consultancy.Project.Models.Consultancy consultancy)
        {
            if(ModelState.IsValid)
            {
                consultancy.AddedDate = DateTime.Now;
                consultancy.ModifiedDate = null;
                consultancy.DeleteFlag = false;
                consultancy.DeletedDate = DateTime.Now;

                _dbContext.Consultancies.Add(consultancy);
                _dbContext.SaveChanges();
                return RedirectToAction("Index");
            }
            ModelState.AddModelError("", "Problem in Creating Consultancy Info");
            return View(consultancy);
        }