public void SP_DELETAR_PROGRAMACAO(int Codigo) { Database db = null; Queue<SqlParameter> qParameters = null; DAL.Entidades.Programacao retorno = new Entidades.Programacao(); try { db = new Database(); CreateParameters(ref qParameters, new Property() { NomeCampo = "Codigo", Value = Codigo }); db.ExecuteNonQuery("SP_DELETAR_PROGRAMACAO", ref qParameters); } catch (Exception ex) { throw ex; } }
public DAL.Entidades.Programacao SP_SELECIONAR_PROGRAMACAO(int Codigo) { Database db = null; Queue<SqlParameter> qParameters = null; DAL.Entidades.Programacao retorno = new Entidades.Programacao(); try { db = new Database(); CreateParameters(ref qParameters, new Property() { NomeCampo = "Codigo", Value = Codigo }); List<DAL.Entidades.Programacao> rMapping = Mapping.Mapping<DAL.Entidades.Programacao>.ConvertReaderToIEnumerable( db.ExecuteDataReader("SP_SELECIONAR_PROGRAMACAO", ref qParameters)).ToList(); if (rMapping.ToList().Count > 0) retorno = rMapping.ElementAt(0); } catch (Exception ex) { throw ex; } return retorno; }