Пример #1
0
 public int Remove(PrepaymentModel prepayment)
 {
     prepayment.RecordStatus       = RecordStatus.Deleted;
     prepayment.LastModifyTime     = DateTime.Now;
     prepayment.LastModifyUserName = UserInfo.UserName;
     return(m_db.Update(m_defaultTableName, m_defaultPrimaryKey, prepayment.GetTableObject()));
 }
Пример #2
0
        public PrepaymentModel New(int prepaymentSetId, int assetId, DateTime prepayDate, DateTime originDate, double money)
        {
            var now = DateTime.Now;

            var prepayment = new PrepaymentModel();

            prepayment.Guid = Guid.NewGuid().ToString();

            prepayment.PrepaymentSetId = prepaymentSetId;
            prepayment.AssetId         = assetId;
            prepayment.PrepayDate      = prepayDate;
            prepayment.Money           = money;
            prepayment.OriginDate      = originDate;

            prepayment.CreateTime         = now;
            prepayment.CreateUserName     = UserInfo.UserName;
            prepayment.LastModifyTime     = now;
            prepayment.LastModifyUserName = UserInfo.UserName;
            prepayment.RecordStatus       = RecordStatus.Valid;
            prepayment.Id = Insert(prepayment.GetTableObject());
            return(prepayment);
        }