public void Edit(string projid, string pmid, string wsid, string projname, string projdesc)
        {
            txtDescription.Text = projdesc;
            txtName.Text        = projname;
            lblTitle.Text       = "Edit Project";

            cbProjectManager.SelectedIndex = -1;
            cbWorkstream.SelectedIndex     = -1;

            parent.setDropdownFromValue(cbProjectManager, "ResourceID", pmid);
            parent.setDropdownFromValue(cbWorkstream, "WorkstreamID", wsid);

            s_projid = projid;
            eMode    = mode.edit;
        }
        public void Edit(string resid, string name)
        {
            lblTitle.Text = "Edit " + name;
            txtName.Text  = name;

            string title      = parent.getkey(parent.dtResources, "ResourceTitle", "ResourceID", resid);
            string mgrid      = parent.getkey(parent.dtResources, "ResourceManagerID", "ResourceID", resid);
            string department = parent.getkey(parent.dtResources, "ResourceDepartment", "ResourceID", resid);
            string ismgr      = parent.getkey(parent.dtResources, "IsManager", "ResourceID", resid);
            string isres      = parent.getkey(parent.dtResources, "IsResource", "ResourceID", resid);
            string ispm       = parent.getkey(parent.dtResources, "IsPM", "ResourceID", resid);

            if (mgrid != null)
            {
                string mgrname = parent.getkey(parent.dtResources, "ResourceName", "ResourceID", mgrid);
                parent.setDropdownFromValue(cbManager, "ResourceName", mgrname);
            }

            txtTitle.Text = title;

            parent.setDropdownFromValue(cbDepartment, "DepartmentName", department);

            rectManager.Opacity  = (ismgr == "True") ? 1d : .2d;
            rectResource.Opacity = (isres == "True") ? 1d : .2d;
            rectPM.Opacity       = (ispm == "True") ? 1d : .2d;
            eMode            = mode.edit;
            ResourceID       = resid;
            gridOuter.Height = 300d;
            btnAD.Visibility = System.Windows.Visibility.Visible;
        }
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;
        }