private void Btn_Simpan_Click(object sender, RoutedEventArgs e) { try { _supplierServices = new SupplierServices(); if (string.IsNullOrEmpty(NamaSupplier.Text)) { MessageBox.Show("Nama Supplier tidak boleh kosong", "Warning", MessageBoxButton.OK, MessageBoxImage.Exclamation); return; } var Dto = new MasterSupplierDto(); Dto.NAMA_SUPPLIER = NamaSupplier.Text; Dto.ALAMAT_SUPPLIER = Alamat.Text; Dto.ID = Convert.ToInt32(IdSupplier.Text); Dto.STATUS = (Status)StatusSupplier.SelectedItem; var GetDataExisting = _supplierServices.GetAll().Where(x => !string.IsNullOrEmpty(x.NAMA_SUPPLIER) && x.NAMA_SUPPLIER.ToUpper() == Dto.NAMA_SUPPLIER.ToUpper()).FirstOrDefault(); if (GetDataExisting != null && GetDataExisting.ID != Dto.ID) { MessageBox.Show("Nama Supplier sudah ada", "Warning", MessageBoxButton.OK, MessageBoxImage.Exclamation); return; } _supplierServices.Save(Dto); MessageBox.Show("Update Data Sukses", "Sukses", MessageBoxButton.OK, MessageBoxImage.Information); CloseWin(); } catch (Exception exp) { MessageBox.Show("Update Data Error", "Error", MessageBoxButton.OK, MessageBoxImage.Error); } }
public MainMenu(ISupplierServices supplierServices, ICategoryServices categoryServices, IProductServices productServices) { InitializeComponent(); CenterToScreen(); _supplierServices = supplierServices; _categoryServices = categoryServices; _productServices = productServices; }
public ProductList(ICategoryServices categoryServices, ISupplierServices supplierServices, IProductServices productServices) { _categoryServices = categoryServices; _supplierServices = supplierServices; _productServices = productServices; InitializeComponent(); CenterToParent(); }
protected override void Initialize(RequestContext requestContext) { base.Initialize(requestContext); currentUser = (User)Session[AccountController.USER_SESSION_ID]; _shipmentServices = new ShipmentServicesImpl(); _supplierServices = new SupplierSerivecs(); ViewData["CountryList"] = new SelectList(_supplierServices.GetAllCountry(), "Id", "CountryName"); }
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 Supplier_View() { _supplierServices = new SupplierServices(); _insertWindow = new Supplier_Insert(); _detailsWindow = new Supplier_Details(0); InitializeComponent(); Init(); }
public ProductController( IProductServices productServices, ICategoryServices categoryServices, IManufacturerServices manufacturerServices, ISupplierServices supplierServices) { _productServices = productServices; _categoryServices = categoryServices; _manufacturerServices = manufacturerServices; _supplierServices = supplierServices; }
protected override void Initialize(RequestContext requestContext) { base.Initialize(requestContext); productServices = new ProductServices(); warehouseSevices = new WareHouseServices(); stockReceivingService = new StockReceivingService(); supplierServices = new SupplierSerivecs(); customerServices = new CustomerServices(); if (!Helpers.AllowTrading) { throw new HttpException("You are not authorized to access this page"); } }
public SupplierPresenter() { _view = new SupplierView(); _services = new SupplierServices(new SupplierRepository(), new ModelDataAnnotationCheck()); _view.OnLoadData += _view_LoadData; _view.OnButtonTambahClick += _view_OnCreateData; _view.OnButtonUbahClick += _view_OnUpdateData; _view.OnButtonHapusClick += _view_OnDeleteData; _view.OnButtonRefreshClick += _view_OnRefreshData; _view.OnDataGridCellDoubleClick += OnDataGrid_CellDoubleClick; }
public Supplier_Details(int Id) { InitializeComponent(); _supplierServices = new SupplierServices(); var Data = _supplierServices.GetById(Id); InitializeComponent(); if (Data != null) { IdSupplier.Text = Data.ID.ToString(); NamaSupplier.Text = Data.NAMA_SUPPLIER; Alamat.Text = Data.ALAMAT_SUPPLIER; StatusSupplier.SelectedItem = Data.STATUS; } }
private void PopulateComboboxNamaPengirim() { _supplierServices = new SupplierServices(); var Data = AutoMapper.Mapper.Map <List <MasterSupplierDto> >(_supplierServices.GetAll().Where(x => x.STATUS == Status.Aktif)); _dataSupplier = CollectionViewSource.GetDefaultView(Data); var TransportCompositeCollection = new CompositeCollection(); TransportCompositeCollection.Add(new ComboBoxItem() { Content = "Please Select" }); TransportCompositeCollection.Add(new CollectionContainer() { Collection = _dataSupplier }); NamaPengirim.ItemsSource = TransportCompositeCollection; NamaPengirim.SelectedIndex = 0; }
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); }
public SupplierApiController() { _SupplierServices = new SupplierServices(); }
public AddSupplier(ISupplierServices supplierServices) { InitializeComponent(); CenterToParent(); _supplierServices = supplierServices; }
public SupplierController(ISupplierServices supplierServices) { _supplierServices = supplierServices; }
public Supplier_Insert() { _supplierServices = new SupplierServices(); InitializeComponent(); }
public SupplierServicesDataAccessTests(ITestOutputHelper testOutputHelper) { _services = new SupplierServices(new SupplierRepository(), new ModelDataAnnotationCheck()); _testOutputHelper = testOutputHelper; }
public SuppliersController(ISupplierServices services) { this._services = services; }
public SuppliersController(ISupplierServices supplier) { _supplier = supplier; }
public SuppliersController(ISupplierServices supplierServices) { _supplierservice = supplierServices; }
public ProductsManagerController(IProductServices product, ICategoryServices category, ISupplierServices supplier) { _product = product; _category = category; _supplier = supplier; }
public SupplierList(ISupplierServices supplierServices) { _supplierServices = supplierServices; InitializeComponent(); CenterToParent(); }