protected void Button1_Click(object sender, EventArgs e) { if (txtname.Text.Length == 0 && txtconfirmpassword.Text.Length == 0) { Returnclass rc = new Returnclass(); string dbpassword = rc.scalarReturn("select login_password from login_user where login_email='" + txtemail.Text + "'"); if (dbpassword == txtpassword.Text) { } else { Label1.Text = "Email ID doesnot Exist!"; } } else { Seeker s = new Seeker(); s.email = txtemail.Text; s.passwrod = txtpassword.Text; s.name = txtname.Text; insert_seeker ins = new insert_seeker(); Session["id"] = ins.loginmethod(s); Response.Redirect("~/Views/seeker/seekerpersonal.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { Session["c_img_id"] = 5014; for (int i = 0; i < months.Length; i++) { DropDownList1.Items.Add(months[i].ToString()); DropDownList3.Items.Add(months[i].ToString()); } //for YEARS IN COMBOBOX.... for (int i = 1990; i < DateTime.Now.Year; i++) { DropDownList2.Items.Add(i.ToString()); DropDownList4.Items.Add(i.ToString()); } string [] educationlist = new string[4]; Returnclass rc = new Returnclass(); educationlist[0] = rc.scalarReturn("select ssc_degree from scc_record where ssc_fk_id=" + Session["c_img_id"]); educationlist[1] = rc.scalarReturn("select hsc_degree from hsc_record where hsc_fk_id =" + Session["c_img_id"]); educationlist[2] = rc.scalarReturn("select grad_degree from grad_record where grad_fk_id=" + Session["c_img_id"]); educationlist[3] = rc.scalarReturn("select masters_degree from masters_record where masters_fk_id=" + Session["c_img_id"]); for (int i = 0; i < educationlist.Length; i++) { DropDownList5.Items.Add(educationlist[i]); } }//load event end...................................
protected void Button2_Click(object sender, EventArgs e) { Returnclass rc = new Returnclass(); string id = rc.scalarReturn("select job_id from job_title_tbl where job_title='" + Label1.Text + "'"); DELETECLASS dc = new DELETECLASS(); id = dc.DELETEMETHOD(id, Label1.Text, "deletejob", "@job_id", "@job_title"); Response.Write(id); }//load
protected void Page_Load(object sender, EventArgs e) { Returnclass re = new Returnclass(); string s = re.scalarReturn("select max(id) from tblImages_login_info where inimage_login_id_fk=" + Session["c_img_id"].ToString()); if (s != "") { Image1.Visible = false; Image2.Visible = true; Returnclass ob = new Returnclass(); ViewState["imageid"] = ob.scalarReturn("select max(id) from tblImages_login_info where inimage_login_id_fk=" + Session["c_img_id"]); string cs = ConfigurationManager.ConnectionStrings["jobportaldb"].ConnectionString; using (SqlConnection con = new SqlConnection(cs)) { SqlCommand cmd = new SqlCommand("spGetImageById", con); cmd.CommandType = CommandType.StoredProcedure; SqlParameter paramId = new SqlParameter() { ParameterName = "@Id", Value = ViewState["imageid"].ToString() }; cmd.Parameters.Add(paramId); SqlParameter paramif_fk = new SqlParameter() { ParameterName = "@inimage_login_id_fk", Value = Session["c_img_id"].ToString() }; cmd.Parameters.Add(paramif_fk); con.Open(); byte[] bytes = (byte[])cmd.ExecuteScalar(); string strBase64 = Convert.ToBase64String(bytes); Image2.ImageUrl = "data:Image/png;base64," + strBase64; } } //if end here ........................... else { Image2.Visible = false; Image1.Visible = true; } }
protected void Button1_Click(object sender, EventArgs e) { Label1.Text = " "; SqlConnection conn = new SqlConnection(connstring); try { conn.Open(); SqlCommand cmd = new SqlCommand(); cmd.Connection = conn; cmd.CommandText = "select login_password from login_information where login_email='" + TextBox1.Text + "'"; SqlDataReader dr; dr = cmd.ExecuteReader(); if (dr.Read()) { string pasword_var = dr["login_password"].ToString(); if (pasword_var == txtpassword.Text) { string q; Returnclass ob = new Returnclass(); q = ob.scalarReturn("SELECT personal_NAME FROM personal_info_login_information P INNER JOIN login_information L ON P.inpersonalinfo_login_id_fk=L.login_id WHERE L.login_email='" + TextBox1.Text + "'"); // Page.Session.Add("userid",dr["s_userid_int"]); Page.Session.Add("userid", TextBox1.Text); Page.Session.Add("username", q); Page.Session.Timeout = 20; Session["c_img_id"] = ob.scalarReturn("select login_id from login_information where login_email='" + Session["userid"] + "'"); Session["functtionalarea"] = ob.scalarReturn("select professional_functionalarea from professional_info_login_information where inprofessional_login_id_fk=" + Session["c_img_id"]); Session["jobsort"] = ob.scalarReturn("select professional_want_job_sort from professional_info_login_information where inprofessional_login_id_fk=" + Session["c_img_id"]); Response.Redirect("~/Index.aspx?id=success"); } else { Label1.Text = "Invalid id or password!"; //Response.Write("wrong method......"); } } } catch (Exception) { // lblmsg.ForeColor = System.Drawing.Color.Red; Label1.Text = "Invalid id or password!"; // Response.Write("wrong method......"); // lblmsg.Text = "Invalid Id or Password!"; } }
protected void Page_Load(object sender, EventArgs e) { Session["fk_login_id"] = 2010; //dummy value Returnclass re = new Returnclass(); Session["fk_comp_id"] = re.scalarReturn("select company_id from company_name_tbl where company_login_id_fk=" + Session["fk_login_id"]); string s = re.scalarReturn("select max(id) from tblImages_job_posterlogin_info where inimage_login_id_fk=" + Session["fk_comp_id"].ToString()); if (s != "") { Image1.Visible = false; Image2.Visible = true; Returnclass ob = new Returnclass(); ViewState["imageid"] = ob.scalarReturn("select max(id) from tblImages_job_posterlogin_info where inimage_login_id_fk=" + Session["fk_comp_id"]); string cs = ConfigurationManager.ConnectionStrings["jobportaldb"].ConnectionString; using (SqlConnection con = new SqlConnection(cs)) { SqlCommand cmd = new SqlCommand("sp_posterGetImageById", con); cmd.CommandType = CommandType.StoredProcedure; SqlParameter paramId = new SqlParameter() { ParameterName = "@Id", Value = ViewState["imageid"].ToString() }; cmd.Parameters.Add(paramId); SqlParameter paramif_fk = new SqlParameter() { ParameterName = "@inimage_login_id_fk", Value = Session["fk_comp_id"].ToString() }; cmd.Parameters.Add(paramif_fk); con.Open(); byte[] bytes = (byte[])cmd.ExecuteScalar(); string strBase64 = Convert.ToBase64String(bytes); Image2.ImageUrl = "data:Image/png;base64," + strBase64; } } //if end here ........................... else { Image2.Visible = false; Image1.Visible = true; } //else end...................... Label1.Text = re.scalarReturn("select job_title from job_title_tbl where job_fk_jobitle=" + Session["fk_login_id"]); jobdesc.Text = re.scalarReturn("select job_desc from job_title_tbl where job_fk_jobitle=" + Session["fk_login_id"]); lblcompanyname.Text = re.scalarReturn("select company_name from company_name_tbl where company_login_id_fk=" + Session["fk_login_id"]); Label2.Text = re.scalarReturn("select comapany_details from company_name_tbl where company_login_id_fk=" + Session["fk_login_id"]); lblfunctionalarea.Text = re.scalarReturn("select job_functional_area from job_title_tbl where job_fk_jobitle=" + Session["fk_login_id"]); lblsortjob.Text = re.scalarReturn("select job_sort from job_title_tbl where job_fk_jobitle=" + Session["fk_login_id"]); lblcity.Text = re.scalarReturn("select location_city from company_location_tbl where location_login_id_fk=" + Session["fk_login_id"]); lblcountry.Text = re.scalarReturn("select location_country from company_location_tbl where location_login_id_fk=" + Session["fk_login_id"]); }//load event end...........