public Batches(SmartCoding smartCoding, bool allQueueEmpty) : base() { InitializeComponent(); this.smartCoding = smartCoding; this.allQueueEmpty = allQueueEmpty; this.comboDiscontinued.SelectedIndex = 0; this.comboShowCummulativePacks.SelectedIndex = 0; this.toolstripChild = this.toolStripChildForm; this.fastListIndex = this.fastBatchIndex; this.olvIsDefault.AspectGetter = delegate(object row) {// IsDefault indicator column if (((BatchIndex)row).IsDefault) { return("IsDefault"); } return(""); }; this.olvIsDefault.Renderer = new MappedImageRenderer(new Object[] { "IsDefault", Resources.Play_Normal_16 }); this.buttonApply.Enabled = allQueueEmpty; this.batchAPIs = new BatchAPIs(CommonNinject.Kernel.Get <IBatchAPIRepository>()); this.batchViewModel = CommonNinject.Kernel.Get <BatchViewModel>(); this.batchViewModel.PropertyChanged += new PropertyChangedEventHandler(ModelDTO_PropertyChanged); this.baseDTO = this.batchViewModel; }
private void OptionBatches_Load(object sender, EventArgs e) { try { BatchAPIs batchAPIs = new BatchAPIs(CommonNinject.Kernel.Get <IBatchAPIRepository>()); this.combexBatchID.DataSource = batchAPIs.GetBatchAvailables(this.batchQuantityDetailDTO.LocationID, this.batchQuantityDetailDTO.DeliveryAdviceID, this.batchQuantityDetailDTO.TransferOrderID, this.batchQuantityDetailDTO.CommodityID, true); this.combexBatchID.DisplayMember = CommonExpressions.PropertyName <BatchAvailable>(p => p.Code); this.combexBatchID.ValueMember = CommonExpressions.PropertyName <BatchAvailable>(p => p.BatchID); this.bindingBatchID = this.combexBatchID.DataBindings.Add("SelectedValue", this.batchQuantityDetailDTO, CommonExpressions.PropertyName <IBatchQuantityDetailDTO>(p => p.BatchID), true, DataSourceUpdateMode.OnPropertyChanged); this.bindingBatchEntryDate = this.textexBatchEntryDate.DataBindings.Add("Text", this.batchQuantityDetailDTO, CommonExpressions.PropertyName <IBatchQuantityDetailDTO>(p => p.BatchEntryDate), true, DataSourceUpdateMode.OnPropertyChanged); this.bindingQuantityBatchAvailable = this.textexQuantityBatchAvailable.DataBindings.Add("Text", this.batchQuantityDetailDTO, CommonExpressions.PropertyName <IBatchQuantityDetailDTO>(p => p.QuantityBatchAvailable), true, DataSourceUpdateMode.OnPropertyChanged); this.bindingLineVolumeBatchAvailable = this.textexLineVolumeBatchAvailable.DataBindings.Add("Text", this.batchQuantityDetailDTO, CommonExpressions.PropertyName <IBatchQuantityDetailDTO>(p => p.LineVolumeBatchAvailable), true, DataSourceUpdateMode.OnPropertyChanged); this.bindingBatchID.BindingComplete += new BindingCompleteEventHandler(CommonControl_BindingComplete); this.bindingBatchEntryDate.BindingComplete += new BindingCompleteEventHandler(CommonControl_BindingComplete); this.bindingQuantityBatchAvailable.BindingComplete += new BindingCompleteEventHandler(CommonControl_BindingComplete); this.bindingLineVolumeBatchAvailable.BindingComplete += new BindingCompleteEventHandler(CommonControl_BindingComplete); } catch (Exception exception) { ExceptionHandlers.ShowExceptionMessageBox(this, exception); } }
public BatchSumups() { InitializeComponent(); this.batchAPIs = new BatchAPIs(CommonNinject.Kernel.Get <IBatchAPIRepository>()); this.lowerFillterDate = DateTime.Today.AddDays(-7); this.upperFillterDate = DateTime.Today.AddDays(10); this.beginingDateBinding = this.dateTimexLowerFillterDate.DataBindings.Add("Value", this, "LowerFillterDate", true, DataSourceUpdateMode.OnPropertyChanged); this.endingDateBinding = this.dateTimexUpperFillterDate.DataBindings.Add("Value", this, "UpperFillterDate", true, DataSourceUpdateMode.OnPropertyChanged); this.beginingDateBinding.BindingComplete += new BindingCompleteEventHandler(CommonControl_BindingComplete); this.endingDateBinding.BindingComplete += new BindingCompleteEventHandler(CommonControl_BindingComplete); }
public BatchWizard(BatchAPIs batchAPIs, BatchViewModel batchViewModel) { InitializeComponent(); this.customTabBatch = new CustomTabControl(); this.customTabBatch.Font = this.fastPendingLots.Font; this.customTabBatch.DisplayStyle = TabStyle.VisualStudio; this.customTabBatch.DisplayStyleProvider.ImageAlign = ContentAlignment.MiddleLeft; this.customTabBatch.TabPages.Add("tabPendingLots", "Available Batches "); this.customTabBatch.TabPages[0].Controls.Add(this.fastPendingLots); this.customTabBatch.Dock = DockStyle.Fill; this.fastPendingLots.Dock = DockStyle.Fill; this.panelMaster.Controls.Add(this.customTabBatch); this.batchAPIs = batchAPIs; this.batchViewModel = batchViewModel; }