Пример #1
0
 /// <summary>
 /// Takes the specified automatic number.
 /// </summary>
 /// <param name="autoNumber">The automatic number.</param>
 /// <returns></returns>
 private static object[] Take(AutoNumberEntity autoNumber)
 {
     return(new object[]
     {
         "@RefTypeID", autoNumber.RefTypeId,
         "@Prefix", autoNumber.Prefix,
         "@Suffix", autoNumber.Suffix,
         "@Value", autoNumber.Value,
         "@ValueLocalCurency", autoNumber.ValueLocalCurency,
         "@LengthOfValue", autoNumber.LengthOfValue
     });
 }
Пример #2
0
        /// <summary>
        /// Updates the automatic number.
        /// </summary>
        /// <param name="autoNumber">The automatic number.</param>
        /// <returns></returns>
        public string UpdateAutoNumber(AutoNumberEntity autoNumber)
        {
            const string sql = @"uspUpdate_AutoNumber";

            return(Db.Update(sql, true, Take(autoNumber)));
        }