Example #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ActualFinances"/> class.
 /// </summary>
 /// <param name="row">The row.</param>
 private ActualFinances(ActualFinancesRow row)
 {
     _srcRow = row;
 }
Example #2
0
        /// <summary>
        /// Creates the specified object id.
        /// </summary>
        /// <param name="ObjectId">The object id.</param>
        /// <param name="ObjectTypeId">The object type id.</param>
        /// <param name="Date">The date.</param>
        /// <param name="RowId">The row id.</param>
        /// <param name="Value">The value.</param>
        /// <param name="Comment">The comment.</param>
        /// <param name="BlockId">The TimeTrackingBlock id.</param>
        /// <returns></returns>
        public static int Create(int ObjectId, ObjectTypes ObjectType, DateTime Date, string RowId, double Value, string Comment, int BlockId, double TotalApproved, int OwnerId)
        {
            ActualFinancesRow newRow = new ActualFinancesRow();

            newRow.CreatorId = Security.CurrentUser.UserID;

            newRow.ObjectId = ObjectId;
            newRow.ObjectTypeId = (int)ObjectType;

            newRow.Date = Date;

            newRow.RowId = RowId;
            newRow.Value = Value;
            newRow.Comment = Comment;
            newRow.BlockId = BlockId;
            newRow.TotalApproved = TotalApproved;
            newRow.OwnerId = OwnerId;

            newRow.Update();

            return newRow.PrimaryKeyId;
        }
Example #3
0
        /// <summary>
        /// Creates the specified user id.
        /// </summary>
        /// <param name="UserId">The user id.</param>
        /// <param name="ObjectId">The object id.</param>
        /// <param name="ObjectType">Type of the object.</param>
        /// <param name="Date">The date.</param>
        /// <param name="RowId">The row id.</param>
        /// <param name="Value">The value.</param>
        /// <param name="Comment">The comment.</param>
        /// <returns></returns>
        public static int Create(int UserId, int ObjectId, ObjectTypes ObjectType, DateTime Date, string RowId, double Value, string Comment)
        {
            ActualFinancesRow newRow = new ActualFinancesRow();

            newRow.CreatorId = UserId;

            newRow.ObjectId = ObjectId;
            newRow.ObjectTypeId = (int)ObjectType;

            newRow.Date = Date;

            newRow.RowId = RowId;
            newRow.Value = Value;
            newRow.Comment = Comment;

            newRow.Update();

            return newRow.PrimaryKeyId;
        }