Exemple #1
0
        public ServiceResult DeletePriceRule(PriceRule PriceRule)
        {
            if (PriceRule == null || string.IsNullOrWhiteSpace(PriceRule.UUID))
            {
                return(ServiceResponse.Error("Invalid account was sent."));
            }

            PriceManager financeManager = new PriceManager(Globals.DBConnectionKey, this.GetAuthToken(Request));

            return(financeManager.Delete(PriceRule));
        }
Exemple #2
0
        public ServiceResult DeletePriceRule(PriceRule PriceRule)
        {
            if (PriceRule == null || string.IsNullOrWhiteSpace(PriceRule.UUID))
            {
                return(ServiceResponse.Error("Invalid account was sent."));
            }

            PriceManager financeManager = new PriceManager(Globals.DBConnectionKey, Request.Headers?.Authorization?.Parameter);

            return(financeManager.Delete(PriceRule));
        }
Exemple #3
0
        public ServiceResult DeletePriceRuleBy(string uuid)
        {
            if (string.IsNullOrWhiteSpace(uuid))
            {
                return(ServiceResponse.Error("Invalid id."));
            }

            PriceManager fm = new PriceManager(Globals.DBConnectionKey, Request.Headers?.Authorization?.Parameter);
            PriceRule    c  = (PriceRule )fm.GetBy(uuid);

            if (c == null)
            {
                return(ServiceResponse.Error("Invalid uuid"));
            }

            return(fm.Delete(c));
        }
Exemple #4
0
        public ServiceResult DeletePriceRuleBy(string uuid)
        {
            if (string.IsNullOrWhiteSpace(uuid))
            {
                return(ServiceResponse.Error("Invalid id."));
            }

            PriceManager fm  = new PriceManager(Globals.DBConnectionKey, this.GetAuthToken(Request));
            var          res = fm.Get(uuid);

            if (res.Code != 200)
            {
                return(res);
            }
            PriceRule c = (PriceRule)res.Result;

            if (c == null)
            {
                return(ServiceResponse.Error("Invalid uuid"));
            }

            return(fm.Delete(c));
        }