コード例 #1
0
    protected void gridview_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        grd_customer.PageIndex = e.NewPageIndex;
        DataTable dt = Select_Logic.find_customer_pending_bill();

        grd_customer.DataSource = dt;
        grd_customer.DataBind();
    }
コード例 #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        DataTable dt = Select_Logic.find_customer_pending_bill();

        if (dt.Rows.Count > 0)
        {
            ReportDocument data = new ReportDocument();
            Customer_Pending_Amount_selling s = new Customer_Pending_Amount_selling();
            data.Load(Server.MapPath("Report_Customer_Pending_Amount_Selling.rpt")); //crystal report will be loaded in report document
            data.SetDataSource(dt);                                                  //all data will be filled in report from data table
            CrystalReportViewer1.ReportSource = data;                                //assign data in crystal report
        }
    }
コード例 #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["username"] == "")
        {
            Response.Redirect("LoginPage.aspx");
        }

        DataTable dt = Select_Logic.find_customer_pending_bill();

        dt.Columns.Add("dt_purchase_date");
        foreach (DataRow dr in dt.Rows)
        {
            dr["dt_purchase_date"] = Convert.ToDateTime(dr["purchase_date"]).ToString("dd/MM/yyyy");
        }
        grd_customer.DataSource = dt;
        grd_customer.DataBind();
    }