Exemple #1
0
        public void Resume(int id)
        {
            var item = this.PointRebateService.GetById(id);

            if (item != null && item.State == PointRebateStates.Invalid)
            {
                item.State = PointRebateStates.Normal;
                PointRebateService.Update(item);

                Logger.LogWithSerialNo(LogTypes.PointRebateResume, SerialNoHelper.Create(), id, item.DisplayName);
                AddMessage("resume.success", item.DisplayName);
            }
        }
Exemple #2
0
        public void Save()
        {
            var serialNo = SerialNoHelper.Create();
            var item     = PointRebateService.GetById(PointRebateId);

            if (item != null)
            {
                TransactionHelper.BeginTransaction();
                item.DisplayName = DisplayName;
                item.Point       = Point;

                item.Amount      = Amount;
                item.DisplayName = DisplayName;
                OnSave(item);
                PointRebateService.Update(item);


                AddMessage("success", DisplayName);
                Logger.LogWithSerialNo(LogTypes.PointRebateEdit, serialNo, item.PointRebateId, DisplayName);

                TransactionHelper.Commit();
            }
        }