Exemple #1
0
 private bool LValidateFilter()
 {
     try
     {
         bool LResult = true;
         if (RdRbtMonth.CheckState != CheckState.Unchecked && RdRbtYear.CheckState != CheckState.Unchecked && RdRbtDate.CheckState != CheckState.Unchecked)
         {
             ClsMessage._IClsMessage.ProjectExceptionMessage("Please Select Filter Type");
             RdRbtMonth.Focus();
             RdRbtMonth.CheckState = CheckState.Checked;
             LResult = false;
         }
         else if (RdDtpFrom.Value > RdDtpTo.Value)
         {
             ClsMessage._IClsMessage.ProjectExceptionMessage("From Date Cannot Be Grater Than To Date");
             RdDtpFrom.Focus();
             LResult = false;
         }
         else if (RdDtpTo.Value >= DateTime.Now)
         {
             ClsMessage._IClsMessage.ProjectExceptionMessage("To Date Should Be Less Than Current Date");
             RdDtpTo.Focus();
             LResult = false;
         }
         return(LResult);
     }
     catch (Exception ex)
     {
         ClsMessage._IClsMessage.ProjectExceptionMessage(ex);
         return(false);
     }
 }
Exemple #2
0
        private bool LValidateFilter()
        {
            try
            {
                DvBhavCopyCompany           = _DataSet.DefaultViewManager.CreateDataView(DtBhavCopyCompany);
                DvBhavCopyCompany.RowFilter = "Isnull(lSelect,0)=1";

                bool LResult = true;
                if (RdRbtMonth.CheckState != CheckState.Unchecked && RdRbtYear.CheckState != CheckState.Unchecked && RdRbtDate.CheckState != CheckState.Unchecked)
                {
                    ClsMessage._IClsMessage.ProjectExceptionMessage("Please Select Filter Type");
                    RdRbtMonth.Focus();
                    RdRbtMonth.CheckState = CheckState.Checked;
                    LResult = false;
                }
                else if (RdDtpFrom.Value > RdDtpTo.Value)
                {
                    ClsMessage._IClsMessage.ProjectExceptionMessage("From Date Cannot Be Gratter Than To Date");
                    RdDtpFrom.Focus();
                    LResult = false;
                }
                else if (DvBhavCopyCompany == null || DvBhavCopyCompany.Count <= 0)
                {
                    ClsMessage._IClsMessage.ProjectExceptionMessage("Please Select Company Name");
                    RdBtnReload.Focus();
                    LResult = false;
                }
                return(LResult);
            }
            catch (Exception ex)
            {
                ClsMessage._IClsMessage.ProjectExceptionMessage(ex);
                return(false);
            }
        }