private void textBox_SkillTeacher_DoubleClick(object sender, EventArgs e) { TextBox myTextBox = (TextBox)sender; Form_UserQuery myForm = new Form_UserQuery(); Class_CustomUser myClass_CustomUser = new Class_CustomUser(); if (!string.IsNullOrEmpty(myTextBox.Text)) { myClass_CustomUser.UserGUID = new Guid(myTextBox.Text.Split(':')[1]); if (myClass_CustomUser.FillData()) { } } myForm.myClass_CustomUser = myClass_CustomUser; if (myForm.ShowDialog() == DialogResult.OK) { if (myForm.myClass_CustomUser != null && myForm.myClass_CustomUser.UserGUID != null) { myTextBox.Text = string.Format("{0}:{1}", myForm.myClass_CustomUser.Name, myForm.myClass_CustomUser.UserGUID.ToString()); } else { myTextBox.Text = ""; } } }
private void textBox_IssueProcessPrincipal_DoubleClick(object sender, EventArgs e) { Form_UserQuery myForm = new Form_UserQuery(); if (this.myClass_IssueProcess.IssueProcessPrincipal != null) { myForm.myClass_CustomUser = new Class_CustomUser(this.myClass_IssueProcess.IssueProcessPrincipal); } else { myForm.myClass_CustomUser = new Class_CustomUser(); } if (myForm.ShowDialog() == DialogResult.OK) { if (myForm.myClass_CustomUser.UserGUID != null) { this.myClass_IssueProcess.IssueProcessPrincipal = myForm.myClass_CustomUser.UserGUID; this.textBox_IssueProcessPrincipal.Text = string.Format("{0}:{1}", myForm.myClass_CustomUser.UserName, myForm.myClass_CustomUser.Name); } } }