Beispiel #1
0
        private void dataListViewMaster_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                ObjectListView objectListView = (ObjectListView)sender;
                DataRowView    row            = (DataRowView)objectListView.SelectedObject;

                if (row != null)
                {
                    int categoryID;

                    if (int.TryParse(row.Row["CategoryID"].ToString(), out categoryID))
                    {
                        this.listCategoryBLL.Fill(categoryID);
                    }
                    else
                    {
                        this.listCategoryBLL.Fill(0);
                    }
                }
                else
                {
                    this.listCategoryBLL.Fill(0);
                }
            }
            catch (Exception exception)
            {
                GlobalExceptionHandler.ShowExceptionMessageBox(this, exception);
            }
        }
Beispiel #2
0
        private void toolStripButtonEscapeAndOK_Click(object sender, EventArgs e)
        {
            try
            {
                if (sender.Equals(this.toolStripButtonOK) && this.dataGridViewDataMessageMaster.SelectedRows.Count > 0 && this.dataGridViewDataMessageMaster.CurrentRow != null)
                {
                    DataGridViewRow dataGridViewRow = this.dataGridViewDataMessageMaster.CurrentRow;
                    if (dataGridViewRow != null)
                    {
                        DataMessageDTS.DataMessageMasterRow dataMessageMasterRow = (DataMessageDTS.DataMessageMasterRow)((DataRowView)dataGridViewRow.DataBoundItem).Row;

                        if (dataMessageMasterRow != null)
                        {
                            this.DataMessageMaster = new DataMessageMaster(dataMessageMasterRow.DataMessageID, dataMessageMasterRow.ForeignMessageID, dataMessageMasterRow.RequestedEmployeeID, dataMessageMasterRow.DataStatusID, dataMessageMasterRow.Verified, dataMessageMasterRow.VerifiedDate, dataMessageMasterRow.ProductionDate, dataMessageMasterRow.ProductionDatePrintable, dataMessageMasterRow.EntryDate, dataMessageMasterRow.BeginingDate, dataMessageMasterRow.EndingDate, dataMessageMasterRow.LogoID, dataMessageMasterRow.LogoName, dataMessageMasterRow.LogoLogo, dataMessageMasterRow.LogoPrintable, dataMessageMasterRow.FactoryID, dataMessageMasterRow.FactoryName, dataMessageMasterRow.FactoryLogo, dataMessageMasterRow.FactoryPrintable, dataMessageMasterRow.OwnerID, dataMessageMasterRow.OwnerName, dataMessageMasterRow.OwnerLogo, dataMessageMasterRow.OwnerPrintable, dataMessageMasterRow.CategoryID, dataMessageMasterRow.CategoryName, dataMessageMasterRow.CategoryLogo, dataMessageMasterRow.CategoryPrintable, dataMessageMasterRow.ProductID, dataMessageMasterRow.ProductName, dataMessageMasterRow.ProductLogo, dataMessageMasterRow.ProductPrintable, dataMessageMasterRow.CoilID, dataMessageMasterRow.CoilCode, dataMessageMasterRow.CoilExtension, dataMessageMasterRow.CoilPrintable, dataMessageMasterRow.CounterValue, dataMessageMasterRow.CounterAutonics, dataMessageMasterRow.CounterPrintable, dataMessageMasterRow.Remarks);
                        }
                    }
                }
                this.DialogResult = sender.Equals(this.toolStripButtonOK) ? System.Windows.Forms.DialogResult.Yes : System.Windows.Forms.DialogResult.No;
            }
            catch (Exception exception)
            {
                this.DialogResult = System.Windows.Forms.DialogResult.None;
                GlobalExceptionHandler.ShowExceptionMessageBox(this, exception);
            }
        }
Beispiel #3
0
 void batchNoBinding_BindingComplete(object sender, BindingCompleteEventArgs e)
 {
     if (e.BindingCompleteState != BindingCompleteState.Success)
     {
         GlobalExceptionHandler.ShowExceptionMessageBox(this, e.ErrorText); e.Cancel = true;
     }
 }
Beispiel #4
0
 private void buttonOK_Click(object sender, EventArgs e)
 {
     try
     {
         if (this.checkBoxSaveAgreement.Checked && this.privateFillingLineData.DataValidated())
         {
             if (!this.privateFillingLineData.Save())
             {
                 this.DialogResult = DialogResult.None;
             }
             else
             {
                 GlobalStaticFunction.CopyProperties(this.privateFillingLineData, this.globalFillingLineData);
                 GlobalVariables.noItemPerCartonSetByProductID = SQLDatabase.GetScalarValue("SELECT NoItemPerCarton FROM ListProductName WHERE ProductID = " + this.globalFillingLineData.ProductID);
             }
         }
         else
         {
             this.DialogResult = DialogResult.None;
         }
     }
     catch (Exception exception)
     {
         GlobalExceptionHandler.ShowExceptionMessageBox(this, exception);
         this.DialogResult = DialogResult.None;
     }
 }
Beispiel #5
0
 public void Export()
 {
     try
     {
         if (this.ActiveControl.Equals(this.dataListViewMaster))
         {
             DataTable dataTableExport;
             dataTableExport = this.dataListViewMaster.DataSource as DataTable;
             if (dataTableExport != null)
             {
                 CommonFormAction.Export(dataTableExport);
             }
         }
         else
         {
             List <MarketingIncentiveDetail> listExport;
             listExport = this.marketingIncentiveBLL.MarketingIncentiveDetailList.ToList();
             if (listExport != null)
             {
                 CommonFormAction.Export(listExport);
             }
         }
     }
     catch (Exception exception)
     {
         GlobalExceptionHandler.ShowExceptionMessageBox(this, exception);
     }
 }
Beispiel #6
0
 private void toolStripButtonSplitCoil_Click(object sender, EventArgs e)
 {
     try
     {
         string coilExtensionString = ""; int coilExtension = 0;
         if (CustomInputBox.Show("NMVN", "Vui lòng nhập số cuộn chia", ref coilExtensionString) == System.Windows.Forms.DialogResult.OK)
         {
             if (int.TryParse(coilExtensionString, out coilExtension))
             {
                 if (this.dataMessageBLL.SplitCoil(coilExtension))
                 {
                     this.Loading();
                 }
             }
             else
             {
                 throw new Exception("Vui lòng nhập số cuộn chia.");
             }
         }
     }
     catch (Exception exception)
     {
         GlobalExceptionHandler.ShowExceptionMessageBox(this, exception);
     }
 }
Beispiel #7
0
        private void ImportExcel()
        {
            try
            {
                OpenFileDialog openFileDialog = new OpenFileDialog();
                openFileDialog.Filter = "Excel File (.xlsx)|*.xlsx";

                if (openFileDialog.ShowDialog() == DialogResult.OK)
                {
                    DialogMapExcelColumn dialogMapExcelColumn = new DialogMapExcelColumn(OleDbDatabase.MappingTaskID.MarketingIncentive, openFileDialog.FileName);

                    if (dialogMapExcelColumn.ShowDialog() == DialogResult.OK)
                    {
                        dialogMapExcelColumn.Dispose();
                        if (this.marketingIncentiveBLL.ImportExcel(openFileDialog.FileName))
                        {
                            MessageBox.Show(this, "Congratulation!" + "\r\n" + "\r\n" + "File: " + openFileDialog.FileName + " is imported successfull!" + "\r\n" + "\r\n" + "Please press OK to finish.", "Importing", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        }
                    }
                }
            }
            catch (Exception exception)
            {
                GlobalExceptionHandler.ShowExceptionMessageBox(this, exception);
            }
        }
Beispiel #8
0
        public DataMessageBackup()
        {
            try
            {
                InitializeComponent();

                InitializeTabControl();


                this.beginingDateBinding = this.textBoxLowerFillterDate.TextBox.DataBindings.Add("Text", GlobalVariables.GlobalOptionSetting, "LowerFillterDate", true);
                this.endingDateBinding   = this.textBoxUpperFillterDate.TextBox.DataBindings.Add("Text", GlobalVariables.GlobalOptionSetting, "UpperFillterDate", true);

                this.beginingDateBinding.BindingComplete += new BindingCompleteEventHandler(CommonControl_BindingComplete);
                this.endingDateBinding.BindingComplete   += new BindingCompleteEventHandler(CommonControl_BindingComplete);

                this.PropertyChanged += new PropertyChangedEventHandler(DataMessage_PropertyChanged);


                this.dataMessageBLL = new DataMessageBLL();

                this.dataMessageBLL.PropertyChanged += new PropertyChangedEventHandler(dataMessageBLL_PropertyChanged);
            }
            catch (Exception exception)
            {
                GlobalExceptionHandler.ShowExceptionMessageBox(this, exception);
            }
        }
 private void buttonChange_Click(object sender, EventArgs e)
 {
     try
     {
         if (this.textBoxCurrentPassword.Visible)
         {
             this.textBoxCurrentPassword.Visible = false;
             this.textBoxNewPassword.Visible     = true;
             this.textBoxConfirmPassword.Visible = true;
             this.labelCurrentPassword.Visible   = false;
             this.labelNewPassword.Visible       = true;
             this.labelConfirmPassword.Visible   = true;
             this.SetButtonEnabled();
             this.DialogResult = DialogResult.None;
         }
         else
         {
             SQLDatabase.ExecuteNonQuery("UPDATE ListEmployee SET Password = N'" + this.textBoxNewPassword.Text + "' WHERE EmployeeID = " + GlobalVariables.GlobalUserInformation.UserID);
         }
     }
     catch (Exception exception)
     {
         GlobalExceptionHandler.ShowExceptionMessageBox(this, exception);
     }
 }
        private void MainControllingInterface_FormClosing(object sender, FormClosingEventArgs e)
        {
            try
            {
                if (digitInkJetDominoPrinterThread != null && digitInkJetDominoPrinterThread.IsAlive)
                {
                    e.Cancel = true; return;
                }

                if (barcodeInkJetDominoPrinterThread != null && barcodeInkJetDominoPrinterThread.IsAlive)
                {
                    e.Cancel = true; return;
                }

                if (cartonInkJetDominoPrinterThread != null && cartonInkJetDominoPrinterThread.IsAlive)
                {
                    e.Cancel = true; return;
                }


                if (barcodeScannerMCUThread != null && barcodeScannerMCUThread.IsAlive)
                {
                    e.Cancel = true; return;
                }
            }
            catch (Exception exception)
            {
                GlobalExceptionHandler.ShowExceptionMessageBox(this, exception);
            }
        }
Beispiel #11
0
 private void CommonControl_BindingComplete(object sender, BindingCompleteEventArgs e)
 {
     if (e.BindingCompleteState == BindingCompleteState.Exception)
     {
         GlobalExceptionHandler.ShowExceptionMessageBox(this, e.ErrorText); e.Cancel = true;
     }
 }
        private void toolStripButtonConnect_Click(object sender, EventArgs e)
        {
            try
            {
                this.CutTextBox(true);

                //////if (digitInkJetDominoPrinterThread != null && digitInkJetDominoPrinterThread.IsAlive) digitInkJetDominoPrinterThread.Abort();
                //////digitInkJetDominoPrinterThread = new Thread(new ThreadStart(digitInkjetDominoPrinter.ThreadRoutine));
                //////digitInkJetDominoPrinterThread.Start();


                //////if (barcodeInkJetDominoPrinterThread != null && barcodeInkJetDominoPrinterThread.IsAlive) barcodeInkJetDominoPrinterThread.Abort();
                //////barcodeInkJetDominoPrinterThread = new Thread(new ThreadStart(barcodeInkjetDominoPrinter.ThreadRoutine));
                //////barcodeInkJetDominoPrinterThread.Start();

                //////if (cartonInkJetDominoPrinterThread != null && cartonInkJetDominoPrinterThread.IsAlive) cartonInkJetDominoPrinterThread.Abort();
                //////cartonInkJetDominoPrinterThread = new Thread(new ThreadStart(cartonInkjetDominoPrinter.ThreadRoutine));
                //////cartonInkJetDominoPrinterThread.Start();



                if (barcodeScannerMCUThread != null && barcodeScannerMCUThread.IsAlive)
                {
                    barcodeScannerMCUThread.Abort();
                }
                barcodeScannerMCUThread = new Thread(new ThreadStart(barcodeScannerMCU.ThreadRoutine));
                barcodeScannerMCUThread.Start();
            }
            catch (Exception exception)
            {
                GlobalExceptionHandler.ShowExceptionMessageBox(this, exception);
            }
        }
Beispiel #13
0
        private void frmMDIMain_MdiChildActivate(object sender, EventArgs e)
        {
            try
            {
                ToolStripManager.RevertMerge(this.toolStripMDIMain);
                IMergeToolStrip mdiChildMergeToolStrip = ActiveMdiChild as IMergeToolStrip;
                if (mdiChildMergeToolStrip != null)
                {
                    ToolStripManager.Merge(mdiChildMergeToolStrip.ChildToolStrip, toolStripMDIMain);
                }

                ICallToolStrip mdiChildCallToolStrip = ActiveMdiChild as ICallToolStrip;
                if (mdiChildCallToolStrip != null)
                {
                    mdiChildCallToolStrip.PropertyChanged -= new PropertyChangedEventHandler(mdiChildCallToolStrip_PropertyChanged);
                    mdiChildCallToolStrip.PropertyChanged += new PropertyChangedEventHandler(mdiChildCallToolStrip_PropertyChanged);

                    mdiChildCallToolStrip_PropertyChanged(mdiChildCallToolStrip, new PropertyChangedEventArgs("IsDirty"));
                }
            }
            catch (Exception exception)
            {
                GlobalExceptionHandler.ShowExceptionMessageBox(this, exception);
            }
        }
Beispiel #14
0
        void mdiChildCallToolStrip_PropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            try
            {
                ICallToolStrip mdiChildCallToolStrip = sender as ICallToolStrip;
                if (mdiChildCallToolStrip != null)
                {
                    bool closable     = mdiChildCallToolStrip.Closable;
                    bool loadable     = mdiChildCallToolStrip.Loadable;
                    bool newable      = mdiChildCallToolStrip.Newable;
                    bool editable     = mdiChildCallToolStrip.Editable;
                    bool isDirty      = mdiChildCallToolStrip.IsDirty;
                    bool deletable    = mdiChildCallToolStrip.Deletable;
                    bool importable   = mdiChildCallToolStrip.Importable;
                    bool exportable   = mdiChildCallToolStrip.Exportable;
                    bool verifiable   = mdiChildCallToolStrip.Verifiable;
                    bool unverifiable = mdiChildCallToolStrip.Unverifiable;
                    bool printable    = mdiChildCallToolStrip.Printable;
                    bool searchable   = mdiChildCallToolStrip.Searchable;

                    bool readonlyMode = mdiChildCallToolStrip.ReadonlyMode;
                    bool editableMode = mdiChildCallToolStrip.EditableMode;
                    bool isValid      = mdiChildCallToolStrip.IsValid;


                    this.toolStripButtonEscape.Enabled = closable;
                    this.toolStripButtonLoad.Enabled   = loadable && readonlyMode;

                    this.toolStripButtonNew.Enabled    = newable && readonlyMode;
                    this.toolStripButtonEdit.Enabled   = editable && readonlyMode;
                    this.toolStripButtonSave.Enabled   = isDirty && isValid && editableMode;
                    this.toolStripButtonDelete.Enabled = deletable && readonlyMode;

                    this.toolStripButtonImport.Visible    = importable;
                    this.toolStripButtonImport.Enabled    = importable && newable && readonlyMode;
                    this.toolStripButtonExport.Visible    = exportable;
                    this.toolStripButtonExport.Enabled    = exportable;//&& !isDirty && readonlyMode;
                    this.toolStripSeparatorImport.Visible = importable || exportable;

                    this.toolStripButtonVerify.Visible    = verifiable || unverifiable;
                    this.toolStripButtonVerify.Enabled    = verifiable || unverifiable;
                    this.toolStripButtonVerify.Text       = verifiable ? "Verify" : "Unverify";
                    this.toolStripSeparatorVerify.Visible = verifiable || unverifiable;

                    this.toolStripButtonPrint.Visible        = printable;
                    this.toolStripButtonPrint.Enabled        = printable;
                    this.toolStripButtonPrintPreview.Visible = printable;
                    this.toolStripButtonPrintPreview.Enabled = printable;
                    this.toolStripSeparatorPrint.Visible     = printable;

                    this.toolStripComboBoxSearchText.Visible = searchable;
                    this.toolStripButtonSearch.Visible       = searchable;
                }
            }
            catch (Exception exception)
            {
                GlobalExceptionHandler.ShowExceptionMessageBox(this, exception);
            }
        }
Beispiel #15
0
        private void CommonMDI_Load(object sender, EventArgs e)
        {
            try
            {
                Form childForm;

                switch (this.taskID)
                {
                case GlobalEnum.TaskID.DataMessage:
                    childForm = new DataMessage();
                    break;

                case GlobalEnum.TaskID.ListLogo:
                    childForm = new ListLogo();
                    break;

                case GlobalEnum.TaskID.ListFactory:
                    childForm = new ListFactory();
                    break;

                case GlobalEnum.TaskID.ListOwner:
                    childForm = new ListOwner();
                    break;

                case GlobalEnum.TaskID.ListCategory:
                    childForm = new ListCategory();
                    break;

                case GlobalEnum.TaskID.ListProduct:
                    childForm = new ListProduct();
                    break;

                case GlobalEnum.TaskID.ListCoil:
                    childForm = new ListCoil();
                    break;

                case GlobalEnum.TaskID.ListEmployee:
                    childForm = new ListEmployee();
                    break;

                default:
                    childForm = new DataMessage();
                    break;
                }

                if (childForm != null)
                {
                    childForm.MdiParent   = this;
                    childForm.WindowState = FormWindowState.Maximized;
                    childForm.Show();
                }
            }
            catch (Exception exception)
            {
                GlobalExceptionHandler.ShowExceptionMessageBox(this, exception);
            }
        }
Beispiel #16
0
 private void ImportExcel()
 {
     try
     {
     }
     catch (Exception exception)
     {
         GlobalExceptionHandler.ShowExceptionMessageBox(this, exception);
     }
 }
Beispiel #17
0
 public void Export()
 {
     try
     {
     }
     catch (Exception exception)
     {
         GlobalExceptionHandler.ShowExceptionMessageBox(this, exception);
     }
 }
 private void CommonControl_BindingComplete(object sender, BindingCompleteEventArgs e)
 {
     if (e.BindingCompleteState == BindingCompleteState.Exception)
     {
         GlobalExceptionHandler.ShowExceptionMessageBox(this, e.ErrorText); e.Cancel = true;
     }
     else
     {
         this.buttonListEmployee.Visible = this.EmployeeID == 1;
     }
 }
Beispiel #19
0
 private void PublicFind_FormClosing(object sender, FormClosingEventArgs e)
 {
     try
     {
         this.textBoxFilterText.Text = "";
     }
     catch (Exception exception)
     {
         GlobalExceptionHandler.ShowExceptionMessageBox(this, exception);
     }
 }
 private void toolStripButtonLoadData_Click(object sender, EventArgs e)
 {
     try
     {
         this.barcodeScannerMCU.LoadCartonDataTable();
     }
     catch (Exception exception)
     {
         GlobalExceptionHandler.ShowExceptionMessageBox(this, exception);
     }
 }
Beispiel #21
0
 void bindingSource_PositionChanged(object sender, EventArgs e)
 {
     try
     {
         this.UpdateProductName();
     }
     catch (Exception exception)
     {
         GlobalExceptionHandler.ShowExceptionMessageBox(this, exception);
     }
 }
Beispiel #22
0
 private void ManageProductName_FormClosing(object sender, FormClosingEventArgs e)
 {
     try
     {
         this.UpdateProductName();
     }
     catch (Exception exception)
     {
         e.Cancel = true;
         GlobalExceptionHandler.ShowExceptionMessageBox(this, exception);
     }
 }
 private void InkjetDominoPrinter_PropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     try
     {
         ThreadShowStatus delegateThreadShowStatus = new ThreadShowStatus(inkjetDominoPrinterShowStatus);
         this.Invoke(delegateThreadShowStatus, new object[] { sender, e });
     }
     catch (Exception exception)
     {
         GlobalExceptionHandler.ShowExceptionMessageBox(this, exception);
     }
 }
Beispiel #24
0
        private void CommonControl_BindingComplete(object sender, BindingCompleteEventArgs e)
        {
            try
            {
                if (e.BindingCompleteState == BindingCompleteState.Exception)
                {
                    GlobalExceptionHandler.ShowExceptionMessageBox(this, e.ErrorText); e.Cancel = true;
                }

                else
                if (sender is Binding)
                {
                    if (sender.Equals(this.logoIDBinding))
                    {
                        this.dataMessageBLL.DataMessageMaster.LogoName = (this.comboBoxLogoID.SelectedIndex != -1 && this.comboBoxLogoID.SelectedItem != null) ? (string)((DataRowView)this.comboBoxLogoID.SelectedItem)["Description"] : "";
                        this.dataMessageBLL.DataMessageMaster.LogoLogo = (this.comboBoxLogoID.SelectedIndex != -1 && this.comboBoxLogoID.SelectedItem != null) ? (string)((DataRowView)this.comboBoxLogoID.SelectedItem)["LogoGenerator"] : "";
                    }

                    if (sender.Equals(this.factoryIDBinding))
                    {
                        this.dataMessageBLL.DataMessageMaster.FactoryName = (this.comboBoxFactoryID.SelectedIndex != -1 && this.comboBoxFactoryID.SelectedItem != null) ? (string)((DataRowView)this.comboBoxFactoryID.SelectedItem)["Description"] : "";
                        this.dataMessageBLL.DataMessageMaster.FactoryLogo = (this.comboBoxFactoryID.SelectedIndex != -1 && this.comboBoxFactoryID.SelectedItem != null) ? (string)((DataRowView)this.comboBoxFactoryID.SelectedItem)["LogoGenerator"] : "";
                    }

                    if (sender.Equals(this.ownerIDBinding))
                    {
                        this.dataMessageBLL.DataMessageMaster.OwnerName = (this.comboBoxOwnerID.SelectedIndex != -1 && this.comboBoxOwnerID.SelectedItem != null) ? (string)((DataRowView)this.comboBoxOwnerID.SelectedItem)["Description"] : "";
                        this.dataMessageBLL.DataMessageMaster.OwnerLogo = (this.comboBoxOwnerID.SelectedIndex != -1 && this.comboBoxOwnerID.SelectedItem != null) ? (string)((DataRowView)this.comboBoxOwnerID.SelectedItem)["LogoGenerator"] : "";
                    }

                    if (sender.Equals(this.categoryIDBinding))
                    {
                        this.dataMessageBLL.DataMessageMaster.CategoryName = (this.comboBoxCategoryID.SelectedIndex != -1 && this.comboBoxCategoryID.SelectedItem != null) ? (string)((DataRowView)this.comboBoxCategoryID.SelectedItem)["Description"] : "";
                        this.dataMessageBLL.DataMessageMaster.CategoryLogo = (this.comboBoxCategoryID.SelectedIndex != -1 && this.comboBoxCategoryID.SelectedItem != null) ? (string)((DataRowView)this.comboBoxCategoryID.SelectedItem)["LogoGenerator"] : "";
                    }

                    if (sender.Equals(this.productIDBinding))
                    {
                        this.dataMessageBLL.DataMessageMaster.ProductName = (this.comboBoxProductID.SelectedIndex != -1 && this.comboBoxProductID.SelectedItem != null) ? (string)((DataRowView)this.comboBoxProductID.SelectedItem)["Description"] : "";
                        this.dataMessageBLL.DataMessageMaster.ProductLogo = (this.comboBoxProductID.SelectedIndex != -1 && this.comboBoxProductID.SelectedItem != null) ? (string)((DataRowView)this.comboBoxProductID.SelectedItem)["LogoGenerator"] : "";
                    }

                    if (sender.Equals(this.coilIDBinding))
                    {
                        this.dataMessageBLL.DataMessageMaster.CoilCode = (this.comboBoxCoilID.SelectedIndex != -1 && this.comboBoxCoilID.SelectedItem != null) ? (string)((DataRowView)this.comboBoxCoilID.SelectedItem)["Description"] : "";
                    }
                }
            }
            catch (Exception exception)
            {
                GlobalExceptionHandler.ShowExceptionMessageBox(this, exception);
            }
        }
Beispiel #25
0
 private void PublicGetServerName_Load(object sender, EventArgs e)
 {
     try
     {
         this.textBoxServerName.Text   = GlobalRegistry.Read("ServerName");
         this.textBoxDatabaseName.Text = GlobalRegistry.Read("DatabaseName");
     }
     catch (Exception ex)
     {
         GlobalExceptionHandler.ShowExceptionMessageBox(this, ex);
     }
 }
Beispiel #26
0
 void productIDBinding_BindingComplete(object sender, BindingCompleteEventArgs e)
 {
     if (e.BindingCompleteState != BindingCompleteState.Success)
     {
         GlobalExceptionHandler.ShowExceptionMessageBox(this, e.ErrorText); e.Cancel = true;
     }
     else
     {
         this.privateFillingLineData.ProductCode         = this.comboBoxProductID.SelectedIndex != -1 ? (string)((DataRowView)this.comboBoxProductID.SelectedItem)["ProductCode"] : "";
         this.privateFillingLineData.ProductCodeOriginal = this.comboBoxProductID.SelectedIndex != -1 ? (string)((DataRowView)this.comboBoxProductID.SelectedItem)["ProductCodeOriginal"] : "";
     }
 }
Beispiel #27
0
 private void dataGridViewDataMessageMaster_CellValueChanged(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         if (this.dataMessageBLL != null && this.IsDirty)
         {
             this.dataMessageBLL.Save();
         }
     }
     catch (Exception exception)
     {
         GlobalExceptionHandler.ShowExceptionMessageBox(this, exception);
     }
 }
Beispiel #28
0
 private void dataGridViewDataMessageMaster_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
 {
     try
     {
         using (SolidBrush b = new SolidBrush(dataGridViewDataMessageMaster.RowHeadersDefaultCellStyle.ForeColor))
         {
             e.Graphics.DrawString((e.RowIndex + 1).ToString(), e.InheritedRowStyle.Font, b, e.RowBounds.Location.X + 15, e.RowBounds.Location.Y + 4);
         }
     }
     catch (Exception exception)
     {
         GlobalExceptionHandler.ShowExceptionMessageBox(this, exception);
     }
 }
 private void toolStripButtonMessageCount_Click(object sender, EventArgs e)
 {
     try
     {
         if (MessageBox.Show("Are you sure you want to reallocate the matching pack queue?", "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2) == System.Windows.Forms.DialogResult.Yes)
         {
             this.barcodeScannerMCU.ReAllocation();
         }
     }
     catch (Exception exception)
     {
         GlobalExceptionHandler.ShowExceptionMessageBox(this, exception);
     }
 }
Beispiel #30
0
        private void ListCategory_Load(object sender, EventArgs e)
        {
            try
            {
                InitializeCommonControlBinding();

                InitializeDataGridBinding();

                InitializeReadOnlyModeBinding();
            }
            catch (Exception exception)
            {
                GlobalExceptionHandler.ShowExceptionMessageBox(this, exception);
            }
        }