private void btnguardar_Click(object sender, EventArgs e) { string i = txtfini.Text; string f = txtffinal.Text; DateTime x = Convert.ToDateTime(i); DateTime y = Convert.ToDateTime(f); operaciones oper = new operaciones(); oper.consultasinreaultado("insert into cabecera_nomina(nomina_id,nombre_empresa,tipo_nomina,fecha_inicio,fecha_final) values('" + txtnid.Text + "','" + txtnombreemp.Text + "','" + txttipono.Text + "','" + txtfini + "','" + txtffinal + "')"); }
private void btnguardar_Click(object sender, EventArgs e) { try { if (string.IsNullOrEmpty(txtape.Text)) { MessageBox.Show("Favor ingrese el Apellido del ampleado antes!"); } else { string start = Convert.ToString(txtfoto.Text); string end = @"C:\bdd\" + txtape.Text + ".jpg"; File.Copy(start, end); } string photo = txtape.Text; operaciones oper = new operaciones(); oper.consultasinreaultado("insert into empleado(nombre,apellido,cedula,sexo,fecha_naci,fecha_ingr,foto) values('" + txtnom.Text + "','" + txtape.Text + "','" + txtcedula.Text + "','" + texsex.Text + "','" + txtnacimiento.Text + "','" + txtingreso.Text + "','" + photo + "')"); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void btnguardcargo_Click(object sender, EventArgs e) { operaciones oper = new operaciones(); oper.consultasinreaultado("insert into cargo(cargo,sueldo,Empleado_empleado_id) values('" + txtcargo.Text + "','" + txtsueldo.Text + "','" + txtidemplecargo.Text + "')"); }
private void btnguarnomina_Click(object sender, EventArgs e) { operaciones oper = new operaciones(); oper.consultasinreaultado("insert into detalle_nomina(i_s_r,deduccion_ss,otros,total_deduc,sueldo_neto,fecha,Empleado_empleado_id) values('" + txtisr.Text + "','" + txtdeducionss.Text + "','" + txtotros.Text + "','" + txtdeducciontt.Text + "','" + txtsueldoneto.Text + "','" + txtfechanomina.Text + "','" + txtidempleadonomina.Text + "')"); }