Beispiel #1
0
        public void GuardarExpediente(Expediente nuevoExpediente)
        {
            ConexionBD conexionBD = new ConexionBD();

            using (SqlConnection sqlConnection = conexionBD.GetConnection())
            {
                sqlConnection.Open();
                using (SqlCommand sqlCommand = new SqlCommand("INSERT INTO Expediente VALUES(@id, @asignacion, @horas)", sqlConnection))
                {
                    sqlCommand.Parameters.Add(new SqlParameter("id", null));
                    sqlCommand.Parameters.Add(new SqlParameter("asignacion", nuevoExpediente.FechaAsignacion));
                    sqlCommand.Parameters.Add(new SqlParameter("horas", nuevoExpediente.TotalHorasRegistradas));

                    try
                    {
                        sqlCommand.ExecuteNonQuery();
                    }
                    catch (Exception ex)
                    {
                        throw ex;
                    }
                }
                conexionBD.CloseConnection();
            }
        }
Beispiel #2
0
 public void registrarExpediente(Expediente expediente)
 {
     throw new NotImplementedException();
 }
Beispiel #3
0
 public void modificarExpediente(Expediente expediente)
 {
     throw new NotImplementedException();
 }