public ActionResult Add(Application app, string saveasnew)
        {
            MyLogger.GetInstance().Info("Updating Application");

            List <Application> applist = null;

            if (ModelState.IsValid)
            {
                DbManagerFactory dbm = new DbManagerFactory(ProjectBaseClass.dbType());

                IProject ip = dbm.GetDbManager();

                ActionResponse ar = new ActionResponse();

                ar = ip.UpdateApplication(app, saveasnew);

                if (!ar.IsSuccess)
                {
                    //return RedirectToAction("ErrorView", "Project", new { message = ar.ErrorMsg });
                }

                applist = ar.obj;
            }

            return(PartialView("~/Views/Application/ShowApps.cshtml", applist));
            //  return Json(app, JsonRequestBehavior.AllowGet);
        }
        // GET: Application

        public ActionResult Index()
        {
            DbManagerFactory dbm = new DbManagerFactory(ProjectBaseClass.dbType());

            IProject ip = dbm.GetDbManager();

            List <Application> applist;

            applist = ip.GetApplications();

            return(View(applist));
        }
예제 #3
0
        public ActionResult Add()
        {
            MyLogger.GetInstance().Info("Creating Project");

            DbManagerFactory dbm = new DbManagerFactory(ProjectBaseClass.dbType());

            IProject Dbm = dbm.GetDbManager();

            WrapperViewNewProject nvp = Dbm.GetViewForNewProject();


            if (nvp == null)
            {
                msg = "Error - getting views for new project";

                MyLogger.GetInstance().Error(msg);

                return(RedirectToAction("ErrorView", "Project", new { message = msg }));
            }

            return(View(nvp));
        }