Ejemplo n.º 1
0
        private void ExportDataROD()
        {
            try
            {
                string queryM = "select IF(DREG = '00.00.0000', '', DATE_FORMAT(DREG, '%Y.%m.%d')) DREG," +
                                " DIAG," +
                                " BQNT," +
                                " CHK," +
                                " SCERTIF," +
                                " NCERTIF," +
                                " IF(DCERTIF = '00.00.0000', '', DATE_FORMAT(DCERTIF, '%Y.%m.%d')) DCERTIF," +
                                " SNILS," +
                                " LNAME," +
                                " FNAME," +
                                " MNAME," +
                                " IF(BDATE = '00.00.0000', '', DATE_FORMAT(BDATE, '%Y.%m.%d')) BDATE," +
                                " ADDRESS," +
                                " TDOC," +
                                " SDOC," +
                                " NDOC," +
                                " IF(DDOC = '00.00.0000', '', DATE_FORMAT(DDOC, '%Y.%m.%d')) DDOC," +
                                " ODOC," +
                                " SPOLICY," +
                                " NPOLICY," +
                                " SLEAF," +
                                " NLEAF," +
                                " IF(DLEAF = '00.00.0000', '', DATE_FORMAT(DLEAF, '%Y.%m.%d')) DLEAF," +
                                " NCARD," +
                                " IF(DCARD = '00.00.0000', '', DATE_FORMAT(DCARD, '%Y.%m.%d')) DCARD," +
                                " client_id," +
                                " id" +
                                " from BTAL2" +
                                $" where DREG between '{dateFrom.Value.ToString("yyyy-MM-dd")}' and '{dateTo.Value.ToString("yyyy-MM-dd")}'" +
                                " and deleted = 0";

                string queryChild = "select mother_id," +
                                    " SEX," +
                                    " WEIGHT," +
                                    " GROWTH," +
                                    " DIAG" +
                                    " from CHILD" +
                                    " where deleted = 0";

                CreateXML.LoadTableBTAL2(queryM, queryChild);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
                logger.Debug("\n/--------------------------------------------------------------------/\n" + ex.StackTrace + "\n//----------------------------//\n" + ex.Message + "\n\n");
            }
        }
Ejemplo n.º 2
0
        private void ExportDataBEREM()
        {
            try
            {
                string queryB = "select IF(DREG = '00.00.0000', '', DATE_FORMAT(DREG, '%Y.%m.%d')) DREG," +
                                " QTW," +
                                " MULP," +
                                " PREM," +
                                " CHK," +
                                " SCERTIF," +
                                " NCERTIF," +
                                " IF(DCERTIF = '00.00.0000', '', DATE_FORMAT(DCERTIF, '%Y.%m.%d')) DCERTIF," +
                                " SNILS," +
                                " LNAME," +
                                " FNAME," +
                                " MNAME," +
                                " IF(BDATE = '00.00.0000', '', DATE_FORMAT(BDATE, '%Y.%m.%d')) BDATE," +
                                " ADDRESS," +
                                " TDOC," +
                                " NDOC," +
                                " SDOC," +
                                " IF(DDOC = '00.00.0000', '', DATE_FORMAT(DDOC, '%Y.%m.%d')) DDOC," +
                                " ODOC," +
                                " SPOLICY," +
                                " NPOLICY," +
                                " NCARD," +
                                " IF(DCARD = '00.00.0000', '', DATE_FORMAT(DCARD, '%Y.%m.%d')) DCARD," +
                                " SLEAF," +
                                " NLEAF," +
                                " IF(DLEAF = '00.00.0000', '', DATE_FORMAT(DLEAF, '%Y.%m.%d')) DLEAF," +
                                " PHELP" +
                                " from BTAL1" +
                                $" where DCERTIF between '{dateFrom.Value.ToString("yyyy-MM-dd")}' and '{dateTo.Value.ToString("yyyy-MM-dd")}'" +
                                " and deleted = 0";

                CreateXML.LoadTableBTAL1(queryB);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
                logger.Debug("\n/--------------------------------------------------------------------/\n" + ex.StackTrace + "\n//----------------------------//\n" + ex.Message + "\n\n");
            }
        }