private void SetSelectedObjectList() { try { SelectedProductSubTypeList.Clear(); System.Int32 iProductSubTypeCount = checkListPartSubType.Items.Count; for (System.Int32 i = 0; i < iProductSubTypeCount; i++) { if (checkListPartSubType.Items[i].CheckState == CheckState.Checked) { SelectedProductSubTypeList.Add((CProductSubType)checkListPartSubType.Items[i].Value); } } SelectedProductTypeList.Clear(); System.Int32 iProductTypeCount = checkListProductType.Items.Count; for (System.Int32 i = 0; i < iProductTypeCount; i++) { if (checkListProductType.Items[i].CheckState == CheckState.Checked) { SelectedProductTypeList.Add((CProductType)checkListProductType.Items[i].Value); } } SelectedProductTradeMarkList.Clear(); System.Int32 iProductTradeMarkCount = checkListProductTradeMark.Items.Count; for (System.Int32 i = 0; i < iProductTradeMarkCount; i++) { if (checkListProductTradeMark.Items[i].CheckState == CheckState.Checked) { SelectedProductTradeMarkList.Add((CProductTradeMark)checkListProductTradeMark.Items[i].Value); } } } catch (System.Exception f) { DevExpress.XtraEditors.XtraMessageBox.Show("Ошибка SetSelectedProductSubTypeList.\n\nТекст ошибки: " + f.Message, "Ошибка", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error); } finally { } return; }
private void btnCancelFilter_Click(object sender, EventArgs e) { try { UnCheckFilter(); SelectedProductSubTypeList.Clear(); SelectedProductTradeMarkList.Clear(); SelectedProductTypeList.Clear(); DialogResult = System.Windows.Forms.DialogResult.OK; Close(); } catch (System.Exception f) { DevExpress.XtraEditors.XtraMessageBox.Show("Ошибка btnCancelFilter_Click.\n\nТекст ошибки: " + f.Message, "Ошибка", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error); } finally { } return; }