private void BindFeesPaidDetailsGrid() { try { EWA_PayFees objEWA = new EWA_PayFees(); BL_PayFees objBL = new BL_PayFees(); string strValue = txtStudentId.Text; txtStudentId.Text = strValue; objEWA.StudentCode = strValue; DataSet ds = objBL.BindStudentFeesPaidDetails_BL(objEWA); if (ds.Tables[0].Rows.Count == 0 || ds == null) { ds.Tables[0].Rows.Add(ds.Tables[0].NewRow()); grdFees.DataSource = ds; grdFees.DataBind(); int columncount = grdFees.Rows[0].Cells.Count; grdFees.Rows[0].Cells.Clear(); grdFees.Rows[0].Cells.Add(new TableCell()); grdFees.Rows[0].Cells[0].ColumnSpan = columncount; grdFees.Rows[0].Cells[0].Text = "No Records Found"; } else { grdFees.DataSource = ds; grdFees.DataBind(); } } catch (Exception exp) { } }
//StudentFeesPaidDetails #region [Fee Paid Details] private void BindFeesPaidDetailsGrid() { try { EWA_PayFees objEWA = new EWA_PayFees(); BL_PayFees objBL = new BL_PayFees(); objEWA.StudentCode = Session["UserCode"].ToString(); DataSet ds = objBL.BindStudentFeesPaidDetails_BL(objEWA); if (ds.Tables[0].Rows.Count == 0 || ds == null) { ds.Tables[0].Rows.Add(ds.Tables[0].NewRow()); GrdFeesPaidDetails.DataSource = ds; GrdFeesPaidDetails.DataBind(); int columncount = GrdFeesPaidDetails.Rows[0].Cells.Count; GrdFeesPaidDetails.Rows[0].Cells.Clear(); GrdFeesPaidDetails.Rows[0].Cells.Add(new TableCell()); GrdFeesPaidDetails.Rows[0].Cells[0].ColumnSpan = columncount; GrdFeesPaidDetails.Rows[0].Cells[0].Text = "No Records Found"; } else { DataView dv = ds.Tables[0].DefaultView; dv.Sort = "ReceiptNo desc"; GrdFeesPaidDetails.DataSource = dv; GrdFeesPaidDetails.DataBind(); } } catch (Exception exp) { GeneralErr(exp.Message.ToString()); } }