Beispiel #1
0
        private void onReceiptMasterDBCError(DBConcurrencyException dbcx)
        {
            try
            {
                MDataSet.ReceiptMasterDataTable _tmp = new MDataSet.ReceiptMasterDataTable();


                this.receiptMasterTableAdapter.FillByPeriodNum(_tmp, 0);
                this.mDataSet.ReceiptMaster.Merge(_tmp);

                dbcx.Row.RowError = "";
            }
            catch (Exception err)

            {
                MessageBox.Show(err.Message);

                MainForm.Log("onReceiptMasterDBCError" + err.Message);
            }
        }
Beispiel #2
0
        private bool SaveChanges()
        {
            if (_changes.Count > 0)
            {
                int res;

                try
                {
                    res = (this.ParentForm as MainForm).productTableAdapter1.Update(_product as FullDataSet.ProductDataTable);
                    MessageBox.Show("Сохранено : " + res.ToString());
                }
                catch (Exception err)

                {
                    MessageBox.Show(err.Message);
                    MainForm.Log(err.Message);
                    return(false);
                }
            }


            return(true);
        }