private void ListSubDocumentReceiver() { try { grdList.Rows.Clear(); SubDocumentReceiverDB drdb = new SubDocumentReceiverDB(); List <subdocreceiver> DocumentReceivers = drdb.getsubdocreceiverList(); foreach (subdocreceiver drrec in DocumentReceivers) { grdList.Rows.Add(); grdList.Rows[grdList.Rows.Count - 1].Cells["RowID"].Value = drrec.RowID; grdList.Rows[grdList.Rows.Count - 1].Cells["DocumentID"].Value = drrec.DocumentID; grdList.Rows[grdList.Rows.Count - 1].Cells["DocumentName"].Value = drrec.DocumentName; grdList.Rows[grdList.Rows.Count - 1].Cells["EmployeeID"].Value = drrec.EmployeeID; grdList.Rows[grdList.Rows.Count - 1].Cells["Employee"].Value = drrec.EmployeeName; grdList.Rows[grdList.Rows.Count - 1].Cells["SubDocumentID"].Value = drrec.SubDocID; grdList.Rows[grdList.Rows.Count - 1].Cells["Status"].Value = getDocStatusString(drrec.Status); } } catch (Exception ex) { MessageBox.Show(this.ToString() + "-" + System.Reflection.MethodBase.GetCurrentMethod().Name + "() : Error"); } enableBottomButtons(); pnlDocumentList.Visible = true; }