public static void Set_ComboBox(string Query, string row, ComboBox box) { try { dbConnector db = new dbConnector(); db.createConn(); conn = db.masterConn; conn.Open(); SqlCommand comm = new SqlCommand(Query, conn); myreader = comm.ExecuteReader(); box.Items.Clear(); if (myreader.HasRows) { while (myreader.Read()) { box.Items.Add(myreader[row]); } } } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { if (myreader != null) { myreader.Close(); } conn.Close(); } }
public TambahPenggunaanTunai() { InitializeComponent(); dbConnector db = new dbConnector(); db.createConn(); conn = db.masterConn; }
public FormDataRelawan() { InitializeComponent(); dbConnector db = new dbConnector(); db.createConn(); conn = db.masterConn; }
public FormTambahTunai() { InitializeComponent(); dbConnector db = new dbConnector(); db.createConn(); conn = db.masterConn; }
public FormGantiPassword() { InitializeComponent(); dbConnector db = new dbConnector(); db.createConn(); conn = db.masterConn; }
public PenggunaanDanaLogistik() { InitializeComponent(); dbConnector db = new dbConnector(); db.createConn(); conn = db.masterConn; }
public EditTempat() { InitializeComponent(); dbConnector db = new dbConnector(); db.createConn(); conn = db.masterConn; }
public FormLogin() { InitializeComponent(); dbConnector db = new dbConnector(); db.createConn(); sqlConn = db.masterConn; }
public Laporan() { InitializeComponent(); dbConnector db = new dbConnector(); db.createConn(); conn = db.masterConn; }