当前位置: 首页>>代码示例>>C#>>正文


C# Application.Get方法代码示例

本文整理汇总了C#中Application.Get方法的典型用法代码示例。如果您正苦于以下问题:C# Application.Get方法的具体用法?C# Application.Get怎么用?C# Application.Get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Application的用法示例。


在下文中一共展示了Application.Get方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Apply

        public ActionResult Apply(Guid id = new Guid())
        {
            Guid app_id = (Request.QueryString["app_id"] != null) ? Guid.Parse(Request.QueryString["app_id"]) : Guid.Empty;
            string error = (Request.QueryString["error"] != null) ? Request.QueryString["error"] : "";

            // Get the job record
            DisplayableJob job = JobModel.Get(id);
            List<Crumb> crumbs = job.GenerateCrumbs(app_id, ApplicationStates.BASIC);
            ViewBag.crumbs = crumbs;
            ViewBag.job = job;

            // Attempt to fetch an existing Application
            Application app = new Application();
            app.Get(app_id);
            ViewBag.application = app;
            if (app != null && app.id != Guid.Empty && app.dateSubmitted != null) {
                return RedirectToAction("Review", new { id = app_id });
            }

            // Get the states
            List<State> states = ContentModel.GetStates();
            ViewBag.states = states;

            ViewBag.error = error;

            return View();
        }
开发者ID:janiukjf,项目名称:JobBoard,代码行数:27,代码来源:JobController.cs

示例2: ArchiveApplication

        /// <summary>
        /// Send Application to the Archive
        /// </summary>
        /// <returns></returns>
        public ActionResult ArchiveApplication(Guid id = new Guid())
        {
            Application app = new Application();
            app.Get(id);
            app.Archive();

            return RedirectToAction("Index");
        }
开发者ID:janiukjf,项目名称:JobBoard,代码行数:12,代码来源:ApplicationsController.cs

示例3: DeleteEmployment

 public ActionResult DeleteEmployment(Guid id = new Guid())
 {
     Guid app_id = new Guid();
     Guid emp_id = new Guid();
     try {
         emp_id = (Request.QueryString["emp_id"] != null) ? Guid.Parse(Request.QueryString["emp_id"]) : Guid.Empty;
         app_id = (Request.QueryString["app_id"] != null) ? Guid.Parse(Request.QueryString["app_id"]) : Guid.Empty;
         Application app = new Application();
         app.Get(app_id);
         app.DeleteEmployment(emp_id);
         return Redirect("/Job/Employment/"+id + "?app_id=" + app_id);
     } catch (Exception e) {
         return Redirect("/Job/Employment/"+id + "?app_id=" + app_id + "&error=Error while deleteing: " + e.Message);
     }
 }
开发者ID:janiukjf,项目名称:JobBoard,代码行数:15,代码来源:JobController.cs

示例4: Thanks

        public ActionResult Thanks(Guid id = new Guid())
        {
            Application app = new Application();
            // Get the Application
            app.Get(id);
            Guid job_id = (app.job_id != null) ? Guid.Parse(app.job_id.ToString()) : Guid.Empty;
            DisplayableJob job = JobModel.Get(job_id);
            ViewBag.job = job;

            return View();
        }
开发者ID:janiukjf,项目名称:JobBoard,代码行数:11,代码来源:JobController.cs

示例5: Submit

        public ActionResult Submit(Guid id = new Guid())
        {
            Application app = new Application();
            // Get the Application
            app.Get(id);
            app.Submit();

            return RedirectToAction("Thanks", new { id = id });
        }
开发者ID:janiukjf,项目名称:JobBoard,代码行数:9,代码来源:JobController.cs

示例6: SaveService

        /// <summary>
        /// Save military service and redirect to Review page
        /// </summary>
        /// <param name="id">Application ID</param>
        /// <returns>View</returns>
        public ActionResult SaveService(Guid id = new Guid())
        {
            Application app = new Application();
            try {
                app.Get(id);

                string branch = (Request.Form["service_branch"] != null) ? Request.Form["service_branch"] : "";
                string service_start = (Request.Form["service_start"] != null && Request.Form["service_start"].Length > 0) ? Request.Form["service_start"] : "";
                string service_end = (Request.Form["service_end"] != null && Request.Form["service_end"].Length > 0) ? Request.Form["service_end"] : "";
                string rank_duties = (Request.Form["rank_duties"] != null) ? Request.Form["rank_duties"] : "";
                string additional_info = (Request.Form["additional_info"] != null) ? Request.Form["additional_info"] : "";

                if (branch.Trim().ToLower() == "enter the branch of service") {
                    branch = "";
                }

                app.SetMilitary(branch, service_start, service_end, rank_duties, additional_info);

                Guid job_id = (Guid)app.job_id;
                DisplayableJob job = JobModel.Get(job_id);
                if (job.isDriving == 1) {
                    return Redirect("/Job/Driving/" + app.id);
                } else {
                    return Redirect("/Job/Resume/" + app.id);
                }
            } catch (Exception e) {
                return Redirect("/Job/Education/" + app.job_id + "?app_id=" + id + "&error=Error saving employment: " + e.Message);
            }
        }
开发者ID:janiukjf,项目名称:JobBoard,代码行数:34,代码来源:JobController.cs

示例7: Review

        public ActionResult Review(Guid id = new Guid())
        {
            Application app = new Application();
            // Get the Application
            app.Get(id);
            ViewBag.application = app;
            Guid job_id = (app.job_id != null) ? Guid.Parse(app.job_id.ToString()) : Guid.Empty;

            // Get the job record
            DisplayableJob job = JobModel.Get(job_id);
            List<Crumb> crumbs = job.GenerateCrumbs(id, ApplicationStates.REVIEW);
            ViewBag.crumbs = crumbs;
            ViewBag.job = job;

            // Get the states
            List<State> states = ContentModel.GetStates();
            ViewBag.states = states;

            return View();
        }
开发者ID:janiukjf,项目名称:JobBoard,代码行数:20,代码来源:JobController.cs

示例8: Resume

        public ActionResult Resume(Guid id = new Guid(), string error = "")
        {
            Application app = new Application();
            try {
                // Get the Application
                app.Get(id);
                ViewBag.application = app;
                if (app != null && app.id != Guid.Empty && app.dateSubmitted != null) {
                    return RedirectToAction("Review", new { id = id });
                }
                Guid job_id = (app.job_id != null) ? Guid.Parse(app.job_id.ToString()) : Guid.Empty;

                // Get the job record
                DisplayableJob job = JobModel.Get(job_id);
                List<Crumb> crumbs = job.GenerateCrumbs(id, ApplicationStates.RESUME);
                ViewBag.crumbs = crumbs;
                ViewBag.job = job;

                List<ApplicationFile> files = app.ApplicationFiles.ToList<ApplicationFile>();
                ViewBag.files = files;

                ViewBag.error = (string)TempData["error"] ?? "";

                return View();
            } catch (Exception e) {
                return Redirect("/Job/Education/" + id + "&error=" + e.Message);
            }
        }
开发者ID:janiukjf,项目名称:JobBoard,代码行数:28,代码来源:JobController.cs

示例9: Employment

        public ActionResult Employment(Guid id = new Guid(), string error = "")
        {
            Guid app_id = Guid.Empty;
            try {
                app_id = (Request.QueryString["app_id"] != null)?Guid.Parse(Request.QueryString["app_id"]): Guid.Empty;
                // Get the job record
                DisplayableJob job = JobModel.Get(id);
                List<Crumb> crumbs = job.GenerateCrumbs(app_id, ApplicationStates.EMPLOYMENT);
                ViewBag.crumbs = crumbs;
                ViewBag.job = job;

                // Attempt to fetch an existing application
                Application app = new Application();
                app.Get(app_id);
                //app.GetEmployments();
                ViewBag.application = app;
                if (app != null && app.id != Guid.Empty && app.dateSubmitted != null) {
                    return RedirectToAction("Review", new { id = app_id });
                }

                // Get the states
                List<State> states = ContentModel.GetStates();
                ViewBag.states = states;

                ViewBag.error = error;
                return View();
            } catch {
                return Redirect("/Job/Apply/" + id + "?app_id=" + app_id + "&error=Error processing information.");
                //return RedirectToAction("Apply", new { id = id, error = "Error processing information." });
            }
        }
开发者ID:janiukjf,项目名称:JobBoard,代码行数:31,代码来源:JobController.cs

示例10: Education

        public ActionResult Education(Guid id = new Guid(), string error = "")
        {
            try {
                // Attempt to fetch an existing application
                Application app = new Application();
                app.Get(id);
                ViewBag.application = app;
                if (app != null && app.id != Guid.Empty && app.dateSubmitted != null) {
                    return RedirectToAction("Review", new { id = id });
                }

                // Get the job record
                DisplayableJob job = JobModel.Get((Guid)app.job_id);
                List<Crumb> crumbs = job.GenerateCrumbs(id, ApplicationStates.EDUCATION);
                ViewBag.crumbs = crumbs;
                ViewBag.job = job;

                // Get the states
                List<State> states = ContentModel.GetStates();
                ViewBag.states = states;

                ViewBag.error = error;
                return View();
            } catch (Exception) {
                Application app = new Application();
                app.Get(id);
                return RedirectToAction("Employment", new { id = (Guid)app.job_id, app_id = id, error = "Error processing information." });
            }
        }
开发者ID:janiukjf,项目名称:JobBoard,代码行数:29,代码来源:JobController.cs

示例11: Driving

        public ActionResult Driving(Guid id = new Guid(), string error = "")
        {
            Application app = new Application();
            try {
                // Get the Application
                app.Get(id);
                ViewBag.application = app;
                if (app != null && app.id != Guid.Empty && app.dateSubmitted != null) {
                    return RedirectToAction("Review", new { id = id });
                }
                Guid job_id = (app.job_id != null) ? Guid.Parse(app.job_id.ToString()) : Guid.Empty;

                // Get the job record
                DisplayableJob job = JobModel.Get(job_id);
                List<Crumb> crumbs = job.GenerateCrumbs(id, ApplicationStates.DRIVING);
                ViewBag.crumbs = crumbs;
                ViewBag.job = job;

                // Get the states
                List<State> states = ContentModel.GetStates();
                ViewBag.states = states;

                ViewBag.error = error;

                return View();
            } catch (Exception e) {
                return Redirect("/Job/Education/" + id + "&error=" + e.Message);
            }
        }
开发者ID:janiukjf,项目名称:JobBoard,代码行数:29,代码来源:JobController.cs

示例12: ViewApplication

        /// <summary>
        /// View Application Details
        /// </summary>
        /// <returns></returns>
        public ActionResult ViewApplication(Guid id = new Guid())
        {
            Application app = new Application();
            app.Get(id);

            Job job = JobModel.Get((Guid)app.job_id);
            List<State> states = LocationModel.GetAllStates();

            ViewBag.application = app;
            ViewBag.states = states;
            ViewBag.job = job;

            return View();
        }
开发者ID:janiukjf,项目名称:JobBoard,代码行数:18,代码来源:ApplicationsController.cs


注:本文中的Application.Get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。