Beispiel #1
0
    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.POProduksiBahanBakuDetail(DropDownListCariTempatPurchaseOrder.SelectedValue.ToInt(), null, 0, 0, 0, DropDownListCariStatusPurchaseOrder.SelectedValue.ToInt(), TextBoxCariKodePurchaseOrder.Text, DropDownListCariBahanBakuPurchaseOrder.SelectedValue.ToInt(), DropDownListCariSatuanPurchaseOrder.SelectedValue.ToInt(), DropDownListCariKategoriPurchaseOrder.SelectedValue.ToInt(), true);

            #region KONFIGURASI LAPORAN
            LabelPeriode.Text = Laporan_Class.Periode;

            //LinkDownloadPurchaseOrder.Visible = GenerateExcel;

            //if (LinkDownloadPurchaseOrder.Visible)
            //    LinkDownloadPurchaseOrder.HRef = Laporan_Class.LinkDownload;

            //ButtonPrintPurchaseOrder.OnClientClick = "return popitup('POProduksiBahanBakuDetailPrint.aspx" + Laporan_Class.TempPencarian + "')";
            #endregion

            RepeaterPurchaseOrder.DataSource = Result["Data"];
            RepeaterPurchaseOrder.DataBind();
            LabelGrandTotalPurchaseOrderHeader.Text = Result["Grandtotal"];
            LabelGrandTotalPurchaseOrderFooter.Text = LabelGrandTotalPurchaseOrderHeader.Text;
        }
    }