예제 #1
0
        public void dgvSelecionFill()
        {
            Action action = () =>
            {
                try
                {
                    DataBaseTables data = new DataBaseTables();
                    tables.dtMedicamentiFill();
                    tables.dependency.OnChange        += onchangeApplication;
                    dgvSelection.DataSource            = tables.dtMedicamenti;
                    dgvSelection.Columns[0].Visible    = true;
                    dgvSelection.Columns[1].HeaderText = "Количество выданных медикаментов";
                    dgvSelection.Columns[2].Visible    = false;
                    dgvSelection.Columns[3].Visible    = false;
                    dgvSelection.Columns[4].HeaderText = "Номер чека";
                    dgvSelection.Columns[5].HeaderText = "Название медикаментов";
                    dgvSelection.Columns[8].Visible    = false;
                    dgvSelection.Columns[9].Visible    = false;
                    dgvSelection.Columns[10].Visible   = false;
                    dgvSelection.Columns[11].Visible   = false;
                    dgvSelection.Columns[12].Visible   = false;
                    dgvSelection.Columns[13].Visible   = false;
                    dgvSelection.Columns[14].Visible   = false;
                }
                catch
                {
                }
            };

            Invoke(action);
        }
예제 #2
0
        public void cmbFirmaFill()
        {
            Action action = () =>
            {
                try
                {
                    DataBaseTables tables_firma = new DataBaseTables();
                    tables_firma.dtFirmaFill();
                    classDynamicObjects.cmbIDFirm.DataSource    = tables_firma.dtFirma;
                    classDynamicObjects.cmbIDFirm.DisplayMember = "firma";
                    classDynamicObjects.cmbIDFirm.ValueMember   = "id_firma";
                }
                catch
                {
                }
            };

            Invoke(action);
        }
예제 #3
0
        public void cmbTovar_na_skladeFill()
        {
            Action action = () =>
            {
                try
                {
                    DataBaseTables tables_tovar_na_sklade = new DataBaseTables();
                    tables_tovar_na_sklade.dtTovar_na_skladeFill();
                    classDynamicObjects.cmbIDTovNaSklade.DataSource    = tables_tovar_na_sklade.dtTovar_na_sklade;
                    classDynamicObjects.cmbIDTovNaSklade.DisplayMember = "tovar na skalde";
                    classDynamicObjects.cmbIDTovNaSklade.ValueMember   = "id_tovar_na_sklade";
                }
                catch
                {
                }
            };

            Invoke(action);
        }
예제 #4
0
        public void cmbInstrFill()
        {
            Action action = () =>
            {
                try
                {
                    DataBaseTables tables_instr = new DataBaseTables();
                    tables_instr.dtInstr_raboty_kassiraFill();
                    classIncomeForm.cmbIDInstrRabKass.DataSource    = tables_instr.dtInstr_raboty_kassira;
                    classIncomeForm.cmbIDInstrRabKass.DisplayMember = "instr_raboty_kassira";
                    classIncomeForm.cmbIDInstrRabKass.ValueMember   = "id_instr_raboty_kassira";
                }
                catch
                {
                }
            };

            Invoke(action);
        }
예제 #5
0
        public void cmbDocumentFill()
        {
            Action action = () =>
            {
                try
                {
                    DataBaseTables tables_doc = new DataBaseTables();
                    tables_doc.dtDocumentFill();
                    classDynamicObjects.cmbIDDocument.DataSource    = tables_doc.dtDocument;
                    classDynamicObjects.cmbIDDocument.DisplayMember = "document";
                    classDynamicObjects.cmbIDDocument.ValueMember   = "id_document";
                }
                catch
                {
                }
            };

            Invoke(action);
        }
예제 #6
0
        public void cmbIdentFill()
        {
            Action action = () =>
            {
                try
                {
                    DataBaseTables tables_ident = new DataBaseTables();
                    tables_ident.dtIdent_tov_partyFill();
                    classDynamicObjects.cmbIDIdent.DataSource    = tables_ident.dtIdent_tov_party;
                    classDynamicObjects.cmbIDIdent.DisplayMember = "ident_tov_party";
                    classDynamicObjects.cmbIDIdent.ValueMember   = "id_ident_tov_party";
                }
                catch
                {
                }
            };

            Invoke(action);
        }
예제 #7
0
        public void cmbProdaja_tovFill()
        {
            Action action = () =>
            {
                try
                {
                    DataBaseTables tables_prodaja = new DataBaseTables();
                    tables_prodaja.dtProdaja_tovaraFill();
                    classDynamicObjects.cmbIDProdajaTov.DataSource    = tables_prodaja.dtProdaja_tovara;
                    classDynamicObjects.cmbIDProdajaTov.DisplayMember = "prodaja_tovara";
                    classDynamicObjects.cmbIDProdajaTov.ValueMember   = "id_prodaja_tovara";
                }
                catch
                {
                }
            };

            Invoke(action);
        }
예제 #8
0
        public void cmbPribil_i_rashodiFill()
        {
            Action action = () =>
            {
                try
                {
                    DataBaseTables tables_pribil = new DataBaseTables();
                    tables_pribil.dtPribil_i_rashodiFill();
                    classDynamicObjects.cmbIDPribil_i_rashodi.DataSource    = tables_pribil.dtPribil_i_rashodi;
                    classDynamicObjects.cmbIDPribil_i_rashodi.DisplayMember = "pribil_i_rashodi";
                    classDynamicObjects.cmbIDPribil_i_rashodi.ValueMember   = "id_pribil_i_rashodi";
                }
                catch
                {
                }
            };

            Invoke(action);
        }
예제 #9
0
        public void cmbTabel_rab_vremeniFill()
        {
            Action action = () =>
            {
                try
                {
                    DataBaseTables tables_rab_vremeni = new DataBaseTables();
                    tables_rab_vremeni.dtTabel_rab_vremeniFill();
                    classStaffForm.cmbIDTabVremya.DataSource    = tables_rab_vremeni.dtTabel_rab_vremeni;
                    classStaffForm.cmbIDTabVremya.DisplayMember = "tabel_rab_vremeni";
                    classStaffForm.cmbIDTabVremya.ValueMember   = "id_tabel_rab_vremeni";
                }
                catch
                {
                }
            };

            Invoke(action);
        }
예제 #10
0
        public void cmbRoleFill()
        {
            Action action = () =>
            {
                try
                {
                    DataBaseTables tables_role = new DataBaseTables();
                    tables_role.dtRoleFill();
                    classStaffForm.cmbIDRole.DataSource    = tables_role.dtRole;
                    classStaffForm.cmbIDRole.DisplayMember = "role";
                    classStaffForm.cmbIDRole.ValueMember   = "id_role";
                }
                catch
                {
                }
            };

            Invoke(action);
        }
예제 #11
0
        public void cmbAccountFill()
        {
            Action action = () =>
            {
                try
                {
                    DataBaseTables tables_account = new DataBaseTables();
                    tables_account.dtAccountFill();
                    classStaffForm.cmbTypeAccount.DataSource    = tables_account.dtAccount;
                    classStaffForm.cmbTypeAccount.DisplayMember = "account";
                    classStaffForm.cmbTypeAccount.ValueMember   = "id_account";
                }
                catch
                {
                }
            };

            Invoke(action);
        }
예제 #12
0
        public void cmbDogovorFill()//Заполнение ComboBox
        {
            Action action = () =>
            {
                try
                {
                    DataBaseTables tables_dogovor = new DataBaseTables();
                    tables_dogovor.dtDogovorFill();//Заполнение данными
                    classStaffForm.cmbIDDogovor.DataSource    = tables_dogovor.dtDogovor;
                    classStaffForm.cmbIDDogovor.DisplayMember = "dogovor";
                    classStaffForm.cmbIDDogovor.ValueMember   = "id_dogovor";
                }
                catch
                {
                }
            };

            Invoke(action);
        }
예제 #13
0
        public void cmbSoiskatelFill()
        {
            Action action = () =>
            {
                try
                {
                    DataBaseTables tables_soiskatel = new DataBaseTables();
                    tables_soiskatel.dtSoiskatelFill();
                    classDynamicObjects.cmbIDSoiskatel.DataSource    = tables_soiskatel.dtSoiskatel;
                    classDynamicObjects.cmbIDSoiskatel.DisplayMember = "soiskatel";
                    classDynamicObjects.cmbIDSoiskatel.ValueMember   = "id_soiskatel";
                }
                catch
                {
                }
            };

            Invoke(action);
        }
예제 #14
0
        public void cmbKadr_perestanovkiFill()
        {
            Action action = () =>
            {
                try
                {
                    DataBaseTables tables_kadr_perestanovki = new DataBaseTables();
                    tables_kadr_perestanovki.dtKadr_perestanovkiFill();
                    classDynamicObjects.cmbIDKadrPere.DataSource    = tables_kadr_perestanovki.dtKadr_perestanovki;
                    classDynamicObjects.cmbIDKadrPere.DisplayMember = "kdar_perestanovki";
                    classDynamicObjects.cmbIDKadrPere.ValueMember   = "id_kadr_perestanovki";
                }
                catch
                {
                }
            };

            Invoke(action);
        }
예제 #15
0
        public void cmbComboBox_DoljFill()
        {
            Action action = () =>
            {
                try
                {
                    DataBaseTables tables_dolj = new DataBaseTables();
                    tables_dolj.dtDoljnostFill();
                    classIncomeForm.cmbIDDoljnost.DataSource    = tables_dolj.dtDoljnost;
                    classIncomeForm.cmbIDDoljnost.DisplayMember = "doljnost";
                    classIncomeForm.cmbIDDoljnost.ValueMember   = "id_doljnost";
                }
                catch
                {
                }
            };

            Invoke(action);
        }
예제 #16
0
        public void cmbTabel_zarplataFill()
        {
            Action action = () =>
            {
                try
                {
                    DataBaseTables tables_tabel_zarplata = new DataBaseTables();
                    tables_tabel_zarplata.dtTabel_zarplataFill();
                    classDynamicObjects.cmbIDTabelZarplata.DataSource    = tables_tabel_zarplata.dtTabel_zarplata;
                    classDynamicObjects.cmbIDTabelZarplata.DisplayMember = "tabel_zarplata";
                    classDynamicObjects.cmbIDTabelZarplata.ValueMember   = "id_tabel_zarplata";
                }
                catch
                {
                }
            };

            Invoke(action);
        }
예제 #17
0
        public void cmbComboBox_SotrFill()
        {
            Action action = () =>
            {
                try
                {
                    DataBaseTables tables_sotr = new DataBaseTables();
                    tables_sotr.dtSotrudnikFill();
                    classIncomeForm.cmbIDSotrydnikC.DataSource    = tables_sotr.dtSotrudnik;
                    classIncomeForm.cmbIDSotrydnikC.DisplayMember = "sotrudnik";
                    classIncomeForm.cmbIDSotrydnikC.ValueMember   = "id_sotrudnik";
                }
                catch
                {
                }
            };

            Invoke(action);
        }
예제 #18
0
        public void cmbPostavkaiFill()
        {
            Action action = () =>
            {
                try
                {
                    DataBaseTables tables_postavka = new DataBaseTables();
                    tables_postavka.dtPostavkaFill();
                    classDynamicObjects.cmbIDPostavka.DataSource    = tables_postavka.dtPostavka;
                    classDynamicObjects.cmbIDPostavka.DisplayMember = "postavka";
                    classDynamicObjects.cmbIDPostavka.ValueMember   = "id_postavka";
                }
                catch
                {
                }
            };

            Invoke(action);
        }
예제 #19
0
        public void cmbComboBox_CheckFill()
        {
            Action action = () =>
            {
                try
                {
                    DataBaseTables tables_check = new DataBaseTables();
                    tables_check.dtCheck_vid_medFill();
                    classIncomeForm.cmbIDVidCheck.DataSource    = tables_check.dtCheck_vid_med;
                    classIncomeForm.cmbIDVidCheck.DisplayMember = "check_vid_med";
                    classIncomeForm.cmbIDVidCheck.ValueMember   = "id_check_vid_med";
                }
                catch
                {
                }
            };

            Invoke(action);
        }
예제 #20
0
        public void cmbKadr_uchetFill()
        {
            Action action = () =>
            {
                try
                {
                    DataBaseTables tables_uchet = new DataBaseTables();
                    tables_uchet.dtKadr_uchetFill();
                    classDynamicObjects.cmbIDKadrUch.DataSource    = tables_uchet.dtKadr_uchet;
                    classDynamicObjects.cmbIDKadrUch.DisplayMember = "kadr_uchet";
                    classDynamicObjects.cmbIDKadrUch.ValueMember   = "id_kadr_uchet";
                }
                catch
                {
                }
            };

            Invoke(action);
        }
예제 #21
0
        public void cmbComboBox_MedFill()
        {
            Action action = () =>
            {
                try
                {
                    DataBaseTables tables_med = new DataBaseTables();
                    tables_med.dtMedicamentiFill();
                    classIncomeForm.cmbIDMedicamentov.DataSource    = tables_med.dtMedicamenti;
                    classIncomeForm.cmbIDMedicamentov.DisplayMember = "medicamenti";
                    classIncomeForm.cmbIDMedicamentov.ValueMember   = "id_medicamenti";
                }
                catch
                {
                }
            };

            Invoke(action);
        }
예제 #22
0
        public void cmbSFill()
        {
            Action action = () =>
            {
                try
                {
                    DataBaseTables tables_s = new DataBaseTables();
                    tables_s.dtSotrudnikFill();
                    classDynamicObjects.cmbIDSotrydnik.DataSource    = tables_s.dtSotrudnik;
                    classDynamicObjects.cmbIDSotrydnik.DisplayMember = "sotrudnik";
                    classDynamicObjects.cmbIDSotrydnik.ValueMember   = "id_sotrudnik";
                }
                catch
                {
                }
            };

            Invoke(action);
        }
예제 #23
0
        public void cmbFirmaPostavkiFill()//Метод отвечает за заполнение ComboBox данными
        {
            Action action = () =>
            {
                try
                {
                    DataBaseTables tables_firma_postavki = new DataBaseTables();
                    tables_firma_postavki.dtFirma_postavkiFill();                          //Заполнение таблицы данными с класса
                    classDynamicObjects.cmbIDFirmPost.DataSource    = tables_firma_postavki.dtFirma_postavki;
                    classDynamicObjects.cmbIDFirmPost.DisplayMember = "firma_postavki";    //Отображает свойство объекта
                    classDynamicObjects.cmbIDFirmPost.ValueMember   = "id_firma_postavki"; //Значение для ComboBox
                }
                catch
                {
                }
            };

            Invoke(action);
        }
예제 #24
0
        private void btKadr_UchetExcel_Click(object sender, EventArgs e)
        {
            switch (Registry_Class.DirPath == "Empty" || Registry_Class.DocBM == 0.0 || Registry_Class.DocTM == 0.0 ||
                    Registry_Class.DocRM == 0.0 || Registry_Class.DocLM == 0.0)
            {
            case (true):
                AppConfigForm configForm = new AppConfigForm();
                configForm.ShowDialog();
                break;

            case (false):
                btVih_DocWord.Enabled = false;
                DataBaseTables data = new DataBaseTables();

                data.qrKadr_uchet = "select [sotrudnik_id] as \"Код сотрудника\" ,[tabel_zarplata_id] as \"Код табеля ЗП\", [pribil_i_rashodi_id] as \"Код прибыли и расходов\" from [dbo].[kadr_uchet]";
                ExcelDocument document = new ExcelDocument();
                document.GroupDisciplineCreate();
                btVih_DocWord.Enabled = true;
                break;
            }
        }
예제 #25
0
        private void btKadr_UchetWord_Click(object sender, EventArgs e)
        {
            switch (Registry_Class.DirPath == "Empty")
            {
            case (true):
                AppConfigForm configForm = new AppConfigForm();
                configForm.ShowDialog();
                break;

            case (false):
                btKadr_UchetWord.Enabled = false;
                DataBaseTables data = new DataBaseTables();
                data.qrKadr_uchet = "select [sotrudnik_id] as \"Код сотрудника\" ,[tabel_zarplata_id] as \"Код табеля ЗП\", [pribil_i_rashodi_id] as \"Код прибыли и расходов\" from [dbo].[kadr_uchet]";
                data.dtKadr_uchetFill();
                WordDocument document = new WordDocument();
                document.table = data.dtKadr_uchet;

                document.Kadr_UchetWord();
                btKadr_UchetWord.Enabled = true;
                break;
            }
        }
예제 #26
0
        private void btVih_DocWord_Click(object sender, EventArgs e)
        {
            switch (Registry_Class.DirPath == "Empty")
            {
            case (true):
                AppConfigForm configForm = new AppConfigForm();
                configForm.ShowDialog();
                break;

            case (false):
                btVih_DocWord.Enabled = false;
                DataBaseTables data = new DataBaseTables();
                data.qrVih_doc = "select [prodaja_tovara_id] as \"Код продажи товара\",[kadr_uchet_id] as \"Код кадрового учета\", [ident_tov_party_id] as \"Код идентификации товарных партий\" from [dbo].[vih_doc]";
                data.dtVih_docFill();
                WordDocument document = new WordDocument();
                document.table = data.dtVih_doc;

                document.Vih_DocWord();
                btVih_DocWord.Enabled = true;
                break;
            }
        }
예제 #27
0
        private void btWordCheck_Click(object sender, EventArgs e)
        {
            switch (Registry_Class.DirPath == "Empty")
            {
            case (true):
                AppConfigForm configurationForm = new AppConfigForm();
                configurationForm.ShowDialog();
                break;

            case (false):
                btCheckWord.Enabled = false;
                DataBaseTables data = new DataBaseTables();
                data.qrCheck_vid_med =
                    "select [nom_check] as \"Номер чека\",[nazv_vid_med] as \"Название медикаментов\", [doljnost_id] as \"Код должности\",[sotrudnik_id] as \"Код сотрудников\" from [dbo].[check_vid_med]";
                data.dtCheck_vid_medFill();
                WordDocument document = new WordDocument();
                document.table = data.dtCheck_vid_med;

                document.CheckWord();
                btCheckWord.Enabled = true;
                break;
            }
        }