コード例 #1
0
    public void BindGrid()
    {
        try
        {
            DataTable DT  = new DataTable();
            string    FDT = "";
            string[]  DTF;

            DTF = TxtFDate.Text.ToString().Split('/');
            FDT = TxtFDate.Text.ToString();
            string[] DTT = TxtTDate.Text.ToString().Split('/');

            DT = AST.AccountStatment(DTF[1].ToString(), DTT[1].ToString(), DTF[2].ToString(), DTT[2].ToString(), FDT, TxtTDate.Text.Trim(), TxtAccno.Text, TxtAccType.Text, Session["MID"].ToString(), Session["BRCD"].ToString(), ViewState["GL"].ToString(), TxtBRCD.Text);
            if (DT.Rows.Count > 0)
            {
                GrdAccountSTS.DataSource = DT;
                GrdAccountSTS.DataBind();
            }
            else
            {
                WebMsgBox.Show("No Unclear Records Found...!!", this.Page);
                return;
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }
コード例 #2
0
    public void BindGrid()
    {
        try
        {
            DataTable DT = new DataTable();
            int       retrow;
            DT = CB.CreateCutBook(Session["UserName"].ToString(), ViewState["GL"].ToString(), TxtPType.Text, Session["BRCD"].ToString(), TxtTDate.Text);
            if (DT.Rows.Count > 0)
            {
            }

            if (DT != null)
            {
                if (DT.Rows.Count != 0)
                {
                    GrdAccountSTS.DataSource = DT;
                    GrdAccountSTS.DataBind();
                    retrow = DT.Rows.Count;
                }
                else
                {
                    DT.Rows.Add(DT.NewRow());
                    GrdAccountSTS.DataSource = DT;
                    GrdAccountSTS.DataBind();
                    int TotalColumns = GrdAccountSTS.Rows[0].Cells.Count;
                    GrdAccountSTS.Rows[0].Cells.Clear();
                    GrdAccountSTS.Rows[0].Cells.Add(new TableCell());
                    GrdAccountSTS.Rows[0].Cells[0].ColumnSpan      = TotalColumns;
                    GrdAccountSTS.Rows[0].Cells[0].HorizontalAlign = HorizontalAlign.Center;
                    GrdAccountSTS.Rows[0].Cells[0].Text            = "No Record Found";
                }
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }