public int PostCourierAgreement(CourierAgreementVm model)
        {
            var agreementData = new CourierAgreementMaster();

            agreementData.DistAreaId = model.area;
            agreementData.CourierId  = model.company;
            agreementData.Amount     = model.Amount;

            string res = "";

            try
            {
                _unitOfWork.CourierAgreement.Add(agreementData);
                var result = _unitOfWork.Commit();
                return(result);
            }
            catch (Exception ex)
            {
                res = ex.Message;
                throw ex;
            }
        }
Exemplo n.º 2
0
        public IActionResult PostAgreement(CourierAgreementVm model)
        {
            var res = _postCourierAgreementManager.PostCourierAgreement(model);

            return(Ok(res));
        }