public static int Insert(SexoInfo _SexoInfo) { //Execute the query and return the new Guid object retval= _AdoHelper.ExecuteScalar(ConnectionString,"SexoInsert", new SqlParameter("@Descripcion", _SexoInfo.Descripcion), new SqlParameter("@Download", _SexoInfo.Download), new SqlParameter("@Action", _SexoInfo.Action), new SqlParameter("@SyncID", _SexoInfo.SyncID) ); return Int32.Parse(retval.ToString()); }
public static void Update(SexoInfo _SexoInfo) { _AdoHelper.ExecuteNonQuery(ConnectionString,CommandType.StoredProcedure, "SexoUpdate", new SqlParameter("@Cod_Sexo", _SexoInfo.Cod_Sexo), new SqlParameter("@Descripcion", _SexoInfo.Descripcion), new SqlParameter("@Download", _SexoInfo.Download), new SqlParameter("@Action", _SexoInfo.Action), new SqlParameter("@SyncID", _SexoInfo.SyncID) ); }
public static void Delete(SexoInfo _SexoInfo) { _AdoHelper.ExecuteNonQuery(ConnectionString,CommandType.StoredProcedure, "SexoDelete", new SqlParameter("@Cod_Sexo", _SexoInfo.Cod_Sexo) ); }
/// <summary> /// Creates a new instance of the Sexo class and populates it with data from the specified SqlDataReader. /// </summary> private static SexoInfo MakeSexo(SqlDataReader dataReader) { SexoInfo sexo = new SexoInfo(); if (dataReader.IsDBNull(Cod_Sexo) == false) sexo.Cod_Sexo = dataReader.GetInt32(Cod_Sexo); if (dataReader.IsDBNull(Descripcion) == false) sexo.Descripcion = dataReader.GetString(Descripcion); if (dataReader.IsDBNull(Download) == false) sexo.Download = dataReader.GetDateTime(Download); if (dataReader.IsDBNull(Action) == false) sexo.Action = dataReader.GetString(Action); if (dataReader.IsDBNull(SyncID) == false) sexo.SyncID = dataReader.GetGuid(SyncID); if (dataReader.IsDBNull(SyncTimeStamp) == false) sexo.SyncTimeStamp = DateTime.MinValue; return sexo; }