Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
        private void buttonSearchBarcode_Click(object sender, EventArgs e)
        {
            try
            {
                this.comboSearchBarcode.Text = this.comboSearchBarcode.Text.Trim();
                if (this.comboSearchBarcode.Text.Length > 0 && (this.comboSearchBarcode.Text != this.searchPlaceHolder))
                {
                    if (this.comboSearchBarcode.Items.IndexOf(this.comboSearchBarcode.Text) == -1)
                    {
                        this.comboSearchBarcode.Items.Add(this.comboSearchBarcode.Text);
                    }

                    SearchBarcode searchBarcode = new SearchBarcode(this.comboSearchBarcode.Text);
                    DialogResult  dialogResult  = searchBarcode.ShowDialog(); searchBarcode.Dispose();

                    if (dialogResult == System.Windows.Forms.DialogResult.Yes)
                    {
                        SmartCoding activeSmartCoding = ActiveMdiChild as SmartCoding;
                        if (activeSmartCoding != null)
                        {
                            activeSmartCoding.ReprintCarton(GlobalEnums.ReprintCartonID);
                        }
                    }
                }
            }
            catch (Exception exception)
            {
                ExceptionHandlers.ShowExceptionMessageBox(this, exception);
            }
        }