private void LoadData(bool GenerateExcel) { //DEFAULT TextBoxTanggalAwal.Text = ((DateTime)ViewState["TanggalAwal"]).ToString("d MMMM yyyy"); TextBoxTanggalAkhir.Text = ((DateTime)ViewState["TanggalAkhir"]).ToString("d MMMM yyyy"); using (DataClassesDatabaseDataContext db = new DataClassesDatabaseDataContext()) { Laporan_Class Laporan_Class = new Laporan_Class(db, (PenggunaLogin)Session["PenggunaLogin"], (DateTime)ViewState["TanggalAwal"], (DateTime)ViewState["TanggalAkhir"], GenerateExcel); var Result = Laporan_Class.POProduksiProdukRetur(DropDownListCariTempat.SelectedValue.ToInt(), TextBoxCariID.Text, DropDownListCariVendor.SelectedValue.ToInt(), DropDownListCariPengguna.SelectedValue.ToInt(), TextBoxCariKeterangan.Text); #region KONFIGURASI LAPORAN LabelPeriode.Text = Laporan_Class.Periode; //LinkDownload.Visible = GenerateExcel; //if (LinkDownload.Visible) // LinkDownload.HRef = Laporan_Class.LinkDownload; //ButtonPrintPurchaseOrder.OnClientClick = "return popitup('PurchaseOrderRawMaterialPrint.aspx" + Laporan_Class.TempPencarian + "')"; #endregion RepeaterData.DataSource = Result["Data"]; RepeaterData.DataBind(); LabelGrandTotalHeader.Text = Result["Grandtotal"]; LabelGrandTotalFooter.Text = LabelGrandTotalHeader.Text; } }