public LogIn() { InitializeComponent(); try { dt = new DataTable(); db = new BDATOS(".\\ALQUILERDECARROS.accdb"); dt = db.buscar("*", "EMPLEADOS", ""); db.cerrar(); db.limpiar(); } catch(Exception ex) { MessageBox.Show(ex.Message); } }
public PPL(Form f1, string ci) { this.F1 = f1; this.userCI = ci; InitializeComponent(); box_user.BackColor = System.Drawing.Color.White; try { db = new BDATOS("|DataDirectory|\\ALQUILERDECARROS.accdb"); box_user.Text = db.buscar("ape+', '+nom AS nombre", "EMPLEADOS", "WHERE ci='" + ci + "'").Rows[0].ItemArray[0].ToString().ToUpper(); } catch(Exception ex) { MessageBox.Show(ex.Message); } finally { //db.insertar("EMPLEADOS", "marcano,agente,3489436,123456,porlamar,19-05-2014,18-10-1983,maria,porlamar,Femenino,7500,02952642303,mari"); db.cerrar(); db.limpiar(); } }