//------------------ Methods ------------------------------- public void Clear() { txtDate.Text = ""; txtDepartment.Text = ""; txtMRNo.Text = ""; txtRemarks.Text = ""; txtReqestBy.Text = ""; txtType.Text = ""; bindItemList.DataSource = null; objMR = null; try { Department objDep = objDepDL.Get(Convert.ToInt64(cmbDepartment.SelectedValue)); if (rbInitial.Checked) { bindMRList.DataSource = objMRDL.GetMR_ToDep_or_ToStore(objDep.DepID, MR.Status.Initial, MR.Origin.ToBatch); } else if (rbApproved.Checked) { bindMRList.DataSource = objMRDL.GetMR_ToDep_or_ToStore(objDep.DepID, MR.Status.Approved, MR.Origin.ToBatch); } } catch (Exception ex) { MessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }