public void populate() { this.Retrieved = false; WebRecruiterController webCtrl = new WebRecruiterController(); string OUTPUTRESPONSE; //Int32 x_user_id; //Int32 x_job_id; // Int32 x_user_type; string x_outputMsg; int records = 7; string x_Data; //bool userTypeWasParsed; //try //{ // userTypeWasParsed = Int32.TryParse(jUser.Type, out UserType); //} //catch (Exception ex) //{ // x_outputMsg = "Problem parsing userTYPE(INT); " + ex.Message.ToString(); //} OUTPUTRESPONSE = webCtrl.webJobApplyGet(jJob.ID, records, out x_Data, out x_outputMsg); if (OUTPUTRESPONSE.Contains("ok")) { // HttpContext.Current.Session["x_job_id"] = x_job_id; //HttpContext.Current.Session["x_cust_id"] = x_cust_id; //HttpContext.Current.Session["x_user_type"] = x_user_type; HttpContext.Current.Session["x_output_msg"] = x_outputMsg; this.Retrieved = true; } // jJobPosted jJobPostComplete = new jJobPosted(); //jUserAuthed.CustID = x_cust_id.ToString(); //jJobPostComplete.ID = x_job_id.ToString(); //jJobPostComplete.UserType = x_user_type.ToString(); // jJobPostComplete.OutputMsg = x_outputMsg; jJob.Data = x_Data; }
public void register() { this.Registered = false; WebRecruiterController webCtrl = new WebRecruiterController(); string OUTPUTRESPONSE; Int32 x_user_id; Int32 x_cust_id; Int32 x_user_type; String x_outputMsg; // Int32 UserType; //bool userTypeWasParsed; //try //{ // userTypeWasParsed = Int32.TryParse(jUser.Type, out UserType); //} //catch (Exception ex) //{ // x_outputMsg = "Problem parsing userTYPE(INT); " + ex.Message.ToString(); //} OUTPUTRESPONSE = webCtrl.webRegister(jUser.Username, jUser.Email, jUser.Password, jUser.Type, out x_user_id, out x_cust_id, out x_user_type, out x_outputMsg); if (OUTPUTRESPONSE.Contains("ok")) { HttpContext.Current.Session["x_user_id"] = x_user_id; //HttpContext.Current.Session["x_cust_id"] = x_cust_id; HttpContext.Current.Session["x_user_type"] = x_user_type; HttpContext.Current.Session["x_output_msg"] = x_outputMsg; this.Registered = true; } jUserRegistered jUserReged = new jUserRegistered(); //jUserAuthed.CustID = x_cust_id.ToString(); jUserReged.ID = x_user_id.ToString(); jUserReged.UserType = x_user_type.ToString(); jUserReged.OutputMsg = x_outputMsg; jUser.Data = JsonConvert.SerializeObject(jUserReged); }
public void postjob() { this.Posted = false; WebRecruiterController webCtrl = new WebRecruiterController(); string OUTPUTRESPONSE; // Int32 x_user_id; Int32 x_job_id; // Int32 x_user_type; String x_outputMsg; // Int32 UserType; //bool userTypeWasParsed; //try //{ // userTypeWasParsed = Int32.TryParse(jUser.Type, out UserType); //} //catch (Exception ex) //{ // x_outputMsg = "Problem parsing userTYPE(INT); " + ex.Message.ToString(); //} OUTPUTRESPONSE = webCtrl.webJobPost(jJob.PosterID, jJob.Employer, jJob.Title, jJob.Description, out x_job_id, out x_outputMsg); if (OUTPUTRESPONSE.Contains("ok")) { HttpContext.Current.Session["x_job_id"] = x_job_id; //HttpContext.Current.Session["x_cust_id"] = x_cust_id; //HttpContext.Current.Session["x_user_type"] = x_user_type; HttpContext.Current.Session["x_output_msg"] = x_outputMsg; this.Posted = true; } jJobPosted jJobPostComplete = new jJobPosted(); //jUserAuthed.CustID = x_cust_id.ToString(); jJobPostComplete.ID = x_job_id.ToString(); //jJobPostComplete.UserType = x_user_type.ToString(); jJobPostComplete.OutputMsg = x_outputMsg; jJob.Data = JsonConvert.SerializeObject(jJobPostComplete); }
public void validate() { this.Authencated = false; WebRecruiterController webCtrl = new WebRecruiterController(); string OUTPUTRESPONSE; Int32 x_user_id; Int32 x_cust_id; Int32 x_user_type; String x_outputMsg; OUTPUTRESPONSE = webCtrl.webLogon(jUser.Username, jUser.Password, out x_user_id, out x_cust_id, out x_user_type, out x_outputMsg); if (OUTPUTRESPONSE.Contains("ok")) { HttpContext.Current.Session["x_user_id"] = x_user_id; HttpContext.Current.Session["x_cust_id"] = x_cust_id; HttpContext.Current.Session["x_user_type"] = x_user_type; HttpContext.Current.Session["x_output_msg"] = x_outputMsg; this.Authencated = true; } jUserAuthenticated jUserAuthed = new jUserAuthenticated(); jUserAuthed.CustID = x_cust_id.ToString(); jUserAuthed.ID = x_user_id.ToString(); jUserAuthed.UserType = x_user_type.ToString(); jUserAuthed.OutputMsg = x_outputMsg; jUser.Data = JsonConvert.SerializeObject(jUserAuthed); }