I have a LoadData function according to the search criteria and make girdview, I want to export data to excel from this girdview the path they have chosen.This is LoadData function
C#
private void LoadData(string idPB, string StartDate, string ToDate)
{
hmweb.Services.cChuyenMuc mChiPhi = new hmweb.Services.cChuyenMuc();
DataTable dtb = new DataTable();
dtb = mChiPhi.ChiPhi_Search(idPB, StartDate, ToDate);
if (dtb.Rows.Count > 0)
{
pnlDanhSach.GroupingText = "Tìm th?y " + dtb.Rows.Count.ToString() + " mã chi phí";
grvDanhSach.DataSource = dtb;
grvDanhSach.DataBind();
//ViewState["dtList"] = dtb;
}
else
{
pnlDanhSach.GroupingText = "Tìm th?y 0 mã chi phí";
}
mChiPhi = null;
}and this is Find
TypeScript
protected void lbtFind_Click(object sender, EventArgs e)
{
grvDanhSach.DataSource = null;
grvDanhSach.DataBind();
LoadData(cboPhongBan.SelectedValue, txtStartDate.Text.ToString(), txtToDate.Text.ToString());
}he program is written in asp.net c #. Does anyone know detailed help. Thank you
1 short reply
Cao Cu Hao15 pointsPosted Dec 8, 2014, 9:08 PM EST