예제 #1
0
 public ReportThursday(AppVisibility visibility)
 {
     word = new WorkWithWord();
     if (File.Exists(cleanThursdayPath))
     {
         word.CreateNewDoc(cleanThursdayPath, visibility);
     }
     else
     {
         throw new FileLoadException("Шаблон не найден по адресу: " + cleanThursdayPath);
     }
 }
예제 #2
0
        public GraphicGenerator(AppVisibility visibility, DateTime date)
        {
            curentDate = date;
            String path = SelectTemplateMonth();

            word = new WorkWithWord();
            if (File.Exists(path))
            {
                word.CreateNewDoc(path, visibility);
            }
            else
            {
                throw new FileLoadException("Шаблон не найден по адресу: " + path);
            }
        }
예제 #3
0
 private void AddBN_Click(object sender, RoutedEventArgs e)
 {
     if (Convert.ToDateTime(DayFor.Text) < Convert.ToDateTime(DayOn.Text))
     {
         MessageBox.Show("Проверьте введенную дату");
         return;
     }
     else
     {
         try
         {
             DataSet ds = new DataSet();
             ds = WorkWithBD.outPutdb("EXEC SelectClassLog @GroupName = '" + ClassCB.Text + "', " +
                                      "@DayOn = '" + Convert.ToDateTime(DayOn.Text) + "', @DayFor = '" + Convert.ToDateTime(DayFor.Text) + "'");
             WorkWithWord.writeClass(ds, "reportClass");
             Close();
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.Message);
         }
     }
 }