예제 #1
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            panelDescription.Visible = false;
            fillMyJobsDataGrid();
            username      = service.FindUsernameBySessionId(sessionId);
            label14.Text += " " + username.ToUpper();
            //postedStatusLBL2.Text = "hello";
            existingSkills = new BindingList <string>(service.DisplaySkills());
            existingSkillsLBX.DataSource = existingSkills;

            // add job
            streamCBX.DataSource     = service.GetStreams();
            statusCBX.DataSource     = service.GetStatuses();
            datePickerDeadline.Value = DateTime.Today.AddDays(14);
            postedStatusLBL2.Visible = false;

            // search consultants
            searchUsersLBX.Visible             = false;
            profileGBX.Visible                 = false;
            searchExistingSkills               = new BindingList <string>(service.DisplaySkills());
            searchExistingSkillsLBX.DataSource = searchExistingSkills;
            searchStreamBX.DataSource          = service.GetStreams();
            BindingList <string> statuses = new BindingList <string>();

            statuses.Add("All Available");
            List <string> status = service.GetTStatuses();

            for (int g = 0; g < status.Count(); g++)
            {
                statuses.Add(status[g]);
            }
            searchStatusBX.DataSource         = statuses;
            searchExistingSkillsLBX.AllowDrop = true;
            searchAddedSkillsLBX.AllowDrop    = true;
        }
예제 #2
0
        private void EditSkillsForm_Load(object sender, EventArgs e)
        {
            BindingList <string> jobSkills = new BindingList <string>();

            editExistingSkills      = new BindingList <string>(service.DisplaySkills());
            jobSkillsLBX.DataSource = editSelectedSkills;
            for (int i = 0; i < editExistingSkills.Count; i++)
            {
                foreach (string j in editSelectedSkills)
                {
                    if (j == editExistingSkills[i])
                    {
                        editExistingSkills.Remove(j);
                    }
                }
            }
            DbSkillsLBX.DataSource = editExistingSkills;
        }
예제 #3
0
        public void BindData()
        {
            skills = new BindingList <string>(service.DisplaySkills());
            lbxSkills.DataSource = skills;
            lbxSkills.DataBind();

            lbxSelectedSkills.DataSource = selectedSkills;
            lbxSelectedSkills.DataBind();

            ddlStream.DataSource    = service.GetStreamList();
            ddlStream.SelectedValue = "All";
            ddlStream.DataBind();

            ddlStatus.DataSource = service.GetStatuses();
            ddlStatus.DataBind();

            ddlCompany.DataSource = service.GetCompanies();
            ddlCompany.DataBind();

            ddlLocation.DataSource = service.GetLocation();
            ddlLocation.DataBind();
        }
예제 #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1));
            Response.Cache.SetCacheability(HttpCacheability.NoCache);
            Response.Cache.SetNoStore();

            Guid sessionId = (Guid)Session["sessionId"];

            // user = new DbUser();
            user = service.DisplayProfile(sessionId);

            //trap the selected item
            if (LBAddedSkills.SelectedIndex > -1)
            {
                removeSelectedItem = LBAddedSkills.SelectedItem.ToString();
            }

            if (LBExisitingSkills.SelectedIndex > -1)
            {
                addedSelectedItem = LBExisitingSkills.SelectedItem.ToString();
            }
            //refill the bidinglist

            //add the trapped item to the bindinglist
            #region Postback
            if (!Page.IsPostBack)
            {
                //newlyAddedSkills;
                //EditPanel.Visible = false;
                ViewProfilePanel.Visible = true;
                EditPanel.Visible        = false;

                //Fill the View and Edit Profile labels and TextBox fields
                TxtBoxFname.Text    = user.FirstName;
                VPFirstNameLbl.Text = user.FirstName;

                TxtBoxLName.Text   = user.LastName;
                VPLastNameLbl.Text = user.LastName;

                TxtBoxEmail.Text = user.Email;
                VPEmailLbl.Text  = user.Email;

                TxtBoxDegree.Text = user.Degree;
                VPPDegreeLbl.Text = user.Degree;

                TxtBoxLocation.Text = user.Location;
                VPLocLbl.Text       = user.Location;

                TxtBoxModules.Text = user.Modules;
                VPModulesLbl.Text  = user.Modules;

                //Fill the ComboBox for Status and Stream
                FillDropDownLists();
                CmbBoxStatus.SelectedValue = user.TStatus;
                VPStatusLbl.Text           = user.TStatus;

                CmbBoxStream.SelectedValue = user.Stream;
                VpStreamLbl.Text           = user.Stream;


                //Add theImage for the Consultant
                Add_Image();

                //Fill the user existing skills fields

                userId = int.Parse(Session["userid"].ToString());

                userExistingSkills = new BindingList <string>(service.GetUserSkills(userId));

                LBAddedSkills.DataSource = userExistingSkills;
                LBAddedSkills.DataBind();

                //Fill the List of available skills from the database
                dbExistingSkills = new BindingList <string>(service.DisplaySkills());

                //Get rid of the skills already added for the user
                for (int i = 0; i < dbExistingSkills.Count; i++)
                {
                    foreach (string j in userExistingSkills)
                    {
                        if (j == dbExistingSkills[i])
                        {
                            dbExistingSkills.RemoveAt(i);
                        }
                    }
                }
                LBExisitingSkills.DataSource = dbExistingSkills;
                LBExisitingSkills.DataBind();
            }

            #endregion

            userId                = int.Parse(Session["userid"].ToString());
            userExistingSkills    = new BindingList <string>(service.GetUserSkills(userId));
            VPSkillsLB.DataSource = userExistingSkills;
            VPSkillsLB.DataBind();
            Label14.Text = "";
            Label13.Text = "";
        }