Esempio n. 1
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            if (this.CompanyID.GetCheckedValues().Length == 0)
            {
                Mess.Info("Please select at least one company!");
                CompanyID.ShowPopup();
                return;
            }
            if (this.LocationID.GetCheckedValues().Length == 0)
            {
                Mess.Info("Please select at least one location!");
                LocationID.ShowPopup();
                return;
            }
            if (DateFrom.EditValue == null || DateFrom.DateTime == DateTime.MinValue)
            {
                Mess.Info("Please select a Period From!");
                DateFrom.ShowPopup();
                return;
            }
            if (DateTo.EditValue == null || DateTo.DateTime == DateTime.MinValue)
            {
                Mess.Info("Please select a Period To!");
                DateTo.ShowPopup();
                return;
            }

            this.DialogResult = System.Windows.Forms.DialogResult.Yes;
            this.Close();
        }