Ejemplo n.º 1
0
    public void  BindGvBookDetail()
    {
        DataSet ds = new DataSet();

        ds = PettyCashEntry.Get_All_PettyCashDetals(val, val2);
        DataView dv = new DataView(ds.Tables[0]);

        // PettyCashEntry.Get_All_PettyCashDetals(FromDate, Todate);
        //DataView dv = new DataView(dt);

        gvAllPettyCash.DataSource = dv;
        gvAllPettyCash.DataBind();

        gvAllPettyCash.Visible = true;
    }
    public void BindAllPetty()
    {
        string FromDate = txtFrom.Text.Split('/')[1] + "/" + txtFrom.Text.Split('/')[0] + "/" + txtFrom.Text.Split('/')[2];
        //FromDate = Convert.ToString(date);

        string Todate = txtTo.Text.Split('/')[1] + "/" + txtTo.Text.Split('/')[0] + "/" + txtTo.Text.Split('/')[2];
        //Todate = Convert.ToString(Todate2);

        DataSet ds = new DataSet();

        ds = PettyCashEntry.Get_All_PettyCashDetals(FromDate, Todate);
        if (ds.Tables[0].Rows.Count != 0)
        {
            gvAllPettyCash.DataSource = ds;
            gvAllPettyCash.DataBind();
            gvAllPettyCash.Visible = true;
        }
        else
        {
            message("Record not found");
        }
    }