Esempio n. 1
0
 public HistoryPointController(
     IHistoryPointService _HistoryPoint
     , IUserRepository _user
     )
 {
     HistoryPointService = _HistoryPoint;
     userRepository      = _user;
 }
Esempio n. 2
0
        public static void DeletedPoint(int?TargetId, string TargetName)
        {
            IHistoryPointService HistoryPointService = DependencyResolver.Current.GetService <IHistoryPointService>();
            var HistoryPoint = HistoryPointService.GetAllHistoryPoint().Where(x => x.TargetId == TargetId && x.TargetName == TargetName).ToList();

            foreach (var item in HistoryPoint)
            {
                HistoryPointService.Delete(item);
            }
        }
Esempio n. 3
0
        public static void CreatePoint(int?CustomerId, int?TargetId, string TargetName, double?AccumulatedPoint, double?UsePoint)
        {
            IHistoryPointService HistoryPointService = DependencyResolver.Current.GetService <IHistoryPointService>();
            var HistoryPoint = new HistoryPoint();

            HistoryPoint.IsDeleted        = false;
            HistoryPoint.CreatedUserId    = WebSecurity.CurrentUserId;
            HistoryPoint.CreatedDate      = DateTime.Now;
            HistoryPoint.ModifiedUserId   = WebSecurity.CurrentUserId;
            HistoryPoint.ModifiedDate     = DateTime.Now;
            HistoryPoint.CustomerId       = CustomerId;
            HistoryPoint.TargetId         = TargetId;
            HistoryPoint.TargetName       = TargetName;
            HistoryPoint.AccumulatedPoint = AccumulatedPoint;
            HistoryPoint.UsePoint         = UsePoint;
            HistoryPointService.Create(HistoryPoint);
        }