Example #1
0
        private void PrihLoad()
        {
            Action action = () =>
            {
                try
                {
                    DataBaseTables dataComb = new DataBaseTables();
                    dataComb.dtPrihod.Clear();
                    dataComb.dtPrihodFill();
                    dataComb.dependency.OnChange       += Prihonchange;
                    dataGridView1.DataSource            = dataComb.dtPrihod;
                    dataGridView1.Columns[0].Visible    = false;
                    dataGridView1.Columns[1].Visible    = false;
                    dataGridView1.Columns[2].HeaderText = "Товар";
                    dataGridView1.Columns[2].Width      = 300;
                    dataGridView1.Columns[3].HeaderText = "Количество";
                }
                catch
                {
                }
            };

            Invoke(action);
        }
Example #2
0
        private void otch()
        {
            Documentacia configurationForm = new Documentacia();

            configurationForm.Documentacia_Load(null, null);
            switch (Registry_Class.DirPath == "Empry" || Registry_Class.OrganizationName == "Empty" ||
                    Registry_Class.DocBM == 0.0 || Registry_Class.DocTM == 0.0 ||
                    Registry_Class.DocRM == 0.0 || Registry_Class.DocLM == 0.0)
            {
            case (true):

                configurationForm.ShowDialog();
                break;

            case (false):
                DataBaseTables data = new DataBaseTables();
                data.qrPrihod = "SELECT 'Фирма: ' + dbo.Firma.NaimFir + ' Вид: ' + dbo.Vidi_Tov.Naim + ' Пол: ' + dbo.Pol.Pol + ' Цвет: ' + dbo.Cvet_Tov.Cvet + ' Наимнование товара: ' + dbo.Tovar.Naim AS 'Наименование товара', dbo.Prihod.Kol_vo_Tov FROM   dbo.Cvet_Tov INNER JOIN dbo.Tovar ON dbo.Cvet_Tov.ID_Cvet = dbo.Tovar.ID_Cvet INNER JOIN dbo.Firma ON dbo.Tovar.Firm_ID = dbo.Firma.ID_Firm INNER JOIN dbo.Pol ON dbo.Tovar.ID_Pol = dbo.Pol.ID_Pol INNER JOIN dbo.Prihod ON dbo.Tovar.ID_Tovar = dbo.Prihod.ID_Tovar INNER JOIN dbo.Vidi_Tov ON dbo.Tovar.ID_Vid = dbo.Vidi_Tov.ID_Vid ";
                data.dtPrihodFill();
                ExcelDocument document = new ExcelDocument();
                document.dtDannieSklada = data.dtPrihod;
                document.SpisokOnPrih();
                break;
            }
        }