protected void Page_Load(object sender, EventArgs e) { string memid = Request.QueryString["memid"]; //multiview / div di show / hide berdasarkan memid Koneksi cn = new Koneksi(); DataSet ds = new DataSet(); ds = cn.getDataSet("select * from KeranjangBelanja where Member_ID = " + Convert.ToInt32(memid) + ""); ListViewCekKeranjang.DataSource = ds; ListViewCekKeranjang.DataBind(); ListViewCekKeranjang.Visible = true; }
protected void BtnCekKeranjang_Click(object sender, EventArgs e) { //multiview / div di show / hide berdasarkan memid Koneksi cn = new Koneksi(); DataSet ds = new DataSet(); ds = cn.getDataSet("select * from KeranjangBelanja where Member_ID = " + Convert.ToInt32(memid) + ""); ListViewCekKeranjang.DataSource = ds; ListViewCekKeranjang.DataBind(); ListViewCekKeranjang.Visible = true; BtnBatalKeranjang.Visible = true; BtnCetak.Visible = true; //hide BtnSimpanKeranjang.Visible = false; ListViewHakAkses.Visible = false; TxtJumlah.Visible = false; }
protected void Search_Click(object sender, EventArgs e) { //***** GET DATASET Koneksi cn = new Koneksi(); DataSet ds = new DataSet(); string date1 = TxtAwal.Text; DateTime formattedtime1 = DateTime.ParseExact(date1, "dd/MM/yyyy", CultureInfo.InvariantCulture); string date2 = TxtAkhir.Text; DateTime formattedtime2 = DateTime.ParseExact(date2, "dd/MM/yyyy", CultureInfo.InvariantCulture); string sql = "Select * from Stock where TglDatang >= '" + date1 + "' and TglDatang <= '" + date2 + "' "; ds = cn.getDataSet(sql); ListViewMasterStock.DataSource = ds; ListViewMasterStock.DataBind(); }