コード例 #1
0
        public void Add(Action<InvoiceDto, Exception> action, InvoiceDto ent)
        {
            var url = string.Format(invoiceAddressFormatString, string.Empty);

            WebClientHelper.Post<InvoiceDto, InvoiceDto>(new Uri(url, UriKind.Absolute),
                                                         action, ent,
                                                         WebClientHelper.MessageFormat.Json,ApiConfig.Headers);
        }
コード例 #2
0
        public void Load(CompanyDto selectedCompany, InvoiceDto invoice)
        {
            CurrentCompany = selectedCompany;

            CurrentInvoice = invoice;
            ToDateFilter = invoice.InvoiceDate;
            FromDateFilter = invoice.InvoiceDate.AddMonths(-3);
            var uid = Guid.NewGuid();
        }
コード例 #3
0
 //TODO Sholde Check Type
 public InvoiceDto Update(InvoiceDto data)
 {
     var invoice = invoiceDtoMapper.MapModelToCommandWithAllIncludes(data);
     var updatedEnt = invoiceAppService.Update(invoice);
     var result = invoiceDtoMapper.MapToModel(updatedEnt);
     return result;
 }
コード例 #4
0
 public void Delete(InvoiceDto data)
 {
     invoiceAppService.DeleteById(data.Id);
 }
コード例 #5
0
 public InvoiceDto CalculateAdditionalPrice(InvoiceDto data)
 {
     var invoice = invoiceDtoMapper.MapModelToCommandWithAllIncludes(data);
     var updatedEnt = invoiceAppService.CalculateAdditionalPrice(invoice);
     var result = invoiceDtoMapper.MapToModelWithAllIncludes(updatedEnt);
     return result;
 }
コード例 #6
0
        public InvoiceDto Add(InvoiceDto data)
        {
            var invoice = invoiceDtoMapper.MapModelToCommandWithAllIncludes(data);
            var added = invoiceAppService.Add(invoice);
            //                (
            //                    data.InvoiceNumber, data.OwnerId, data.InvoiceDate, (DivisionMethods) data.DivisionMethodId, (AccountingTypes) data.AccountTypeId,
            //                    data.InvoiceRefrence==null?(long?) null:data.InvoiceRefrence.Id, data.OrderRefrences.Select(c => c.Id).ToList(), data.CurrencyId,
            //                    data.TransporterId, data.SupplierId, (InvoiceTypes) (int) data.InvoiceType, data.Description,data.InvoiceItems.ToList());

            var result = invoiceDtoMapper.MapToModel(added);

            return result;
        }
コード例 #7
0
ファイル: InvoiceItemVM.cs プロジェクト: hatefi-arman/Modules
 public void SetProp(InvoiceDto invoice)
 {
 }
コード例 #8
0
        public void Load(CompanyDto selectedCompany, InvoiceDto invoice)
        {
            CurrentCompany = selectedCompany;
            OrderListVM.Load();
            var uid = Guid.NewGuid();

            UpperDate = invoice.InvoiceDate;
            UpdatePartnerCompany(invoice.SupplierId, invoice.TransporterId);
            ToDateFilter = invoice.InvoiceDate;
            FromDateFilter = invoice.InvoiceDate.AddMonths(-3);

            invoiceType = invoice.InvoiceType;
            if (invoice.OrderRefrences == null)
                invoice.OrderRefrences = new ObservableCollection<OrderDto>();
            else
            {
                foreach (var order in invoice.OrderRefrences)
                    SelectedOrders.Add(order);
                LoadOrdersByFilters2();
            }
            changed = false;
        }
コード例 #9
0
 public void ShowOrderReference(CompanyDto selectedCompany, InvoiceDto invoice)
 {
     var view = this.ViewManager.ShowInDialog<IOrderReferenceLookUp>();
     (view.ViewModel as OrderReferenceLookUpVM).Load(selectedCompany, invoice);
 }
コード例 #10
0
 public void ManageAdditionalPrice(InvoiceDto invoice, decimal currencyToMainCurrencyRate, Guid uniqId)
 {
     var view = ViewManager.ShowInDialog<IInvoiceAdditionalPriceListView>();
     (view.ViewModel as InvoiceAdditionalPriceListVM).Load(invoice, currencyToMainCurrencyRate,uniqId);
 }
コード例 #11
0
 public void Edit(InvoiceDto dto,List<CompanyDto> companies)
 {
     var view = ViewManager.ShowInDialog<IInvoiceView>();
     (view.ViewModel as InvoiceVM).Load(dto, companies);
 }
        public void CalculateAdditionalPrice(Action<InvoiceDto, Exception> action, InvoiceDto ent)
        {
            var url = string.Format(invoiceAdditionalPriceAddressFormatString, ent.Id, string.Empty);

            WebClientHelper.Put(new Uri(url, UriKind.Absolute), action, ent, WebClientHelper.MessageFormat.Json,ApiConfig.Headers);
        }