Beispiel #1
0
        public ResponseBase SaveByStatus(string note, NCAction action, string id)
        {
            ResponseBase res = new ResponseBase();

            try
            {
                switch (action)
                {
                case NCAction.remove:
                    this.DeleteBy(id);
                    this._pRep.Delete(this._pRep.GetByID(id));
                    break;

                case NCAction.save:
                    var resId = this._rep.GetByID(id);
                    resId.Note = note;
                    this._rep.Update(resId);
                    break;
                }
                this._uow.Commit();
                res.Success = true;
            }
            catch (Exception ex)
            {
                res.Message = ex.Message;
                res.Success = false;
            }

            return(res);
        }
Beispiel #2
0
        public ActionResult DataUploadNotCompleted(string StartDate, string EndDate, string note, int?Id, NCAction action = NCAction.save)
        {
            if (Id != null)
            {
                var res = this.NCDataUpload.SaveByStatus(note, action, Id.Value);
            }

            return(RedirectToAction("DataUploadNotCompleted", new { StartDate = StartDate, EndDate = EndDate }));
        }
Beispiel #3
0
        public ActionResult PurchasesNotCompleted(string StartDate, string EndDate, string note, string Id, NCAction action = NCAction.save)
        {
            if (Id != null)
            {
                var res = this.NCPurchasSrv.SaveByStatus(note, action, Id);
            }

            return(RedirectToAction("PurchasesNotCompleted", new { StartDate = StartDate, EndDate = EndDate }));
        }
Beispiel #4
0
        public ActionResult ArtistNotCompleted(string StartDate, string EndDate, string note, string Id, NCAction action = NCAction.save)
        {
            if (!string.IsNullOrEmpty(Id))
            {
                var res = this.NCRegisterSrv.SaveByStatus(note, action, Id);
            }

            return(RedirectToAction("ArtistNotCompleted", new { StartDate = StartDate, EndDate = EndDate }));
        }