public EditarTarea_Response EditarTarea(EditarTarea_Req obj)
 {
     try
     {
         return(planificarDA.EditarTarea(obj));
     }
     catch (Exception)
     {
         throw;
     }
 }
        public EditarTarea_Response EditarTarea(EditarTarea_Req obj)
        {
            EditarTarea_Response retorno = new EditarTarea_Response();

            try
            {
                using (SqlConnection conection = new SqlConnection(ConfigurationManager.ConnectionStrings["cnxIndra"].ConnectionString))
                {
                    conection.Open();

                    using (SqlCommand command = new SqlCommand("[pa_spu_proyecto_tarea]", conection))
                    {
                        command.CommandType = CommandType.StoredProcedure;
                        command.Parameters.AddWithValue("@vi_nid_proyecto", obj.nid_proyecto);
                        command.Parameters.AddWithValue("@vi_nid_tarea", obj.nid_tarea);
                        command.Parameters.AddWithValue("@vi_nid_nivel", obj.nid_nivel);
                        command.Parameters.AddWithValue("@vi_no_codigo", obj.no_codigo);
                        command.Parameters.AddWithValue("@vi_no_nombre", obj.no_nombre);
                        command.Parameters.AddWithValue("@vi_fe_inicio", obj.fecha_inicio);
                        command.Parameters.AddWithValue("@vi_fe_fin", obj.fecha_fin);
                        command.Parameters.AddWithValue("@vi_po_real", obj.po_real);

                        using (SqlDataReader dr = command.ExecuteReader())
                        {
                            if (dr.HasRows)
                            {
                                while (dr.Read())
                                {
                                    if ((dr.GetInt32(dr.GetOrdinal("nid_retorno")) > 0))
                                    {
                                        retorno.respuesta   = 1;
                                        retorno.str_mensaje = dr.GetString(dr.GetOrdinal("msj_retorno"));
                                    }
                                    else
                                    {
                                        retorno.respuesta   = 0;
                                        retorno.str_mensaje = "No se editó la tarea, debido a que hubo error en los datos";
                                    }
                                }
                            }
                        }
                    }
                    conection.Close();
                }
                return(retorno);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
        }