Example #1
0
 public TitleReport()
 {
     try
     {
         InitializeComponent();
         string[] fio    = ReportGenerating.fio_for_report.Split(' ');
         var      result = Fionerf(DeclensionBLL.GetSNPDeclensionAS((string)fio[0], (string)fio[1], (string)fio[2],
                                                                    DeclensionCase.Tvorit));
         xrLabel4.Text = "Отчет о проделанной работе " +
                         DeclensionBLL.GetAppointmentDeclension(ReportGenerating.position,
                                                                DeclensionCase.Tvorit) + " " + result + " с " +
                         Convert.ToDateTime(ReportGenerating.startDate).ToShortDateString() + " по " +
                         Convert.ToDateTime(ReportGenerating.endDate).ToShortDateString();
         if (DeclensionBLL.GetGender(ReportGenerating.fio_for_report) == Gender.FeminineGender)
         {
             xrLabel1.Text = "Подготовила:";
         }
         xrLabel2.Text = Settings_WD.Default.FIO;
         xrLabel3.Text = DateTime.Now.Year + " г.";
         Formcorrect();
     }
     catch (Exception e)
     {
         System.Windows.Forms.MessageBox.Show(e.Message);
         throw;
     }
 }
        public EveryDayReportNoForm(DateTime date)
        {
            InitializeComponent();
            string[] fio    = formLogin.FIO.Split(' ');
            string   result = Fionerf(DeclensionBLL.GetSNPDeclensionAS((string)fio[0], (string)fio[1], (string)fio[2],
                                                                       DeclensionCase.Tvorit));

            TitleLabel.Text = "Отчет о проделанной работе " +
                              DeclensionBLL.GetAppointmentDeclension(ReportGenerating.position,
                                                                     DeclensionCase.Tvorit) + " " + result + "\n за " + date.ToString("dd.MM.yyyy");
            if (DeclensionBLL.GetGender(formLogin.FIO) == Gender.FeminineGender)
            {
                xrLabel12.Text = "Отчет составила";
            }
            CreatedFIO.Text = Fionerf(formLogin.FIO);
            GetFIO.Text     = GetTheBoss();
        }