private void BtnOk_Click(object sender, EventArgs e) { if (TxtFromDate.Text == " / /") { MessageBox.Show("From Date Cannot Left Blank...!", "Mr Solution", MessageBoxButtons.OK, MessageBoxIcon.Information); TxtFromDate.Focus(); return; } else if (TxtToDate.Text == " / /") { MessageBox.Show("To Date Cannot Left Blank...!", "Mr Solution", MessageBoxButtons.OK, MessageBoxIcon.Information); TxtToDate.Focus(); return; } ButtonAction = "OK"; this.Close(); }
private void TxtToDate_Validating(object sender, System.ComponentModel.CancelEventArgs e) { if (_Tag == "" || ActiveControl == TxtToDate) { return; } if (TxtToDate.Text != " / /") { TxtToMiti.Text = _objDate.GetMiti(Convert.ToDateTime(TxtToDate.Text)); } else { MessageBox.Show("Please enter valid date.", "Mr. Solutions", MessageBoxButtons.OK, MessageBoxIcon.Error); TxtToDate.Focus(); } }
private void BtnOk_Click(object sender, EventArgs e) { if (TxtFromDate.Text == " / /") { MessageBox.Show("From Date Cannot Left Blank...!", "Mr Solution", MessageBoxButtons.OK, MessageBoxIcon.Information); TxtFromDate.Focus(); return; } else if (TxtToDate.Text == " / /") { MessageBox.Show("To Date Cannot Left Blank...!", "Mr Solution", MessageBoxButtons.OK, MessageBoxIcon.Information); TxtToDate.Focus(); return; } if (ChkSelectAll.Checked == false) { TagList frm = new TagList("Report.GeneralledgerList", "Ledger List", ""); if (TagList.dt.Rows.Count > 0) { frm.ShowDialog(); for (int i = 0; i < frm.SelectedList.Count; i++) { _LedgerId = _LedgerId + "," + frm.SelectedList[i]["LedgerId"].ToString(); } } else { MessageBox.Show("No List Available in Ledger.", "Mr. Solution", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } } else { _LedgerId = ""; } ButtonAction = "OK"; this.Close(); }
protected void TxtToDate_TextChanged(object sender, EventArgs e) { try { if (TxtFromDate.Text != "") { if (Convert.ToDateTime(Conn.ConvertDate(TxtToDate.Text)) < Convert.ToDateTime(Conn.ConvertDate(TxtFromDate.Text))) { WebMsgBox.Show("To Date cannot be greater than From Date....!", this.Page); TxtToDate.Text = ""; TxtToDate.Focus(); } else { TxtBRCD.Focus(); } } } catch (Exception Ex) { ExceptionLogging.SendErrorToText(Ex); } }