예제 #1
0
        public ActionResult ShowJobNotification(int jid)
        {
            try
            {

                int FreelancerId = (int)Session["UidInProfile"];

                ViewBag.CheckConfirm = false;
                var JobDetail = jobRepo.GetUsers().FirstOrDefault(u => u.JobId == jid);
               try
                {
                    var GetCheckConfirm = projRepo.GetUsers().FirstOrDefault(c => c.FreelancerId.Equals(FreelancerId) && c.JobId.Equals(jid));
                    System.Diagnostics.Debug.Write(" I am yours0" + GetCheckConfirm.CheckConfirm);
                    if (GetCheckConfirm.CheckConfirm)
                    {
                        ViewBag.CheckConfirm = GetCheckConfirm.CheckConfirm;
                    }

                }
                catch {
                    System.Diagnostics.Debug.Write("I am yours");
                }

                if (!JobDetail.Status)
                {
                    System.Diagnostics.Debug.Write("DRAGON" + jid);
                    ViewBag.AvailableJob = "Not Now";
                }

                var JobModel = new MyApplication.Job()
                {

                    Title = JobDetail.Title,
                    Android = JobDetail.Android,
                    ASP_NET = JobDetail.ASP_NET,

                    InitialBudget = JobDetail.InitialBudget,
                    finalBudget = JobDetail.finalBudget,

                    C = JobDetail.C,
                    Category = JobDetail.Category,
                    Cplus = JobDetail.Cplus,
                    Csharp = JobDetail.Csharp,
                    Css = JobDetail.Css,
                    Description = JobDetail.Description,
                    Html = JobDetail.Html,
                    Java = JobDetail.Java,
                    Javascript = JobDetail.Javascript,
                    Objective_C = JobDetail.Objective_C,
                    PHP = JobDetail.PHP,
                    Python = JobDetail.Python,
                    Ruby = JobDetail.Ruby,
                    SQL = JobDetail.SQL,
                    XML = JobDetail.XML,
                    Other = JobDetail.Other,
                    Date = JobDetail.Date,

                };

               /* try
                {

                    if (Session["UserType"].Equals("Freelancer          "))
                    {
                        ViewBag.UserType = "Freelancer          ";
                    }
                    else
                    {

                    }
                }
                catch
                {

                }*/
                Session["JobId"] = jid;
                return View("ShowJobNotification", JobModel);
            }
            catch
            {
                // return RedirectToAction("Index", "Home");
                return View();
            }
        }
예제 #2
0
        public ActionResult ShowDetailCategoryJob(int jid)
        {
            try
                    {
                        System.Diagnostics.Debug.Write("This is spartan " + Session["UserType"]);

                        var JobDetail = jobRepo.GetUsers().FirstOrDefault(u=>u.JobId == jid);

                        if (!JobDetail.Status)
                        {
                               System.Diagnostics.Debug.Write("DRAGON" + jid);
                               ViewBag.AvailableJob = "Not Now";
                        }

                        var JobModel = new MyApplication.Job(){

                                    Title  = JobDetail.Title,
                                    Android = JobDetail.Android,
                                    ASP_NET = JobDetail.ASP_NET,

                                    InitialBudget = JobDetail.InitialBudget,
                                    finalBudget = JobDetail.finalBudget,

                                    C = JobDetail.C,
                                    Category = JobDetail.Category,
                                    Cplus = JobDetail.Cplus,
                                    Csharp= JobDetail.Csharp,
                                      Css = JobDetail.Css,
                                        Description= JobDetail.Description,
                                          Html= JobDetail.Html,
                                            Java= JobDetail.Java,
                                              Javascript= JobDetail.Javascript,
                                                Objective_C= JobDetail.Objective_C,
                                                PHP= JobDetail.PHP,
                                                Python= JobDetail.Python,
                                                Ruby= JobDetail.Ruby,
                                                SQL= JobDetail.SQL,
                                                XML= JobDetail.XML,
                                                Other=JobDetail.Other,
                                    Date = JobDetail.Date,

                        };
                        try
                        {

                            System.Diagnostics.Debug.Write("xxx40" + jid);
                            if (Session["UserType"].Equals("Freelancer          "))
                            {

                                ViewBag.UserType = "Freelancer          ";
                            }
                            else
                            {
                                System.Diagnostics.Debug.Write("xxx41" + jid);
                            }
                        }
                        catch {
                            System.Diagnostics.Debug.Write("xxx42" + jid);
                        }
                        Session["JobId"] = jid;
                        return View("ShowDetailCategoryJob",JobModel);
                    }
                    catch
                    {
                       // return RedirectToAction("Index", "Home");
                        return View();
                    }
        }