コード例 #1
0
        private void tsbFilterByDate_Click(object sender, EventArgs e)
        {
            using (fDates formaDatos = new fDates())
            {
                if (formaDatos.ShowDialog() == DialogResult.OK)
                {
                    if (Program.firstDate != DateTime.MinValue)
                    {
                        try
                        {
                            filterElements.Add(string.Format("aktas_data>={0}", DbHelper.FormatDateValue(Program.firstDate)));
                        }
                        catch
                        {
                            Msg.ErrorMsg(Messages.DbErrorMsg);
                            return;
                        }
                    }
                    if (Program.lastDate != DateTime.MinValue)
                    {
                        try
                        {
                            filterElements.Add(string.Format("aktas_data<={0}", DbHelper.FormatDateValue(Program.lastDate)));
                        }
                        catch
                        {
                            Msg.ErrorMsg(Messages.DbErrorMsg);
                            return;
                        }
                    }

                    doFilter();
                }
            }
        }
コード例 #2
0
 private void tsmiMAtaskaita_Click(object sender, EventArgs e)
 {
     // pagamina ataskaitą pagal užduotas datas
     using (fDates formaDatos = new fDates())
     {
         if (formaDatos.ShowDialog() != DialogResult.OK)
         {
             return;
         }
         else
         {
             makeOutput();
         }
     }
 }