private void Search() { try { gvMRList.AutoGenerateColumns = false; bindMTNList.DataSource = objMRDL.Get_By_Manage(Convert.ToInt64(cmbDepartment.SelectedValue), (MR.Status)Enum.Parse(typeof(MR.Status), cmbStatus.SelectedValue.ToString()), dtTo.Value, dtFrom.Value); } catch (Exception ex) { MessageBox.Show(this, "Error ooccured while loading Material Requisitions", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }