private void ValidateDates() { if (Convert.ToDateTime(DtFrom.EditValue) < Convert.ToDateTime(GlobalVariables.FinYearStartDate) || Convert.ToDateTime(DtFrom.EditValue) > Convert.ToDateTime(GlobalVariables.FinYearEndDate)) { ProjectFunctions.SpeakError("From Date Is Out Of The Financial Year"); DtFrom.Focus(); } if (Convert.ToDateTime(DtEnd.EditValue) < Convert.ToDateTime(GlobalVariables.FinYearStartDate) || Convert.ToDateTime(DtEnd.EditValue) > Convert.ToDateTime(GlobalVariables.FinYearEndDate)) { ProjectFunctions.SpeakError("End Date Is Out Of The Financial Year"); DtFrom.Focus(); } }
private bool ValidateData() { if (txtDealerCode.Text.Trim().Length == 0) { ProjectFunctions.SpeakError("Invalid Dealer Name"); txtDealerCode.Focus(); return(false); } if (txtDealerName.Text.Trim().Length == 0) { ProjectFunctions.SpeakError("Invalid Dealer Name"); txtDealerCode.Focus(); return(false); } if (txtPrdAsgnCode.Text.Trim().Length == 0) { ProjectFunctions.SpeakError("Invalid Product Code"); txtPrdAsgnCode.Focus(); return(false); } if (txtProductName.Text.Trim().Length == 0) { ProjectFunctions.SpeakError("Invalid Product Code"); txtPrdAsgnCode.Focus(); return(false); } if (DtFrom.Text.Trim().Length == 0) { ProjectFunctions.SpeakError("Invalid From Date"); DtFrom.Focus(); return(false); } if (DtTo.Text.Trim().Length == 0) { ProjectFunctions.SpeakError("Invalid To Date"); DtTo.Focus(); return(false); } if (txtFor.Text.Length == 0) { txtFor.Text = "0"; } if (txtFree.Text.Length == 0) { txtFree.Text = "0"; } return(true); }
private bool ValidateData() { if (cmbFY.Text.Trim().Length == 0) { ProjectFunctions.SpeakError("Select Financial Year First"); cmbFY.Focus(); return(false); } if (DtFrom.Text.Trim().Length == 0) { ProjectFunctions.SpeakError("Invalid Financial Year Star Date"); DtFrom.Focus(); return(false); } if (DtEnd.Text.Trim().Length == 0) { ProjectFunctions.SpeakError("Invalid Financial Year End Date"); DtFrom.Focus(); return(false); } return(true); }