protected void Page_Load(object sender, EventArgs e)
 {
     // Session["user"] = "******";
     ServiceReference2.Service1Client client = new ServiceReference2.Service1Client("BasicHttpBinding_IService1");
     GridView1.DataSource = client.DisplayAppliedPost(Session["username"].ToString());
     GridView1.DataBind();
 }
Ejemplo n.º 2
0
        protected void updatedetails(object sender, System.EventArgs e)
        {
            ServiceReference2.Service1Client s = new ServiceReference2.Service1Client("BasicHttpBinding_IService1");

            Button      lb         = sender as Button;
            GridViewRow clickedRow = ((Button)sender).NamingContainer as GridViewRow;
            int         x          = clickedRow.RowIndex;

            ServiceReference2.CompanyDetails j = new ServiceReference2.CompanyDetails();
            j.Name          = GridView1.Rows[x].Cells[3].Text;
            j.Postname      = GridView1.Rows[x].Cells[4].Text;
            j.Vacancy       = Int32.Parse(GridView1.Rows[x].Cells[5].Text);
            j.Qualification = GridView1.Rows[x].Cells[6].Text;
            j.Salary        = GridView1.Rows[x].Cells[7].Text;
            j.Description   = GridView1.Rows[x].Cells[8].Text;
            j.Jobid         = GridView1.Rows[x].Cells[9].Text;
            int id = Int32.Parse(GridView1.Rows[x].Cells[2].Text);

            // string k = s.UpdatePostedJob(j,id);
            Session["j.Name"]     = GridView1.Rows[x].Cells[3].Text;
            Session["j.Postname"] = GridView1.Rows[x].Cells[4].Text;
            Session["j.Vacancy"]  = Int32.Parse(GridView1.Rows[x].Cells[5].Text);

            Session["j.Qualification"] = GridView1.Rows[x].Cells[6].Text;
            Session["j.Salary"]        = GridView1.Rows[x].Cells[7].Text;
            Session["j.Description"]   = GridView1.Rows[x].Cells[8].Text;
            Session["j.Jobid"]         = GridView1.Rows[x].Cells[9].Text;
            Session["id"] = id.ToString();

            Response.Redirect("UpdateDetails.aspx");
        }
Ejemplo n.º 3
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            ServiceReference2.Service1Client s = new ServiceReference2.Service1Client("BasicHttpBinding_IService1");
            ServiceReference2.User           u = new ServiceReference2.User();
            u.UserName = TextBox1.Text;
            u.Email    = TextBox2.Text;
            u.Password = TextBox3.Text;
            string cpass = TextBox4.Text;

            u.Contact = TextBox5.Text;
            u.Role    = DropDownList1.SelectedValue;
            if (!cpass.Equals(u.Password))
            {
                Label1.Text = "password and confirm password does not match";
            }
            else
            {
                string st = s.AddUser(u);

                if (st.Equals("Username already exist"))
                {
                    Label1.Text = "Username already exists";

                    //  ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Username already exist')", true);
                    //   Response.Write("<script>alert('Username already exist')</script>");
                }
                else
                {
                    Response.Redirect("Login.aspx");
                }
            }
        }
Ejemplo n.º 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ServiceReference2.Service1Client c = new ServiceReference2.Service1Client("BasicHttpBinding_IService1");

            GridView1.DataSource = c.GetSingleCompanyData(Session["username"].ToString());
            // Label1.Text = Session["companyname"].ToString();
            GridView1.DataBind();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            ServiceReference2.Service1Client s = new ServiceReference2.Service1Client("BasicHttpBinding_IService1");
            DataSet ds = s.SelectUserbyCompany("amazon");

            GridView1.DataSource = ds;///.SelectUserbyCompany("yt").Tables[0];
            GridView1.DataBind();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            ServiceReference2.Service1Client s = new ServiceReference2.Service1Client("BasicHttpBinding_IService1");

            DataSet   ds1 = s.GetJobApplicationDetails();
            DataTable dt1 = ds1.Tables[0];


            GridView1.DataSource = dt1;
            GridView1.DataBind();
        }
Ejemplo n.º 7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                ServiceReference2.Service1Client s = new ServiceReference2.Service1Client("BasicHttpBinding_IService1");
                DataSet       ds = s.GetCompanyData();
                DataTable     dt = ds.Tables[0];
                List <string> l  = (from DataRow dr in dt.Rows

                                    select(string) dr["name"]).ToList <string>();
            }
        }
Ejemplo n.º 8
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     ServiceReference2.Service1Client client = new ServiceReference2.Service1Client("BasicHttpBinding_IService1");
     ServiceReference2.CompanyDetails c      = new ServiceReference2.CompanyDetails();
     c.Name          = Companyname.Text;
     c.Postname      = PostName.Text;
     c.Qualification = Qualification.Text;
     c.Salary        = Salary.Text;
     c.Vacancy       = Int32.Parse(Vacancy.Text);
     c.Description   = message.Text;
     c.Jobid         = Jobid.Text;
     client.InsertData(c);
 }
Ejemplo n.º 9
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            ServiceReference2.Service1Client s = new ServiceReference2.Service1Client("BasicHttpBinding_IService1");
            ServiceReference2.User           u = new ServiceReference2.User();
            u.UserName = TextBox1.Text;
            u.Email    = TextBox2.Text;
            u.Password = TextBox3.Text;
            u.Contact  = TextBox5.Text;
            u.Role     = TextBox6.Text;

            string st = s.AddUser(u);

            Response.Redirect("Login.aspx");
        }
Ejemplo n.º 10
0
        protected void LnKB_Click(object sender, System.EventArgs e)
        {
            ServiceReference2.Service1Client s = new ServiceReference2.Service1Client("BasicHttpBinding_IService1");

            Button      lb         = sender as Button;
            GridViewRow clickedRow = ((Button)sender).NamingContainer as GridViewRow;
            int         x          = clickedRow.RowIndex;

            ServiceReference2.JobApplication j = new ServiceReference2.JobApplication();
            string name     = GridView1.Rows[x].Cells[3].Text;
            string postname = GridView1.Rows[x].Cells[4].Text;
            string k        = s.DeletePostedJob(name, postname);

            Response.Redirect("company.aspx");
        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            ServiceReference2.Service1Client client = new ServiceReference2.Service1Client("BasicHttpBinding_IService1");
            ServiceReference2.CompanyDetails c      = new ServiceReference2.CompanyDetails();
            c.Name          = Session["username"].ToString();
            c.Postname      = PostName.Text;
            c.Qualification = Qualification.Text;
            c.Salary        = Salary.Text;
            c.Vacancy       = Int32.Parse(Vacancy.Text);
            c.Description   = message.Text;
            c.Jobid         = Jobid.Text;
            string mess = client.InsertData(c);

            Response.Write("<script>alert('" + mess + "')</script>");
        }
Ejemplo n.º 12
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         ServiceReference2.Service1Client c = new ServiceReference2.Service1Client("BasicHttpBinding_IService1");
         GridView grid = new GridView();
         grid.DataSource = c.getUser(Session["username"].ToString());
         grid.DataBind();
         Username.Text   = grid.Rows[0].Cells[1].Text;
         Contact.Text    = grid.Rows[0].Cells[3].Text;
         Email.Text      = grid.Rows[0].Cells[4].Text;
         Role.Text       = grid.Rows[0].Cells[5].Text;
         id              = grid.Rows[0].Cells[0].Text;
         Session["pass"] = grid.Rows[0].Cells[2].Text;
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Label1.Text = "Select Company";
                ServiceReference2.Service1Client s = new ServiceReference2.Service1Client("BasicHttpBinding_IService1");
                DataSet       ds = s.GetCompanyData();
                DataTable     dt = ds.Tables[0];
                List <string> l  = (from DataRow dr in dt.Rows

                                    select(string) dr["name"]).ToList <string>();
                var fl = l.Distinct();
                DropDownList1.DataSource = fl.ToList();
                DropDownList1.DataBind();
            }
        }
        protected void LnKB_Click(object sender, System.EventArgs e)
        {
            ServiceReference2.Service1Client s = new ServiceReference2.Service1Client("BasicHttpBinding_IService1");

            Button lb = sender as Button;

            GridViewRow clickedRow = ((Button)sender).NamingContainer as GridViewRow;
            int         x          = clickedRow.RowIndex;

            string user = GridView1.Rows[x].Cells[2].Text;
            //GridView1.Rows[x].Cells[0].Text = "Applied";

            string k = s.DeleteCompany(user);

            Response.Redirect("adminviewcompany.aspx");
        }
        protected void LnKB_Click(object sender, System.EventArgs e)
        {
            ServiceReference2.Service1Client s = new ServiceReference2.Service1Client("BasicHttpBinding_IService1");

            Button lb = sender as Button;

            GridViewRow clickedRow = ((Button)sender).NamingContainer as GridViewRow;
            int         x          = clickedRow.RowIndex;

            //  Label2.Text = GridView1.Rows[x].Cells[8].Text;
            GridView1.Rows[x].Cells[0].Text = "Applied";
            ServiceReference2.JobApplication j = new ServiceReference2.JobApplication();
            j.Companyname = GridView1.Rows[x].Cells[2].Text;
            j.Jobid       = Convert.ToInt32(GridView1.Rows[x].Cells[8].Text);
            j.UserName    = Session["username"].ToString();
            string k = s.ApplyForCompany(j);
        }
Ejemplo n.º 16
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            ServiceReference2.Service1Client c    = new ServiceReference2.Service1Client("BasicHttpBinding_IService1");
            ServiceReference2.User           user = new ServiceReference2.User();
            user.Contact  = Contact.Text;
            user.Email    = Email.Text;
            user.Password = Session["pass"].ToString();
            user.Role     = Role.Text;
            user.UserName = Username.Text;

            Console.WriteLine(user.Email);
            string ret = c.UpdateUser(user);

            if (ret == "updated")
            {
                Response.Redirect("UserHome.aspx");
            }
        }
        protected void DropDownList1_SelectedIndexChanged1(object sender, EventArgs e)
        {
            ServiceReference2.Service1Client s = new ServiceReference2.Service1Client("BasicHttpBinding_IService1");
            //  JobPortalRef.Service1Client s = new JobPortalRef.Service1Client("BasicHttpBinding_IService1");
            string c = DropDownList1.SelectedValue;//.Text;

            DataSet   ds1             = s.GetCompanyData();
            DataTable dt1             = ds1.Tables[0];
            string    SearchByColumn1 = "name = name";// + c;
            var       rows1           = dt1.AsEnumerable()
                                        .Where(r => r.Field <string>("name") == c);

            if (rows1.Any())
            {
                GridView1.DataSource = rows1.CopyToDataTable();
            }
            GridView1.DataBind();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            Label1.Text = "Select JobId";
            if (!IsPostBack)
            {
                ServiceReference2.Service1Client s = new ServiceReference2.Service1Client("BasicHttpBinding_IService1");
                DataSet   ds = s.GetSingleCompanyData(Session["username"].ToString());
                DataTable dt = ds.Tables[0];


                List <string> l = (from DataRow dr in dt.Rows

                                   select(string) dr["jobid"]).ToList <string>();
                DropDownList1.DataSource = l;

                DropDownList1.DataBind();
            }
        }
Ejemplo n.º 19
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            ServiceReference2.Service1Client s = new ServiceReference2.Service1Client("BasicHttpBinding_IService1");

            ServiceReference2.CompanyDetails j = new ServiceReference2.CompanyDetails();

            j.Name          = name.Text;
            j.Postname      = postname.Text;
            j.Vacancy       = Int32.Parse(vacancy.Text);
            j.Qualification = qualification.Text;
            j.Salary        = salary.Text;
            j.Description   = description.Text;
            j.Jobid         = jobid.Text;
            int id = Int32.Parse(Session["id"].ToString());

            string k = s.UpdatePostedJob(j, id);

            Response.Redirect("UpdatePostedJob.aspx");
        }
Ejemplo n.º 20
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            ServiceReference2.Service1Client s = new ServiceReference2.Service1Client("BasicHttpBinding_IService1");
            ServiceReference2.User           u = new ServiceReference2.User();
            u.UserName = TextBox1.Text;
            u.Password = TextBox2.Text;
            u.Role     = TextBox3.Text;
            string st = s.Login(u);

            if (st.Equals("login"))
            {
                Session["username"] = u.UserName.ToString();

                Response.Redirect("company.aspx");
            }
            else
            {
                Response.Redirect("Login.aspx");
            }
        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            ServiceReference2.Service1Client s = new ServiceReference2.Service1Client("BasicHttpBinding_IService1");
            ServiceReference2.User           u = new ServiceReference2.User();
            u.UserName          = TextBox1.Text;
            u.Password          = TextBox2.Text;
            u.Role              = DropDownList1.SelectedValue;
            Session["username"] = u.UserName;
            Session["role"]     = u.Role;

            if (u.UserName == "admin" && u.Password == "admin123")
            {
                Response.Redirect("AdminHome.aspx");
            }



            string st = s.Login(u);

            if (st.Equals("login") && u.Role.Equals("user"))
            {
                Session["username"] = u.UserName;
                Session["role"]     = u.Role;
                Response.Redirect("UserHome.aspx");
            }

            else if (st.Equals("login") && u.Role.Equals("company"))
            {
                Session["username"] = u.UserName;
                Session["role"]     = u.Role;
                Response.Redirect("company.aspx");
            }

            else
            {
                label1.Text = "Login details invalid";
                // Response.Redirect("Login.aspx");
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            ServiceReference2.Service1Client s = new ServiceReference2.Service1Client("BasicHttpBinding_IService1");

            DataSet   ds1 = s.GetCompany();
            DataTable dt1 = ds1.Tables[0];
            //string SearchByColumn1 = "name = name";// + c;
            var row1 = from customer in dt1.AsEnumerable()

                       select new
            {
                Id       = customer.Field <int>("Id"),
                UserName = customer.Field <string>("UserName"),
                Contact  = customer.Field <string>("Contact"),
                Email    = customer.Field <string>("Email"),
                Role     = customer.Field <string>("Role"),
            };


            GridView1.DataSource = row1;
            GridView1.DataBind();
        }
        protected void LnKB_Click(object sender, System.EventArgs e)
        {
            ServiceReference2.Service1Client s = new ServiceReference2.Service1Client("BasicHttpBinding_IService1");

            Button lb = sender as Button;
            //   Label2.Text = "hello";
            GridViewRow clickedRow = ((Button)sender).NamingContainer as GridViewRow;
            int         x          = clickedRow.RowIndex;

            //  int id = Convert.ToInt32(GridView1.Rows[x].Cells[6].Text);

            //if (GridView1.Rows[x].Cells[0].Text ==)
            // Session["user"] = "******";
            // Label2.Text = GridView1.Rows[x].Cells[8].Text;
            //    GridView1.Rows[x].Cells[0].Text = "Applied";
            ServiceReference2.JobApplication j = new ServiceReference2.JobApplication();
            j.Companyname = GridView1.Rows[x].Cells[3].Text;
            j.Jobid       = Convert.ToInt32(GridView1.Rows[x].Cells[4].Text);
            j.UserName    = Session["username"].ToString();
            string k = s.DeleteAppliedPosition(j);

            Response.Redirect("DisplayAppliedJob.aspx");
        }
        protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
        {
            ServiceReference2.Service1Client s = new ServiceReference2.Service1Client("BasicHttpBinding_IService1");
            string c = DropDownList1.SelectedValue;//.Text;

            Label1.Text = "";
            DataSet   ds1 = s.SelectUserbyPostCompany(Session["username"].ToString(), c);
            DataTable dt1 = ds1.Tables[0];
            //string SearchByColumn1 = "name = name";// + c;
            var row1 = from customer in dt1.AsEnumerable()

                       select new
            {
                Id       = customer.Field <int>("Id"),
                UserName = customer.Field <string>("UserName"),
                Contact  = customer.Field <string>("Contact"),
                Email    = customer.Field <string>("Email"),
                Role     = customer.Field <string>("Role"),
            };

            //if (rows1.Any())
            GridView1.DataSource = row1;//.CopyToDataTable();
            GridView1.DataBind();
        }
Ejemplo n.º 25
0
 protected void Page_Load(object sender, EventArgs e)
 {
     ServiceReference2.Service1Client s = new ServiceReference2.Service1Client("BasicHttpBinding_IService1");
     GridView1.DataSource = s.GetCompanyData();
     GridView1.DataBind();
 }