Ejemplo n.º 1
0
Archivo: AreaDb.cs Proyecto: Avaruz/SGC
 public static void Update(AreaInfo _AreaInfo)
 {
     _AdoHelper.ExecuteNonQuery(ConnectionString,CommandType.StoredProcedure, "AreaUpdate",
         new SqlParameter("@AreaId", _AreaInfo.AreaId),
         new SqlParameter("@NombreArea", _AreaInfo.NombreArea)
     );
 }
Ejemplo n.º 2
0
Archivo: AreaDb.cs Proyecto: Avaruz/SGC
 public static int Insert(AreaInfo _AreaInfo)
 {
     //Execute the query and return the new Guid
     object retval= _AdoHelper.ExecuteScalar(ConnectionString,"AreaInsert",
         new SqlParameter("@NombreArea", _AreaInfo.NombreArea)
     );
     return Int32.Parse(retval.ToString());
 }
Ejemplo n.º 3
0
Archivo: AreaDb.cs Proyecto: Avaruz/SGC
        /// <summary>
        /// Creates a new instance of the Area class and populates it with data from the specified SqlDataReader.
        /// </summary>
        private static AreaInfo MakeArea(SqlDataReader dataReader)
        {
            AreaInfo area = new AreaInfo();

            if (dataReader.IsDBNull(AreaId) == false)
                area.AreaId = dataReader.GetInt32(AreaId);
            if (dataReader.IsDBNull(NombreArea) == false)
                area.NombreArea = dataReader.GetString(NombreArea);

            return area;
        }