Exemplo n.º 1
0
 private void ダウンロード期間ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (var dialog = new PeriodForm())
     {
         dialog.ShowDialog();
     }
 }
Exemplo n.º 2
0
        public override void MakeReport()
        {
            PeriodForm dlg = new PeriodForm(MenuText);

            dlg.PeriodConstrain = 4;
            if (dlg.ShowDialog() == DialogResult.OK)
            {
                int         year = int.Parse(dlg.PeriodValue);
                XmlDocument doc  = new XmlDocument();
                DateTime    dt   = new DateTime(year, 1, 1);
                while (dt.Year == year && dt.Date <= DateTime.Now.Date)
                {
                    if ((dlg.MinDate.Year == dt.Year && dlg.MinDate.Month > dt.Month))
                    {
                        dt = dt.AddMonths(1);
                        continue;
                    }
                    Filters f = new Filters("date", dt.ToString("yyyy-MM-dd"));
                    if (doc.ChildNodes.Count == 0)
                    {
                        doc = Engine.db().makeReport(getSQL(f));
                    }
                    else
                    {
                        doc.FirstChild.AppendChild(doc.ImportNode(Engine.db().makeReport(getSQL(f)).SelectSingleNode("Rows/Row"), true));
                    }
                    dt = dt.AddMonths(1);
                }
                ReportViewForm rvf = new ReportViewForm(MenuText, FileName, new XmlDocument[] { doc }, XCL_HEADERS);

                rvf.Show();
            }
        }
Exemplo n.º 3
0
        public Period()
        {
            DateTime dateTime = DateTime.Now;

            dateTime = dateTime.AddDays((double)(-(double)dateTime.Day + 1));

            DateTime dateTime2 = DateTime.Now;

            dateTime2 = dateTime2.AddDays((double)(DateTime.DaysInMonth(DateTime.Now.Year, DateTime.Now.Month) - dateTime2.Day));

            periodForm           = new PeriodForm(dateTime, dateTime2);
            periodForm.PeriodTyp = 1;
        }
Exemplo n.º 4
0
        public override void MakeReport()
        {
#if RELEASE || DEBUG
            PeriodForm dlg = new PeriodForm(this.MenuText);
            if (dlg.ShowDialog() == DialogResult.Cancel)
            {
                return;
            }

            Filters f = new Filters(Filters.MAKE_CANDIDATE, Engine.get().candidateAge(),
                                    Filters.MAKE_BRIDE, Engine.get().brideAge(),
                                    Filters.DATE_PERIOD, dlg.PeriodChar,
                                    Filters.DATE_VALUE, dlg.PeriodValue);
            string      s   = getSQL(f);
            XmlDocument doc = Engine.db().makeReport(s);

            ReportViewForm rvf = new ReportViewForm(MenuText, FileName, new XmlDocument[] { doc, dlg.GetXml() });
            rvf.ExcelEnabled = false;
            rvf.Show();
#endif
        }
Exemplo n.º 5
0
        public override void Run()
        {
            var form = new PeriodForm(period);

            WorkbenchSingleton.AddChild(form);
        }