public ActionResult ApplyForJob(string CompanyName)
        {
            List<string> streams = new List<string>();
            streams = new DataAccess.ApplicantDAL().Stream(CompanyName);

            return Json(streams);
        }
 public ActionResult AddJobToDb(String CompanyName, String stream, String SelectedCheck, String CorrespondAddr)
 {
     int userid = (int)Session["UserID"];
     //userid = 1002;
     string name=(string)Session["Name"];
     string jobid = SelectedCheck;
     DateTime AppDate = DateTime.Now;
     int appid = new DataAccess.ApplicantDAL().Addjob(userid, jobid, AppDate, CorrespondAddr,name);
     return RedirectToAction("ApplyForJob");
 }
 public ActionResult ApplyForJob1(string stream, string company)
 {
     string username = (string)Session["Username"];
     //Session["UserID"] = 1002;
     int Userid = (int)Session["UserID"];
     List<Job> jobdetails = new List<Job>();
     //username = "******";
     jobdetails = new DataAccess.ApplicantDAL().JobDescription(stream, company, username, Userid);
     return Json(jobdetails);
 }
 //***************************************************************************************************************************************
 //--------------------------APPLICANT TO SEARCH AND APPLY FOR JOB----------------------------------------------------------------------
 //***************************************************************************************************************************************
 public ActionResult ApplyForJob()
 {
     List<string> CompanyNames = new List<string>();
     CompanyNames = new DataAccess.ApplicantDAL().GetCompanyNames();
     if (CompanyNames.Count > 0)
     {
         ViewBag.list = CompanyNames;
         return View();
     }
     else
     {
         return View("Index");
     }
 }
        public ActionResult AddWorkshopToDb(int WorkshopID, string Location)
        {
            int userid=(int)Session["UserID"];
            bool value = new DataAccess.ApplicantDAL().AddWorkshopApplicant(WorkshopID,Location,userid);
            if (value == true)
            {

            }
            else
            {

            }
            return RedirectToAction("Index","Applicant");
        }
 public ActionResult AddJobToDb(String CompanyName, String stream, String SelectedCheck, String CorrespondAddr)
 {
     string type = (string)Session["TypeOfUser"];
     if (type == null)
     {
         return RedirectToAction("Index", "Home");
     }
     else if (type.CompareTo("Applicant") != 0)
     {
         return RedirectToAction("Index", "Home");
     }
     int userid = (int)Session["UserID"];
     //userid = 1002;
     string name=(string)Session["Name"];
     string jobid = SelectedCheck;
     DateTime AppDate = DateTime.Now;
     int appid = new DataAccess.ApplicantDAL().Addjob(userid, jobid, AppDate, CorrespondAddr,name);
     return RedirectToAction("ApplyForJob");
 }
        //***************************************************************************************************************************************
        //--------------------------APPLICANT TO SEARCH AND APPLY FOR JOB----------------------------------------------------------------------
        //***************************************************************************************************************************************
        public ActionResult ApplyForJob()
        {
            string type = (string)Session["TypeOfUser"];
            if (type == null)
            {
                return RedirectToAction("Index", "Home");
            }
            else if (type.CompareTo("Applicant") != 0)
            {
                return RedirectToAction("Index", "Home");
            }
            List<string> CompanyNames = new List<string>();

            CompanyNames = new DataAccess.ApplicantDAL().GetCompanyNames();
            if (CompanyNames.Count > 0)
            {
                ViewBag.list = CompanyNames;
                return View();
            }
            else
            {
                return View("Index");
            }
        }
 public ActionResult AddTrainingToDb(int userid,string trainingid,string corraddr,string corrcont)
 {
     string name = (string)Session["Name"];
     int ret = new DataAccess.ApplicantDAL().AddTraining(userid, trainingid, corraddr, corrcont,name);
     return Json(ret);
 }
        public ActionResult WorkshopTable(string domain,string companyname)
        {
            int userid=(int)Session["UserID"];

            List<WorkshopTable> table = new List<WorkshopTable>();
            table = new DataAccess.ApplicantDAL().GetTableWorkshop(domain,companyname,userid);

            return PartialView("~/Views/Applicant/WorkshopTable.cshtml",table);
        }
        public ActionResult WorkshopGetDomain(string CompanyName)
        {
            List<string> domains = new List<string>();
            domains = new DataAccess.ApplicantDAL().GetDomainWorkshop(CompanyName);

            return Json(domains);
        }
 //***************************************************************************************************************************************
 //---------------------------Search and apply for training-----------------------------------------------------------------------------
 //***************************************************************************************************************************************
 //---------------------------Search for training-----------------------------------------------------------------------------
 //***************************************************************************************************************************************
 public ActionResult SearchForTraining()
 {
     string type = (string)Session["TypeOfUser"];
     if (type == null)
     {
         return RedirectToAction("Index", "Home");
     }
     else if (type.CompareTo("Applicant") != 0)
     {
         return RedirectToAction("Index", "Home");
     }
     //Get Domain Names
     //Session["UserID"] = 1002;
     List<string> DomainNames = new DataAccess.ApplicantDAL().GetDomainNames();
     ViewBag.List = DomainNames;
     return View();
 }
 public ActionResult GetTrainingTable(string Domain, string Location)
 {
     int UserID=(int)Session["UserID"];
     List<TrainingTableData> data = new List<TrainingTableData>();
     data = new DataAccess.ApplicantDAL().GetTableData(Domain,Location,UserID);
     return Json(data);
 }
 public ActionResult GetDetailsTable(string TrainingID, string Company)
 {
     TrainingDetailsTable DetailList = new TrainingDetailsTable();
     DetailList = new DataAccess.ApplicantDAL().GetDetailsData(TrainingID,Company);
     return Json(DetailList);
 }
 public ActionResult ApplyForTraining(string TrainingID)
 {
     string type = (string)Session["TypeOfUser"];
     if (type == null)
     {
         return RedirectToAction("Index", "Home");
     }
     else if (type.CompareTo("Applicant") != 0)
     {
         return RedirectToAction("Index", "Home");
     }
     String Username = (string)Session["Username"];
     //Username = "******";
     ApplyForTraining app1 = new ApplyForTraining();
     app1 = new DataAccess.ApplicantDAL().ApplyDetails(Username,TrainingID);
     ViewBag.ApplyJob = app1;
     return View();
 }
 public ActionResult ApplyForTraining(string TrainingID)
 {
     String Username = (string)Session["Username"];
     //Username = "******";
     ApplyForTraining app1 = new ApplyForTraining();
     app1 = new DataAccess.ApplicantDAL().ApplyDetails(Username,TrainingID);
     ViewBag.ApplyJob = app1;
     return View();
 }
        public ActionResult GetLocationNames(string domain)
        {
            List<string> LocationNames = new DataAccess.ApplicantDAL().GetLocation(domain);

            return Json(LocationNames);
        }
 //***************************************************************************************************************************************
 //---------------------------Search and apply for training-----------------------------------------------------------------------------
 //***************************************************************************************************************************************
 //---------------------------Search for training-----------------------------------------------------------------------------
 //***************************************************************************************************************************************
 public ActionResult SearchForTraining()
 {
     //Get Domain Names
     //Session["UserID"] = 1002;
     List<string> DomainNames = new DataAccess.ApplicantDAL().GetDomainNames();
     ViewBag.List = DomainNames;
     return View();
 }