private void Btn_Simpan_Click(object sender, RoutedEventArgs e) { try { _transportService = new TransportServices(); if (string.IsNullOrEmpty(NoPolisi.Text)) { MessageBox.Show("No Polisi tidak boleh kosong", "Warning", MessageBoxButton.OK, MessageBoxImage.Exclamation); return; } var Dto = new MasterTransportDto(); Dto.NO_POLISI = NoPolisi.Text.ToUpper(); Dto.STATUS = Core.Status.Aktif; var GetDataExisting = _transportService.GetAll().Where(x => !string.IsNullOrEmpty(x.NO_POLISI) && x.NO_POLISI == Dto.NO_POLISI).FirstOrDefault(); if (GetDataExisting != null) { MessageBox.Show("No Polisi sudah ada", "Warning", MessageBoxButton.OK, MessageBoxImage.Exclamation); return; } _transportService.Save(Dto); MessageBox.Show("Save Data Sukses", "Sukses", MessageBoxButton.OK, MessageBoxImage.Information); CloseWin(); } catch (Exception exp) { MessageBox.Show("Save Data Error", "Error", MessageBoxButton.OK, MessageBoxImage.Error); } }
public Home_Details(int Id) { _itemRepo = new ItemServices(); _pekerjaRepo = new PekerjaServices(); _supplierServices = new SupplierServices(); _transportServices = new TransportServices(); _trnServices = new TRNBongkarMuatServices(); var Data = _trnServices.GetById(Id); InitializeComponent(); PopulateComboboxBarang(); PopulateComboboxPetugas(); PopulateComboboxNamaPengirim(); PopulateComboboxNoPolisi(); if (Data != null) { var Dto = AutoMapper.Mapper.Map <TRNBongkarMuatDto>(Data); IdHome.Text = Dto.ID.ToString(); TglKirim.Text = Dto.TANGGAL_KIRIM.ToString("dd MMM yyyy"); Kegiatan.SelectedItem = Dto.KEGIATAN; JenisBarang.SelectedItem = Dto.JENIS_BARANG; NamaBarang.SelectedValuePath = "ID"; NamaBarang.SelectedValue = Dto.master_item.ID; NamaPengirim.SelectedValuePath = "ID"; NamaPengirim.SelectedValue = Dto.master_supplier.ID; NoPolisi.SelectedValuePath = "ID"; NoPolisi.SelectedValue = Dto.master_transport.ID; Kwantum.Text = string.Format("{0:N0}", Dto.KWANTUM.Value); Berangkat.Value = Dto.BERANGKAT.TimeOfDay; Sampai.Value = Dto.SAMPAI.TimeOfDay; Ongkos.Text = Dto.ONGKOS.ToString(); Harga.Text = Dto.HARGA.HasValue ? Dto.HARGA.Value.ToString("{0:N2}") : "0"; TotalHarga.Text = Dto.TOTAL_HARGA.HasValue ? Dto.TOTAL_HARGA.Value.ToString("{0:N0}") : "0"; HargaKontainer.Text = Dto.HARGA_KONTAINER.HasValue ? Dto.HARGA_KONTAINER.Value.ToString("{0:N0}"):"0"; TotalKontainer.Text = Dto.TOTAL_KONTAINER.HasValue ? Dto.TOTAL_KONTAINER.Value.ToString("{0:N0}") : "0"; var ListPetugas = Dto.trn_bongkat_muat_details_pekerja.Select(x => x.master_petugas).ToList(); var ListPetugasDto = AutoMapper.Mapper.Map <List <MasterPetugasDto> >(ListPetugas); foreach (var pekerja in ListPetugasDto) { ListPekerja.Items.Add(pekerja); ListPekerja.DisplayMemberPath = "NAMA_PETUGAS"; } } TglKirim.IsReadOnly = true; }
public Transport_View() { _transportServices = new TransportServices(); _insertWindow = new Transport_Insert(); _detailsWindow = new Transport_Details(0); InitializeComponent(); Init(); }
public ProviderController( ITransportServices transportServices, IHotelServices hotelServices, IShowServices showServices ) { this.transportServices = transportServices; this.hotelServices = hotelServices; this.showServices = showServices; }
public Transport_Details(int Id) { _transportService = new TransportServices(); var Data = _transportService.GetById(Id); InitializeComponent(); if (Data != null) { IdTransport.Text = Data.ID.ToString(); NoPolisi.Text = Data.NO_POLISI; StatusPetugas.SelectedItem = Data.STATUS; } }
public Home_Insert() { _itemRepo = new ItemServices(); _pekerjaRepo = new PekerjaServices(); _supplierServices = new SupplierServices(); _transportServices = new TransportServices(); _trnServices = new TRNBongkarMuatServices(); InitializeComponent(); PopulateComboboxBarang(); PopulateComboboxPetugas(); PopulateComboboxNamaPengirim(); PopulateComboboxNoPolisi(); TglKirim.Text = DateTime.Now.ToString("yyyy MMM dd"); TglKirim.IsReadOnly = true; Berangkat.Value = new TimeSpan(0, 0, 0); Sampai.Value = new TimeSpan(0, 0, 0); }
private void PopulateComboboxNoPolisi() { _transportServices = new TransportServices(); var Data = AutoMapper.Mapper.Map <List <MasterTransportDto> >(_transportServices.GetAll().Where(x => x.STATUS == Status.Aktif)); _dataTransport = CollectionViewSource.GetDefaultView(Data); var TransportCompositeCollection = new CompositeCollection(); TransportCompositeCollection.Add(new ComboBoxItem() { Content = "Please Select" }); TransportCompositeCollection.Add(new CollectionContainer() { Collection = _dataTransport }); NoPolisi.ItemsSource = TransportCompositeCollection; NoPolisi.SelectedIndex = 0; }
public ProductQuoteServiceBuilder() { _logger = new Logger(); _productRepository = new ProductRepository(_logger, new ProductDocumentRepository(_logger)); _saleModalityRepository = new SaleModalityRepository(_logger); _geographicAreaRepository = new GeographicAreaRepository(_logger); _saleModalityProductRepository = new SaleModalityProductRepository(_logger); _geographicAreaTransportTypeRepository = new GeographicAreaTransportTypeRepository(_logger); _creditRatingPaymentDeadlineRepository = new CreditRatingPaymentDeadlineRepository(_logger); _exchangeTypeRepository = new ExchangeTypeRepository(_logger); _stockTimeRepository = new StockTimeRepository(_logger); _deliveryAmountRepository = new DeliveryAmountRepository(_logger); _productQuoteRepository = new ProductQuoteRepository(_logger); _emailManager = new EmailManager(); _emailAccountRepository = new EmailAccountRepository(_logger); _adminUserRepository = new AdminUserRepository(); _applicationUserRepository = new ApplicationUserRepository(); _workflowMessageService = new WorkflowMessageService(_emailManager, _emailAccountRepository, _adminUserRepository, _applicationUserRepository); _pdfService = new PdfService(); _saleModalityCreditRatingRepository = new SaleModalityCreditRatingRepository(_logger); _globalVariableRepository = new GlobalVariableRepository(_logger); _customerOrderRepository = new CustomerOrderRepository(_logger); _customerRepository = new CustomerRepository(_logger); _transportTypeRepository = new TransportTypeRepository(_logger); _packagingRepository = new PackagingRepository(_logger); _rofexRepository = new RofexRepository(_logger); _paymentDeadlineRepository = new PaymentDeadlineRepository(_logger); _shipmentTrackingRepository = new ShipmentTrackingRepository(_logger); _customerProductRepository = new CustomerProductRepository(_logger); _logRecordRepository = new LogRecordRepository(); _customerOrderService = new CustomerOrderService(_customerOrderRepository, _workflowMessageService); _transportService = new TransportServices(_geographicAreaTransportTypeRepository); _marginServices = new MarginServices(); _wayOfExceptionRepository = new WayOfExceptionRepository(_logger); _wayOfExceptionServices = new WayOfExceptionServices(_wayOfExceptionRepository); _salesChannelUserRepository = new SalesChannelUserRepository(_logger); }
public Transport_Insert() { _transportService = new TransportServices(); InitializeComponent(); }