Пример #1
0
 public static int Insert(DelegacionesInfo _DelegacionesInfo)
 {
     //Execute the query and return the new Guid
     object retval= _AdoHelper.ExecuteScalar(ConnectionString,"DelegacionesInsert",
         new SqlParameter("@Cod_Regional", _DelegacionesInfo.Cod_Regional),
         new SqlParameter("@Delegacion", _DelegacionesInfo.Delegacion),
         new SqlParameter("@Numero", _DelegacionesInfo.Numero),
         new SqlParameter("@Cod_Jefe", _DelegacionesInfo.Cod_Jefe),
         new SqlParameter("@Email", _DelegacionesInfo.Email),
         new SqlParameter("@LastProcess", _DelegacionesInfo.LastProcess),
         new SqlParameter("@ActualProcess", _DelegacionesInfo.ActualProcess),
         new SqlParameter("@TempTime", _DelegacionesInfo.TempTime),
         new SqlParameter("@Proc_ID", _DelegacionesInfo.Proc_ID),
         new SqlParameter("@Skip", _DelegacionesInfo.Skip),
         new SqlParameter("@SyncID", _DelegacionesInfo.SyncID)
     );
     return Int32.Parse(retval.ToString());
 }
Пример #2
0
 public static void Delete(DelegacionesInfo _DelegacionesInfo)
 {
     _AdoHelper.ExecuteNonQuery(ConnectionString,CommandType.StoredProcedure, "DelegacionesDelete",
         new SqlParameter("@Cod_Delegacion", _DelegacionesInfo.Cod_Delegacion)
     );
 }
Пример #3
0
 public static void Update(DelegacionesInfo _DelegacionesInfo)
 {
     _AdoHelper.ExecuteNonQuery(ConnectionString,CommandType.StoredProcedure, "DelegacionesUpdate",
         new SqlParameter("@Cod_Regional", _DelegacionesInfo.Cod_Regional),
         new SqlParameter("@Cod_Delegacion", _DelegacionesInfo.Cod_Delegacion),
         new SqlParameter("@Delegacion", _DelegacionesInfo.Delegacion),
         new SqlParameter("@Numero", _DelegacionesInfo.Numero),
         new SqlParameter("@Cod_Jefe", _DelegacionesInfo.Cod_Jefe),
         new SqlParameter("@Email", _DelegacionesInfo.Email),
         new SqlParameter("@LastProcess", _DelegacionesInfo.LastProcess),
         new SqlParameter("@ActualProcess", _DelegacionesInfo.ActualProcess),
         new SqlParameter("@TempTime", _DelegacionesInfo.TempTime),
         new SqlParameter("@Proc_ID", _DelegacionesInfo.Proc_ID),
         new SqlParameter("@Skip", _DelegacionesInfo.Skip),
         new SqlParameter("@SyncID", _DelegacionesInfo.SyncID)
     );
 }
Пример #4
-1
        /// <summary>
        /// Creates a new instance of the Delegaciones class and populates it with data from the specified SqlDataReader.
        /// </summary>
        private static DelegacionesInfo MakeDelegaciones(SqlDataReader dataReader)
        {
            DelegacionesInfo delegaciones = new DelegacionesInfo();

            if (dataReader.IsDBNull(Cod_Regional) == false)
                delegaciones.Cod_Regional = dataReader.GetInt32(Cod_Regional);
            if (dataReader.IsDBNull(Cod_Delegacion) == false)
                delegaciones.Cod_Delegacion = dataReader.GetInt32(Cod_Delegacion);
            if (dataReader.IsDBNull(Delegacion) == false)
                delegaciones.Delegacion = dataReader.GetString(Delegacion);
            if (dataReader.IsDBNull(Numero) == false)
                delegaciones.Numero = dataReader.GetString(Numero);
            if (dataReader.IsDBNull(Cod_Jefe) == false)
                delegaciones.Cod_Jefe = dataReader.GetInt32(Cod_Jefe);
            if (dataReader.IsDBNull(Email) == false)
                delegaciones.Email = dataReader.GetString(Email);
            if (dataReader.IsDBNull(LastProcess) == false)
                delegaciones.LastProcess = new Byte[Convert.ToInt32(dataReader.GetBytes(0, 0, null, 0, Int32.MaxValue))];
                dataReader.GetBytes(0, 0, delegaciones.LastProcess, 0, delegaciones.LastProcess.Length);
            if (dataReader.IsDBNull(ActualProcess) == false)
                delegaciones.ActualProcess = new Byte[Convert.ToInt32(dataReader.GetBytes(0, 0, null, 0, Int32.MaxValue))];
                dataReader.GetBytes(0, 0, delegaciones.ActualProcess, 0, delegaciones.ActualProcess.Length);
            if (dataReader.IsDBNull(TempTime) == false)
                delegaciones.TempTime = new Byte[Convert.ToInt32(dataReader.GetBytes(0, 0, null, 0, Int32.MaxValue))];
                dataReader.GetBytes(0, 0, delegaciones.TempTime, 0, delegaciones.TempTime.Length);
            if (dataReader.IsDBNull(Proc_ID) == false)
                delegaciones.Proc_ID = dataReader.GetInt32(Proc_ID);
            if (dataReader.IsDBNull(Skip) == false)
                delegaciones.Skip = dataReader.GetBoolean(Skip);
            if (dataReader.IsDBNull(SyncID) == false)
                delegaciones.SyncID = dataReader.GetGuid(SyncID);
            if (dataReader.IsDBNull(SyncTimeStamp) == false)
                delegaciones.SyncTimeStamp = DateTime.MinValue;

            return delegaciones;
        }