public UCProjectPicker(DEProject prjObj) : this() { this.curInput = prjObj; this.InitProjectHeader(); this.LoadProjectData(); }
private void ucUser_ProjectSelected(DEProject prjObj) { bool flag = false; if (base.Tag == null) { if (this.curInput != null) { if (prjObj.ProductOid != this.curInput.ProductOid) { flag = true; } } else { flag = true; } } this.curInput = prjObj; this.SetEditText(prjObj); if (flag && (this.DropListChanged != null)) { this.DropListChanged(prjObj); base.CloseEditorButtonDropDowns(); } }
public string GetValue() { string str = ""; string str2 = "false"; string str3 = "SearchInProject("; if (this.chkInPrj.Checked) { str2 = "true"; } if (this.lv_projects.CheckedItems.Count == 0) { str = " "; } else { DEProject tag = this.lv_projects.CheckedItems[0].Tag as DEProject; str = tag.Oid.ToString(); } if (string.IsNullOrEmpty(str)) { return(""); } string str4 = str3; return(str4 + str2 + "," + str + ")"); }
public void ReLoad(DEProject prjObj) { if (prjObj != null) { this.curInput = prjObj; this.LocationPrjData(prjObj); } }
private void SetEditText(DEProject prjObj) { if (prjObj != null) { this._locValue = prjObj.Name + "(" + prjObj.ID + ")"; this.Text = prjObj.Name + "(" + prjObj.ID + ")"; } }
private void btn_ok_Click(object sender, EventArgs e) { if (this.ProjectSelected != null) { DEProject projectObject = this.GetProjectObject(); if (projectObject == null) { MessageBoxPLM.Show("请选择项目", "项目选择", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); return; } this.ProjectSelected(projectObject); } this.CloseParent(); }
private void LocationPrjData(string strPrjOid) { if (this.lv_projects.Items.Count != 0) { foreach (ListViewItem item in this.lv_projects.Items) { DEProject tag = item.Tag as DEProject; if (tag.Oid.ToString() == strPrjOid) { item.Checked = true; } else { item.Checked = false; } } } }
public void SetInput(Guid g_oid) { DEProject projectByMasterOid = PLProject.Agent.GetProjectByMasterOid(ClientData.LogonUser.Oid, g_oid); if (projectByMasterOid == null) { PLProject project2 = new PLProject(); foreach (DEProject project3 in project2.GetAllProjects(ClientData.LogonUser.Oid)) { if (project3.Moid == g_oid) { projectByMasterOid = project3; break; } } } this.curInput = projectByMasterOid; this.SetEditText(projectByMasterOid); }
private void LocationPrjData(DEProject PrjObj) { if (this.lv_projects.Items.Count != 0) { if (base.Width > 280) { this.lv_projects.Columns[2].Width = base.Width - 200; } foreach (ListViewItem item in this.lv_projects.Items) { DEProject tag = item.Tag as DEProject; if (tag.ProductOid == PrjObj.ProductOid) { item.Selected = true; } else { item.Selected = false; } } } }