Пример #1
0
        public void GetWorkDiaryListTest1()
        {
            //件数のみ確認する。内容については帳票を出力して目視確認する。

            string employeeCode = "9017812";
            int    year         = 2016;
            int    month        = 10;

            PDFManager pdfManager = new PDFManager(employeeCode, year, month);

            List <object> list = pdfManager.GetWorkDiaryList();


            Assert.IsTrue(list.Count == 36, "正常系エラー");
        }
Пример #2
0
        public void GetWorkDiaryListTest2()
        {
            //該当作業日誌が存在しない場合

            string employeeCode = "9017812";
            int    year         = 1000;
            int    month        = 10;

            PDFManager pdfManager = new PDFManager(employeeCode, year, month);

            List <object> list = pdfManager.GetWorkDiaryList();


            Assert.IsTrue(list.Count == 0, "正常系エラー");
        }
Пример #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            logger.Debug(LOG_START);
            // セッションデータの取得
            KinmuSystem.SetSessionData(ref loginShainInfo, ref viewShainInfo, ref viewDateTime, Response, Request, Session);

            string companyName      = "(株)エスケイケイ";
            string dataErrorMessage = "データ読み込み時にエラーが発生しました。管理者に連絡してください。";



            try
            {
                var kinmuManager = new KinmuManager(viewShainInfo.SHAIN_CD, viewDateTime.Year, viewDateTime.Month);
                var pdfManager   = new PDFManager(kinmuManager);

                //データをバインドする
                YearLabel.Text        = viewDateTime.ToString("yyyy");
                MonthLabel.Text       = viewDateTime.ToString("MM");
                CompanyNameLabel.Text = companyName;
                NameLabel.Text        = viewShainInfo.SHAIN_NM;
                Title = "作業日誌 " + viewShainInfo.SHAIN_NM + " " + viewDateTime.ToString("yyyy年MM月");

                WorkDiaryGridView.DataSource = pdfManager.GetWorkDiaryList();
                WorkDiaryGridView.DataBind();

                //minuteをhourにする
                int totalWorkTime = kinmuManager.CalcGekkanTotalJitsuRoudoJikan();
                TotalWorkTimeLabel.Text = MinutesToStringFormat(totalWorkTime, "{0}時間{1:00}分");
            }
            catch (KinmuException ex)
            {
                WorkDiaryPanel.Visible = false;
                ErrorPanel.Visible     = true;
                ErrorMessageLabel.Text = dataErrorMessage + "\nErrorMessage:" + ex.Message + "\nStackTrace:" + ex.StackTrace;
            }
        }