Beispiel #1
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            try
            {
                FillTable("LocalSetting");
                FillTable("Periods");
                FillTable("Cash");
                FillTable("Product");
                FillTable("Remains");
            }

            catch (Exception err)
            {
                MessageBox.Show("MainForm_Load ERROR " + err.Message);
                Log("MainForm_Load ERROR " + err.Message + " " + err.Source + err.InnerException.Message);
            }
            finally
            {
                Log("MainForm_Load   finally");
            }

            if (LocalSettingRow == null)
            {
                MessageBox.Show("Не найдена строка настроек");
                Log("LocalSettingRow == null ");

                Application.Exit();
                return;
            }

            FormLogon _logon = new FormLogon(LocalSettingRow);

            if (DialogResult.OK != _logon.ShowDialog(this))
            {
                Application.Exit();
                return;
            }

            this.LabelUser.Text = LocalSettingRow.FullName;
            this.Text          += " : " + LocalSettingRow.Name;



            SanseeGridLocalizer gLocalizer = new SanseeGridLocalizer();

            GridLocalizer.Active = gLocalizer;



            thread.Abort();
            Thread.Sleep(30);

            /*   this.Size = Properties.Settings.Default.MySize;
             *
             * this.Location = Properties.Settings.Default.MyLoc;
             *
             * this.WindowState = Properties.Settings.Default.MyState;
             */


            //  System.Configuration.AppSettingsReader app = new System.Configuration.AppSettingsReader();

            //   MessageBox.Show(app.GetValue("RetailTradeConnectionString", System.Type.GetType("System.String")).ToString());

            this.mDataSet.ReceiptDetail.ColumnChanging += new DataColumnChangeEventHandler(ReceiptDetailColumn_Changing);
            this.mDataSet.ReceiptDetail.RowChanged     += new DataRowChangeEventHandler(ReceiptDetail_RowChanged);
            this.mDataSet.ReceiptDetail.TableNewRow    += new DataTableNewRowEventHandler(ReceiptDetail_TableNewRow);
            this.mDataSet.ReceiptDetail.RowDeleted     += new DataRowChangeEventHandler(ReceiptDetail_RowDeleted);
            this.mDataSet.ReceiptDetail.RowDeleting    += new DataRowChangeEventHandler(ReceiptDetail_RowDeleting);



            this.mDataSet.InvoiceMaster.ColumnChanging += new DataColumnChangeEventHandler(InvoiceMasterColumn_Changing);

            this.mDataSet.InvoiceMaster.ColumnChanged += new  DataColumnChangeEventHandler(InvoiceMasterColumn_Changed);

            this.mDataSet.InvoiceDetail.ColumnChanging += new DataColumnChangeEventHandler(InvoiceDetailColumn_Changing);
            this.mDataSet.InvoiceDetail.ColumnChanged  += new DataColumnChangeEventHandler(InvoiceDetailColumn_Changed);
            this.mDataSet.InvoiceDetail.RowDeleting    += new DataRowChangeEventHandler(InvoiceDetail_RowDeleting);
            this.mDataSet.InvoiceDetail.TableNewRow    += new DataTableNewRowEventHandler(InvoiceDetail_TableNewRow);
            this.mDataSet.InvoiceDetail.RowDeleted     += new DataRowChangeEventHandler(InvoiceDetail_RowDeleted);
            this.mDataSet.InvoiceDetail.RowChanged     += new DataRowChangeEventHandler(InvoiceDetail_RowChanged);


            _changesInvoiceDetail = new DataView(this.mDataSet.InvoiceDetail, null, null, DataViewRowState.Added | DataViewRowState.ModifiedCurrent | DataViewRowState.Deleted);

            //if (this.LocalSettingRow.Printer == "Maria")
            //{
            //    this.MariaMenu.Visible = true;
            //    this.DatecsMenu.Visible = false;

            //}
            //else
            //{
            //    this.MariaMenu.Visible = false;
            //    this.DatecsMenu.Visible = true;

            //}

            Log("MainForm_Load True ");
            ShowNewDataTab("InvoiceTradePutletAll", "Расходные документы");
        }
Beispiel #2
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            try
            {
                FillTable("TradePutlet");
                FillTable("Stock");
                FillTable("Periods");
                FillTable("Manufacturer");

                FillTable("Product");
                FillTable("Organization");
                FillTable("Remains");
            }

            catch (Exception err)
            {
                MessageBox.Show("MainForm_Load ERROR " + err.Message);
                Log("MainForm_Load ERROR " + err.Message + " " + err.Source + err.InnerException.Message);
            }
            finally
            {
                Log("MainForm_Load   finally");
            }



            SanseeGridLocalizer gLocalizer = new SanseeGridLocalizer();

            GridLocalizer.Active = gLocalizer;



            thread.Abort();
            Thread.Sleep(30);

            /*   this.Size = Properties.Settings.Default.MySize;
             *
             * this.Location = Properties.Settings.Default.MyLoc;
             *
             * this.WindowState = Properties.Settings.Default.MyState;
             */


            //  System.Configuration.AppSettingsReader app = new System.Configuration.AppSettingsReader();

            //   MessageBox.Show(app.GetValue("RetailTradeConnectionString", System.Type.GetType("System.String")).ToString());

            this.mDataSet.ReceiptDetail.ColumnChanging += new DataColumnChangeEventHandler(ReceiptDetailColumn_Changing);
            this.mDataSet.ReceiptDetail.RowChanged     += new DataRowChangeEventHandler(ReceiptDetail_RowChanged);
            this.mDataSet.ReceiptDetail.TableNewRow    += new DataTableNewRowEventHandler(ReceiptDetail_TableNewRow);
            this.mDataSet.ReceiptDetail.RowDeleted     += new DataRowChangeEventHandler(ReceiptDetail_RowDeleted);
            this.mDataSet.ReceiptDetail.RowDeleting    += new DataRowChangeEventHandler(ReceiptDetail_RowDeleting);



            this.mDataSet.InvoiceMaster.ColumnChanging += new DataColumnChangeEventHandler(InvoiceMasterColumn_Changing);

            this.mDataSet.InvoiceMaster.ColumnChanged += new  DataColumnChangeEventHandler(InvoiceMasterColumn_Changed);

            this.mDataSet.InvoiceDetail.ColumnChanging += new DataColumnChangeEventHandler(InvoiceDetailColumn_Changing);
            this.mDataSet.InvoiceDetail.RowDeleting    += new DataRowChangeEventHandler(InvoiceDetail_RowDeleting);
            this.mDataSet.InvoiceDetail.TableNewRow    += new DataTableNewRowEventHandler(InvoiceDetail_TableNewRow);
            this.mDataSet.InvoiceDetail.RowDeleted     += new DataRowChangeEventHandler(InvoiceDetail_RowDeleted);
            this.mDataSet.InvoiceDetail.RowChanged     += new DataRowChangeEventHandler(InvoiceDetail_RowChanged);
            _changesInvoiceDetail = new DataView(this.mDataSet.InvoiceDetail, null, null, DataViewRowState.Added | DataViewRowState.ModifiedCurrent | DataViewRowState.Deleted);


            this.userLabel.Text = "";

            Log("MainForm_Load True ");
        }
Beispiel #3
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            
            try
            {
                FillTable("LocalSetting");
                FillTable("Periods");
                FillTable("Cash");
                FillTable("Product");
                FillTable("Remains");
            }

            catch (Exception err)
            {
                MessageBox.Show("MainForm_Load ERROR " + err.Message);
                Log("MainForm_Load ERROR " + err.Message + " " + err.Source + err.InnerException.Message);
            }
            finally
            {
                Log("MainForm_Load   finally");
            
            }

            if (LocalSettingRow == null)
            {
                MessageBox.Show("Не найдена строка настроек");
                Log("LocalSettingRow == null ");
      
                Application.Exit();
                return;
            }

            FormLogon _logon = new FormLogon(LocalSettingRow);

            if (DialogResult.OK != _logon.ShowDialog(this))
            {
                Application.Exit();
                return;
            }

            this.LabelUser.Text = LocalSettingRow.FullName;
            this.Text += " : " + LocalSettingRow.Name; 

            
            
            SanseeGridLocalizer gLocalizer = new SanseeGridLocalizer();
            GridLocalizer.Active = gLocalizer;
         
            
         
            thread.Abort();
            Thread.Sleep(30);

         /*   this.Size = Properties.Settings.Default.MySize;

            this.Location = Properties.Settings.Default.MyLoc;

            this.WindowState = Properties.Settings.Default.MyState;
            */
            
           
          //  System.Configuration.AppSettingsReader app = new System.Configuration.AppSettingsReader();

         //   MessageBox.Show(app.GetValue("RetailTradeConnectionString", System.Type.GetType("System.String")).ToString());

            this.mDataSet.ReceiptDetail.ColumnChanging += new DataColumnChangeEventHandler(ReceiptDetailColumn_Changing);
            this.mDataSet.ReceiptDetail.RowChanged+=new DataRowChangeEventHandler(ReceiptDetail_RowChanged);
            this.mDataSet.ReceiptDetail.TableNewRow+=new DataTableNewRowEventHandler(ReceiptDetail_TableNewRow);  
            this.mDataSet.ReceiptDetail.RowDeleted+=new DataRowChangeEventHandler(ReceiptDetail_RowDeleted);
            this.mDataSet.ReceiptDetail.RowDeleting+=new DataRowChangeEventHandler(ReceiptDetail_RowDeleting);



            this.mDataSet.InvoiceMaster.ColumnChanging += new DataColumnChangeEventHandler(InvoiceMasterColumn_Changing);
            
            this.mDataSet.InvoiceMaster.ColumnChanged += new  DataColumnChangeEventHandler (InvoiceMasterColumn_Changed);
       
            this.mDataSet.InvoiceDetail.ColumnChanging += new DataColumnChangeEventHandler(InvoiceDetailColumn_Changing);
            this.mDataSet.InvoiceDetail.ColumnChanged += new DataColumnChangeEventHandler(InvoiceDetailColumn_Changed);
            this.mDataSet.InvoiceDetail.RowDeleting += new DataRowChangeEventHandler(InvoiceDetail_RowDeleting);
            this.mDataSet.InvoiceDetail.TableNewRow+=new DataTableNewRowEventHandler(InvoiceDetail_TableNewRow);
            this.mDataSet.InvoiceDetail.RowDeleted+=new DataRowChangeEventHandler(InvoiceDetail_RowDeleted);
            this.mDataSet.InvoiceDetail.RowChanged+=new DataRowChangeEventHandler(InvoiceDetail_RowChanged);
         

            _changesInvoiceDetail = new DataView(this.mDataSet.InvoiceDetail,null,null,DataViewRowState.Added | DataViewRowState.ModifiedCurrent|DataViewRowState.Deleted);

            //if (this.LocalSettingRow.Printer == "Maria")
            //{
            //    this.MariaMenu.Visible = true;
            //    this.DatecsMenu.Visible = false;

            //}
            //else
            //{
            //    this.MariaMenu.Visible = false;
            //    this.DatecsMenu.Visible = true;

            //}

            Log("MainForm_Load True ");    
            ShowNewDataTab("InvoiceTradePutletAll", "Расходные документы");
        }
Beispiel #4
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            try
            {
                FillTable("TradePutlet");
                FillTable("Stock");
                FillTable("Periods");
                FillTable("Manufacturer");

                FillTable("Product");
                FillTable("Organization");
                FillTable("Remains");



            }

            catch (Exception err)
            {
                MessageBox.Show("MainForm_Load ERROR " + err.Message);
                Log("MainForm_Load ERROR " + err.Message + " " + err.Source + err.InnerException.Message);
            }
            finally
            {
                Log("MainForm_Load   finally");
            
            }

           


            SanseeGridLocalizer gLocalizer = new SanseeGridLocalizer();
            GridLocalizer.Active = gLocalizer;
         
            
         
            thread.Abort();
            Thread.Sleep(30);

         /*   this.Size = Properties.Settings.Default.MySize;

            this.Location = Properties.Settings.Default.MyLoc;

            this.WindowState = Properties.Settings.Default.MyState;
            */
            
           
          //  System.Configuration.AppSettingsReader app = new System.Configuration.AppSettingsReader();

         //   MessageBox.Show(app.GetValue("RetailTradeConnectionString", System.Type.GetType("System.String")).ToString());

            this.mDataSet.ReceiptDetail.ColumnChanging += new DataColumnChangeEventHandler(ReceiptDetailColumn_Changing);
            this.mDataSet.ReceiptDetail.RowChanged+=new DataRowChangeEventHandler(ReceiptDetail_RowChanged);
            this.mDataSet.ReceiptDetail.TableNewRow+=new DataTableNewRowEventHandler(ReceiptDetail_TableNewRow);  
            this.mDataSet.ReceiptDetail.RowDeleted+=new DataRowChangeEventHandler(ReceiptDetail_RowDeleted);
            this.mDataSet.ReceiptDetail.RowDeleting+=new DataRowChangeEventHandler(ReceiptDetail_RowDeleting);



            this.mDataSet.InvoiceMaster.ColumnChanging += new DataColumnChangeEventHandler(InvoiceMasterColumn_Changing);
            
            this.mDataSet.InvoiceMaster.ColumnChanged += new  DataColumnChangeEventHandler (InvoiceMasterColumn_Changed);
       
            this.mDataSet.InvoiceDetail.ColumnChanging += new DataColumnChangeEventHandler(InvoiceDetailColumn_Changing);
            this.mDataSet.InvoiceDetail.RowDeleting += new DataRowChangeEventHandler(InvoiceDetail_RowDeleting);
            this.mDataSet.InvoiceDetail.TableNewRow+=new DataTableNewRowEventHandler(InvoiceDetail_TableNewRow);
            this.mDataSet.InvoiceDetail.RowDeleted+=new DataRowChangeEventHandler(InvoiceDetail_RowDeleted);
            this.mDataSet.InvoiceDetail.RowChanged+=new DataRowChangeEventHandler(InvoiceDetail_RowChanged);
            _changesInvoiceDetail = new DataView(this.mDataSet.InvoiceDetail,null,null,DataViewRowState.Added | DataViewRowState.ModifiedCurrent|DataViewRowState.Deleted);


            this.userLabel.Text = "";
         
            Log("MainForm_Load True ");
      
        }