protected void Page_Load(object sender, EventArgs e)
    {
        //EncryptDecrypt ency = new EncryptDecrypt();
        //rowid = ency.EncryptDecryptString("£", Request.QueryString["id"].ToString().Trim());
        //   s = Request.QueryString["id"].ToString();
        w                    = Request.QueryString["id"].ToString();
        JobTitle             = Request.QueryString["title"].ToString();
        ency                 = new EncryptDecrypt();
        memid                = ency.EncryptDecryptString("£", Request.QueryString["id"].ToString());
        jobid                = ency.EncryptDecryptString("£", Request.QueryString["title"].ToString());
        Session["PSEJobId"]  = Request.QueryString["id"].ToString();
        ViewState["orderby"] = "0";

        BA_Jobseeker1 bajobseeker = new BA_Jobseeker1();
        DataSet       ds          = new DataSet();

        ds                      = bajobseeker.getjobseeker(Convert.ToInt32(ViewState["orderby"].ToString()), memid, jobid);
        lblhead.Text            = ds.Tables[0].Rows[0]["JobTitle"].ToString();
        dlJobPosting.DataSource = ds;
        dlJobPosting.DataBind();
        //if (!IsPostBack)
        //{
        //   string cmdstring = "select * from tblJobPosting  where ID = '" + s + "'";

        //SqlDataAdapter da = new SqlDataAdapter(cmdstring, con);
        //DataTable dt = new DataTable();
        //da.Fill(dt);
        //    dlJobPosting.DataSource=dt;
        //    dlJobPosting.DataBind();
        //}
    }
Exemple #2
0
    protected void FillGrid()
    {
        BA_Jobseeker1 bajobseeker = new BA_Jobseeker1();
        DataSet       ds          = new DataSet();

        ds = bajobseeker.getjobseeker(Convert.ToInt32(ViewState["orderby"].ToString()), memid, jobid);

        //DataTable dataTable = this.GetDataTable();
        if (ds != null)
        {
            if (ds.Tables[0].Rows.Count > 0)
            {
                pnlMain.Visible                  = true;
                pnlSub.Visible                   = false;
                _PageDataSource.DataSource       = ds.Tables[0].DefaultView;
                _PageDataSource.AllowPaging      = true;
                _PageDataSource.PageSize         = PageSize;
                _PageDataSource.CurrentPageIndex = CurrentPage;
                ViewState["TotalPages"]          = _PageDataSource.PageCount;
                this.lblPageInfo.Text            = "Page " + (CurrentPage + 1) + " of " + _PageDataSource.PageCount;
                this.lbtnPrevious.Enabled        = !_PageDataSource.IsFirstPage;
                this.lbtnNext.Enabled            = !_PageDataSource.IsLastPage;
                this.lbtnFirst.Enabled           = !_PageDataSource.IsFirstPage;
                dljobdet.DataSource              = _PageDataSource;
                dljobdet.DataBind();
                this.doPaging();
            }
            else
            {
                pnlMain.Visible = false;
                pnlSub.Visible  = true;
            }
        }
        else
        {
            pnlMain.Visible = false;
            pnlSub.Visible  = true;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (Session["PSEEMAIL"].ToString() != "" && Session["PSEName"].ToString() != "")
            {
                this.Master.ErrorMessage = this.Title;
                ds                   = new DataSet();
                w                    = Request.QueryString["memid"].ToString();
                jobtitle             = Request.QueryString["jobid"].ToString();
                ency                 = new EncryptDecrypt();
                MemID                = ency.EncryptDecryptString("£", Request.QueryString["memid"].ToString());
                jobid                = ency.EncryptDecryptString("£", Request.QueryString["jobid"].ToString());
                ViewState["orderby"] = "0";
                BA_Jobseeker1 bajobseeker = new BA_Jobseeker1();
                DataSet       ds1         = new DataSet();

                ds1 = bajobseeker.getjobseeker(Convert.ToInt32(ViewState["orderby"].ToString()), MemID, jobid);
                string     s   = Session["PSEName"].ToString();
                string     id  = Session["PSMEID"].ToString();
                SqlCommand cmd = new SqlCommand("select * from [tblMerchantReg] where [MemID]='" + MemID + "'", con);
                cmd.CommandType = CommandType.Text;
                SqlDataAdapter da = new SqlDataAdapter(cmd);
                da.Fill(ds);
                da.Dispose();
                lblError.Visible = false;
                if (!Page.IsPostBack)
                {
                    txtJobDesc.Text  = ds1.Tables[0].Rows[0]["JobDescription"].ToString();
                    txtJobTitle.Text = ds1.Tables[0].Rows[0]["JobTitle"].ToString();
                    //txtLoc.Text = ds1.Tables[0].Rows[0]["Location"].ToString();
                    txtRate.Text   = ds1.Tables[0].Rows[0]["Rate"].ToString();
                    txtSkills.Text = ds1.Tables[0].Rows[0]["Skills"].ToString();

                    //code for selecting industry
                    BA_Marketing mar          = new BA_Marketing();
                    BA_postjobs  pst2         = new BA_postjobs();
                    DataSet      dsindustries = new DataSet();;
                    dsindustries              = mar.fillcategory();
                    ddIndustry.DataSource     = dsindustries;
                    ddIndustry.DataTextField  = "indusname";
                    ddIndustry.DataValueField = "ID";
                    ddIndustry.DataBind();
                    ddIndustry.Items.Insert(0, new ListItem("--Select--", "--Select--"));
                    ddlcbIndustry.DataSource     = dsindustries;
                    ddlcbIndustry.DataTextField  = "indusname";
                    ddlcbIndustry.DataValueField = "indusname";
                    ddlcbIndustry.DataBind();
                    DataTable     dt             = dsindustries.Tables[0];
                    List <string> lst            = new List <string>();
                    string        industriesList = ds1.Tables[0].Rows[0]["Industry"].ToString();
                    string[]      ss             = industriesList.Split(',');

                    if (ss.Length > 0)
                    {
                        for (int j = 0; j < ss.Length; j++)
                        {
                            foreach (System.Web.UI.WebControls.ListItem item in ddlcbIndustry.Items)
                            {
                                string name = item.ToString();
                                if (ss[j] == name)
                                {
                                    // int index= ddlcbIndustry.Items.IndexOf(item);
                                    //  ddlcbIndustry.SelectedIndex = index;
                                    item.Selected = true;
                                }
                            }
                        }
                        lblIndus.Text = "You have Selected : " + ConvertStringArrayToStringJoin(ss);
                    }
                    //  ddlcbIndustry.Items.Insert(0, new ListItem("--Select--", "--Select--"));

                    //code for  selecting experience fro &to
                    ddlmax.Items.Insert(0, new ListItem("Max", "Max"));
                    ddlmin.Items.Insert(0, new ListItem("Min", "Min"));
                    for (int i = 0; i <= 10; i++)
                    {
                        ddlmax.Items.Add(i.ToString());
                        ddlmin.Items.Add(i.ToString());
                    }
                    ddlmax.SelectedValue = ds1.Tables[0].Rows[0]["ExpTo"].ToString();
                    ddlmin.SelectedValue = ds1.Tables[0].Rows[0]["ExpFrom"].ToString();
                    //code for selecting location
                    DataSet dslocations = new DataSet();;
                    dslocations                = pst2.getLocations();
                    ddlLocation.DataSource     = dslocations;
                    ddlLocation.DataTextField  = "PreLoc";
                    ddlLocation.DataValueField = "PreLoc";
                    ddlLocation.DataBind();

                    ddlLocation.SelectedItem.Text = ds1.Tables[0].Rows[0]["Location"].ToString();
                    ddlLocation.Items.Insert(0, new ListItem("--Select--", "--Select--"));
                    ddlLocation.Items.Insert(1, new ListItem("--OTHER--", "--OTHER--"));
                    //code for jobtype
                    //ddlJobType.Items.Insert(0, new ListItem("--Select--", "--Select--"));
                    //ddlJobType.Items.Add("Permanent");
                    //ddlJobType.Items.Add("Contract");
                    //code for Binding Repeater
                    // BindRepeater();
                }
            }
            else
            {
                Response.Redirect("~/employlogin.aspx", false);
            }
        }
        catch (Exception ex)
        {
            Response.Redirect("~/employlogin.aspx", false);
        }
    }