Esempio n. 1
0
        public 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.qrSotr = "SELECT dbo.Sotr.Surname_Sotr + ' ' + dbo.Sotr.Name_Sotr + ' ' + dbo.Sotr.Middle_name_Sotr, dbo.Sotr.The_date_of_the_Rojd, dbo.Access_rights.Dolj FROM   dbo.Access_rights INNER JOIN dbo.Profile ON dbo.Access_rights.ID_Access_rights = dbo.Profile.Access_rights_ID INNER JOIN dbo.Sotr ON dbo.Profile.Login_Profile = dbo.Sotr.Login_Sotr ORDER BY dbo.Access_rights.Dolj ASC";
                data.dtSotrFill();
                ExcelDocument document = new ExcelDocument();
                document.dtDannieSklada = data.dtSotr;
                document.SpisokSotr();
                break;
            }
        }
Esempio n. 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;
            }
        }