コード例 #1
0
        public void showfields()
        {
            Returnclass rc = new Returnclass();

            Label1.Text = rc.scalarReturn("select job_title from job_title_tbl where job_id=" + ViewState["job_id"].ToString());
            Label2.Text = rc.scalarReturn("select job_desc from job_title_tbl where job_id=" + ViewState["job_id"].ToString());
        }
コード例 #2
0
ファイル: Index.aspx.cs プロジェクト: Salmanmasood/fy
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["userid"] == null)
            {
                Button1.Text      = "Login";
                Button2.Text      = "Sign up";
                Button7.Visible   = false;
                Button8.Visible   = false;
                Button1.Visible   = true;
                Button2.Visible   = true;
                GridView1.Visible = false;
            }
            else
            {
                Button7.Text    = Session["username"].ToString();
                Button8.Text    = "Log Out";
                Button7.Visible = true;
                Button8.Visible = true;
                Button1.Visible = false;
                Button2.Visible = false;
                Returnclass re = new Returnclass();

                Session["functtionalarea"] = re.scalarReturn
                                                 ("select professional_functionalarea from professional_info_login_information p inner join login_information l on l.login_id=p.inprofessional_login_id_fk where l.login_email='" + Session["userid"] + "'");
                Session["jobsort"] = re.scalarReturn
                                         ("select professional_want_job_sort from professional_info_login_information p inner join login_information l on l.login_id=p.inprofessional_login_id_fk where l.login_email='" + Session["userid"] + "'");
            }
        }//loead event end
コード例 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ViewState["job_id"] = Request.QueryString["view"].ToString();

            Returnclass re = new Returnclass();

            Session["fk_login_id"] = re.scalarReturn("select job_fk_jobitle from job_title_tbl where job_id=" + ViewState["job_id"]);

            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......................
        }
コード例 #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            lblMessage.Visible = false;

            if (Session["img"] != null)
            {
                Returnclass ob = new Returnclass();

                ViewState["imageid"] = ob.scalarReturn("select max(id) from tblImages_login_info where inimage_login_id_fk=1");

                Session["id_fk"] = 1;

                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         = ViewState["imageid"].ToString()
                    };
                    cmd.Parameters.Add(paramif_fk);


                    con.Open();

                    byte[] bytes     = (byte[])cmd.ExecuteScalar();
                    string strBase64 = Convert.ToBase64String(bytes);
                    Image1.ImageUrl = "data:Image/png;base64," + strBase64;
                }
            } //if end here...............
        }
コード例 #5
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            Returnclass rc = new Returnclass();
            string      x  = rc.scalarReturn("select max(login_id) from login_information");
            int         y  = int.Parse(x);

            y += 1;

            Session["c_img_id"] = y.ToString();
            // Session["c_img_id"] = 5027;

            Session["scc_ins"]     = txtinsti_ssc.Text;
            Session["hsc_ins"]     = txtinsti_hsc.Text;
            Session["grad_ins"]    = txt_insti_grad.Text;
            Session["masters_ins"] = txt_insti_master.Text;



            Session["scc_percentage"] = ddlper_ssc.SelectedItem.ToString();
            Session["scc_grades"]     = gradesfinder(Session["scc_percentage"].ToString());


            Session["hsc_percentage"] = DropDownList2.SelectedItem.ToString();
            Session["hsc_grades"]     = gradesfinder(Session["hsc_percentage"].ToString());


            Session["grad_percentage"] = DropDownList4.SelectedItem.ToString();
            Session["grad_grades"]     = gradesfinder(Session["grad_percentage"].ToString());



            Session["masters_percentage"] = DropDownList6.SelectedItem.ToString();
            Session["masters_grades"]     = gradesfinder(Session["masters_percentage"].ToString());

            //for educational
            Session["ssc"]     = txtdeg_ssc.Text;
            Session["hsc"]     = txtdeg_hsc.Text;
            Session["grad"]    = txt_deg_grad.Text;
            Session["masters"] = txt_deg_master.Text;
            //for educational
            //code......................................
            ssc[0] = Session["scc_grades"].ToString();
            ssc[1] = Session["scc_percentage"].ToString();
            ssc[2] = Session["scc_ins"].ToString();
            ssc[3] = Session["c_img_id"].ToString();
            ssc[4] = Session["ssc"].ToString();
            ssc[5] = DropDownList0.SelectedItem.ToString();
            ssc[6] = DropDownList7.SelectedItem.ToString();

            //hsc
            hsc[0] = Session["hsc_grades"].ToString();
            hsc[1] = Session["hsc_percentage"].ToString();
            hsc[2] = Session["hsc_ins"].ToString();
            hsc[3] = Session["c_img_id"].ToString();
            hsc[4] = Session["hsc"].ToString();
            hsc[5] = DropDownList1.SelectedItem.ToString();
            hsc[6] = DropDownList8.SelectedItem.ToString();

            //grad
            grad[0] = Session["grad_grades"].ToString();
            grad[1] = Session["grad_percentage"].ToString();
            grad[2] = Session["grad_ins"].ToString();
            grad[3] = Session["c_img_id"].ToString();
            grad[4] = Session["grad"].ToString();
            grad[5] = DropDownList3.SelectedItem.ToString();
            grad[6] = DropDownList10.SelectedItem.ToString();

            //masters
            masters[0] = Session["masters_grades"].ToString();
            masters[1] = Session["masters_percentage"].ToString();
            masters[2] = Session["masters_ins"].ToString();
            masters[3] = Session["c_img_id"].ToString();
            masters[4] = Session["masters"].ToString();
            masters[5] = DropDownList5.SelectedItem.ToString();
            masters[6] = DropDownList11.SelectedItem.ToString();

            //code......................................



            string      s  = callallmethods(demo.Text);
            insert_data da = new insert_data();

            da.insert_s_h_m_g("@ssc_Grades", "@ssc_percentage", "@ssc_institute", "@ssc_degree", "@ssc_fk_id", "@scc_duration", "@scc_duration_END", "insert_scc_record", ssc);
            insert_data da1 = new insert_data();

            da1.insert_s_h_m_g("@hsc_Grades", "@hsc_percentage", "@hsc_institute", "@hsc_degree", "@hsc_fk_id", "@hsc_duration", "@HSC_duration_END", "insert_hsc_record", hsc);
            insert_data da2 = new insert_data();

            da2.insert_s_h_m_g("@grad_Grades", "@grad_percentage", "@grad_institute", "@grad_degree", "@grad_fk_id", "@grad_duration", "@grad_duration_end", "insert_grad_record", grad);

            insert_data da3 = new insert_data();

            da3.insert_s_h_m_g("@masters_Grades", "@masters_percentage", "@masters_institute", "@masters_degree", "@masters_fk_id", "@masters_duration", "@masters_duration_end", "insert_masters_record", masters);

            //method calling for file uploaad..................................................................
            if (FileUpload1.HasFile)
            {
                fileuploadmethod(FileUpload1, Session["userid"].ToString());
            }

            //...................................................................................................


            Response.Redirect("~/Index.aspx");
        } //btn event end..........................