Value of '01/01/0001 12:00:00 AM is not valid for 'value'.'Value'Should be between 'MinDate'and 'MaxDate'.<br /> Parameter name:Value
private void Find() { BOEmployee oBOEmployee = new BOEmployee(); DataTable dt = oBOEmployee.List_Find(txtEName.Text.Trim()); if (dt.Rows.Count > 0) { BindEmployeeData(dt); } else { MessageBox.Show("No Record Found"); Search oSearch = new Search(); oSearch.strSQL = "buson_getEmployee_innerjoin"; oSearch.Text = "List of Items"; oSearch.ShowDialog(); if (oSearch.sChoose) { txtEID.Text = oSearch.dgvfind.Rows[oSearch.sChooseRow].Cells["EmpId"].Value.ToString(); txtEName.Text = oSearch.dgvfind.Rows[oSearch.sChooseRow].Cells["EmpName"].Value.ToString(); cbPosition.Text = oSearch.dgvfind.Rows[oSearch.sChooseRow].Cells["Position"].Value.ToString(); cbDepartment.Text = oSearch.dgvfind.Rows[oSearch.sChooseRow].Cells["Department"].Value.ToString(); cbBranch.Text = oSearch.dgvfind.Rows[oSearch.sChooseRow].Cells["Branch"].Value.ToString(); cmbSalary.Text = oSearch.dgvfind.Rows[oSearch.sChooseRow].Cells["SalaryStructure"].Value.ToString(); if (oSearch.dgvfind.Rows[oSearch.sChooseRow].Cells["Status"].Value.ToString() == "Deactive") { cbActive.Checked = false; RelivingDate.Text = oSearch.dgvfind.Rows[oSearch.sChooseRow].Cells["RelivingDate"].Value.ToString(); } else { cbActive.Checked = true; RelivingDate.Text = "01/01/0001 12:00:00 AM"; } txtPhone.Text = oSearch.dgvfind.Rows[oSearch.sChooseRow].Cells["phone"].Value.ToString(); txtMailId.Text = oSearch.dgvfind.Rows[oSearch.sChooseRow].Cells["MailId"].Value.ToString(); txtAddress.Text = oSearch.dgvfind.Rows[oSearch.sChooseRow].Cells["Address"].Value.ToString(); } }
RelivingDate.Text = "01/01/0001 12:00:00 AM";
RelivingDate.Text = "01/01/1890 12:00:00 AM";
RelivingDate.Text = DateTime.MinValue.ToString("MM/dd/yyyy hh:mm tt");
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)