Пример #1
0
 private void MapData(OtherRevenueModel from, ref OtherRevenue to)
 {
     to.OtherRevenueAmount      = from.OtherRevenueAmount;
     to.OtherRevenueDate        = ConversionHelper.EnsureUtcDate(from.OtherRevenueDate);
     to.OtherRevenueDescription = from.OtherRevenueDescription;
     to.OtherRevenueId          = from.OtherRevenueId;
     to.PropertyCode            = from.PropertyCode;
     to.IncludeOnStatement      = from.IncludeOnStatement;
     to.ApprovedNote            = from.ApprovedNote;
 }
Пример #2
0
 public override void Create(OtherRevenueModel model)
 {
     try
     {
         OtherRevenue entity = new OtherRevenue();
         MapData(model, ref entity);
         var dataProvider = new OtherRevenueTableProvider(_context);
         dataProvider.Create(entity);
     }
     catch
     {
         throw;
     }
 }
Пример #3
0
        private void RetrackWorkflowSignature(ref OtherRevenue entity, RevenueApprovalStatus state)
        {
            var userName = ClaimProvider.GetFriendlyName(_context);

            switch (state)
            {
            case RevenueApprovalStatus.Reviewed:
                entity.ReviewedBy   = null;
                entity.ReviewedDate = null;
                break;

            case RevenueApprovalStatus.Approved:
                entity.ApprovedBy   = null;
                entity.ApprovedDate = null;
                break;
            }
        }
Пример #4
0
        private void SetWorkflowSignature(ref OtherRevenue entity, RevenueApprovalStatus state)
        {
            var userName = ClaimProvider.GetFriendlyName(_context);

            switch (state)
            {
            case RevenueApprovalStatus.Reviewed:
                entity.ReviewedBy   = userName;
                entity.ReviewedDate = DateTime.Now.ToUniversalTime();
                break;

            case RevenueApprovalStatus.Approved:
                entity.ApprovedBy   = userName;
                entity.ApprovedDate = DateTime.Now.ToUniversalTime();
                break;
            }
        }