public void Load(ResourcePlanning prnt)
        {
            parent = prnt;

            ////// POPULATE WORKSTREAMS //////
            DataRow[] filteredws = parent.dtWorkstream.Select("WorkstreamName <> 'All'");
            cbWorkstream.ItemsSource = (filteredws.Length == 0) ? null : filteredws.CopyToDataTable().DefaultView;

            ////// POPULATE RESOURCES //////
            DataRow[] filtered = parent.dtResources.Select("IsPM = 1 and Archived=false");
            cbProjectManager.ItemsSource = (filtered.Length == 0) ? null : filtered.CopyToDataTable().DefaultView;

            cbWorkstream.SelectedIndex     = -1;
            cbProjectManager.SelectedIndex = -1;
        }
        public void Load(ResourcePlanning prnt)
        {
            parent = prnt;

            cbDepartment.ItemsSource = parent.dtDepartment.DefaultView;

            DataRow[] filtered = parent.dtResources.Select("IsManager = 1");
            cbManager.ItemsSource = (filtered.Length == 0) ? null : filtered.CopyToDataTable().DefaultView;

            cbManager.SelectedIndex    = -1;
            cbDepartment.SelectedIndex = -1;

            DoubleAnimation myDoubleAnimation = new DoubleAnimation();

            myDoubleAnimation.From     = 300;
            myDoubleAnimation.To       = 300;
            myDoubleAnimation.Duration = new Duration(TimeSpan.FromSeconds(0d));
            gridOuter.BeginAnimation(HeightProperty, myDoubleAnimation);

            txtADSearchFor.Text = "";
        }
Ejemplo n.º 3
0
        public void Load(ResourcePlanning prnt, string rid, string resname, string pid, string roleid, string comment)
        {
            parent = prnt;
            resid  = rid;
            projid = pid;
            cbRole.SelectedIndex = -1;

            ////// POPULATE TITLE //////
            lblTitle.Text = "Edit Project Resource Info for " + resname;

            ////// POPULATE ROLES //////
            cbRole.ItemsSource = parent.dtRole.DefaultView;

            ////// SELECT ROLE IF THERE IS ONE //////
            if ((roleid != null) && (roleid != "") && (roleid != "0"))
            {
                string rolename = parent.getkey(parent.dtRole, "RoleName", "RoleID", roleid);
                parent.setDropdownFromValue(cbRole, "RoleName", rolename);
            }

            ////// PUT IN TEXT //////
            txtComments.Text = comment;
        }