private void InitDDLPengajuanService() { SqlConnection conn = Common.getConnection(); string query = ""; SqlCommand cmd = new SqlCommand(); cmd.Connection = conn; cmd.CommandType = System.Data.CommandType.Text; query = "select id_pengajuan_service, no_pengajuan_service from t_pengajuan_service where status_konfirmasi = 1 order by id_pengajuan_service desc"; cmd.CommandText = query; conn.Open(); SqlDataReader reader = cmd.ExecuteReader(); DDLReferensiPengajuan.DataSource = reader; DDLReferensiPengajuan.DataValueField = "id_pengajuan_service"; DDLReferensiPengajuan.DataTextField = "id_pengajuan_service"; DDLReferensiPengajuan.DataBind(); ListItem item = new ListItem(); DDLReferensiPengajuan.Items.Insert(0, item); conn.Close(); }
private void InitDDLPengajuanBarang() { SqlConnection conn = Common.getConnection(); string query = ""; SqlCommand cmd = new SqlCommand(); cmd.Connection = conn; cmd.CommandType = System.Data.CommandType.Text; query = "select id_pengajuan, judul_pengajuan, (id_pengajuan + ' - '+judul_pengajuan) as title from t_pengajuan_inventaris where status_konfirmasi = 1 and is_sudah_beli is null order by id_pengajuan desc"; cmd.CommandText = query; conn.Open(); SqlDataReader reader = cmd.ExecuteReader(); DDLReferensiPengajuan.DataSource = reader; DDLReferensiPengajuan.DataValueField = "id_pengajuan"; DDLReferensiPengajuan.DataTextField = "title"; DDLReferensiPengajuan.DataBind(); ListItem item = new ListItem(); DDLReferensiPengajuan.Items.Insert(0, item); conn.Close(); }
private void InitDDLPengajuanBarang() { SqlConnection conn = Common.getConnection(); string query = ""; SqlCommand cmd = new SqlCommand(); cmd.Connection = conn; cmd.CommandType = System.Data.CommandType.Text; query = "select id, no_pengajuan from t_pengajuan_inventaris where status_approval = 1 order by id desc"; cmd.CommandText = query; conn.Open(); SqlDataReader reader = cmd.ExecuteReader(); DDLReferensiPengajuan.DataSource = reader; DDLReferensiPengajuan.DataValueField = "id"; DDLReferensiPengajuan.DataTextField = "no_pengajuan"; DDLReferensiPengajuan.DataBind(); ListItem item = new ListItem(); DDLReferensiPengajuan.Items.Insert(0, item); conn.Close(); }
private void InitDDLPengajuanBarang() { SqlConnection conn = Common.getConnection(); string query = ""; SqlCommand cmd = new SqlCommand(); cmd.Connection = conn; cmd.CommandType = System.Data.CommandType.Text; query = "select id_pembelian, no_pembelian from t_pembelian where id_pembelian not in(select id_pembelian from t_penerimaan where id_pembelian is not null) order by no_pembelian desc"; cmd.CommandText = query; conn.Open(); SqlDataReader reader = cmd.ExecuteReader(); DDLReferensiPengajuan.DataSource = reader; DDLReferensiPengajuan.DataValueField = "id_pembelian"; DDLReferensiPengajuan.DataTextField = "id_pembelian"; DDLReferensiPengajuan.DataBind(); ListItem item = new ListItem(); DDLReferensiPengajuan.Items.Insert(0, item); conn.Close(); }