ComboBox cmb = this.Controls.OfType<ComboBox>().Where(c => c.GetType() == typeof(ComboBox) &&
c.Name != {{콤보박스1}}.Name &&
c.Name != {{콤보박스2}}.Name &&
c.Name != {{콤보박스3}}.Name &&
c.SelectedIndex == 0).OrderBy(c => c.TabIndex).FirstOrDefault();
if (cmb != null)
{
MessageBox.Show("필수 항목을 선택해 주세요.");
cmb.Focus();
return;
}
'Web_Application > C#' 카테고리의 다른 글
ERROR: should be excluded because its source file '' is under Windows System File Protection. (When Building MSI) (0) | 2019.09.03 |
---|---|
[c#][linq][winform] combobox query foreach get index, value (0) | 2019.04.23 |
[c#][winform] textbox 숫자만 입력 받기 (0) | 2019.04.18 |
[c#][winform] To Set Maximize / Minimize Button Enable/Disable (0) | 2019.04.17 |
[regex][mssql] INSERT SELECT, SELECT (0) | 2018.12.14 |