private void TextBoxCaseId_TextChanged(object sender, TextChangedEventArgs e) { if (TextBoxCaseId.Text.Count() > 6) { string id = TextBoxCaseId.Text; id = id.Remove(id.Length - 1); TextBoxCaseId.Text = id; TextBoxCaseId.Select(TextBoxCaseId.Text.Length, 0); } if (CBZ.TempProject.Case.ToString() != TextBoxCaseId.Text) { if (TextBoxCaseId.Text.Count() >= 1) { ChecknewCaseIdCorrect(); if (newCaseIdCorrect) { Int32.TryParse(TextBoxCaseId.Text, out int caseId); CBZ.TempProject.Case = caseId; } else { CBZ.TempProject.Case = 0; } //Set CBZ.UcMainEdited if (!CBZ.UcMainEdited) { CBZ.UcMainEdited = true; } } } }
private void TextBoxCaseId_SelectionChanged(object sender, RoutedEventArgs e) { if (TextBoxCaseId.Text.Count() > 6) { string id = TextBoxCaseId.Text; id = id.Remove(id.Length - 1); TextBoxCaseId.Text = id; TextBoxCaseId.Select(TextBoxCaseId.Text.Length, 0); } }
private void TextBoxCaseId_TextChanged(object sender, TextChangedEventArgs e) { if (TextBoxCaseId.Text.Count() > 6) { string id = TextBoxCaseId.Text; id = id.Remove(id.Length - 1); TextBoxCaseId.Text = id; TextBoxCaseId.Select(TextBoxCaseId.Text.Length, 0); } Bizz.TempProject.CaseId = Convert.ToInt32(TextBoxCaseId.Text); }
private void TextBoxCaseId_TextChanged(object sender, TextChangedEventArgs e) { if (TextBoxCaseId.Text.Count() > 6) { string id = TextBoxCaseId.Text; id = id.Remove(id.Length - 1); TextBoxCaseId.Text = id; TextBoxCaseId.Select(TextBoxCaseId.Text.Length, 0); } CBZ.TempProject.Case = Convert.ToInt32(TextBoxCaseId.Text); //Set CBZ.UcMainEdited if (!CBZ.UcMainEdited) { CBZ.UcMainEdited = true; } }