protected void Page_Load(object sender, EventArgs e) { logger.Debug(LOG_START); // セッションデータの取得 KinmuSystem.SetSessionData(ref loginShainInfo, ref viewShainInfo, ref viewDateTime, Response, Request, Session); try { 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 = "(株)エスケイケイ"; EmployeeCodeLabel.Text = viewShainInfo.SHAIN_CD; NameLabel.Text = viewShainInfo.SHAIN_NM; Title = "勤務予定表 " + viewShainInfo.SHAIN_NM + " " + viewDateTime.ToString("yyyy年MM月"); RenderWorkPlansTableBody(); OverTimeGridView.DataSource = pdfManager.GetOverTimeList(); OverTimeGridView.DataBind(); Check36GridView.DataSource = pdfManager.GetCheck36List(); Check36GridView.DataBind(); //Tableのデータは直接入れる TotalTable.Rows[0].Cells[1].Text = MinutesToStringFormat(restTimeTotal); //みなし1が含まれている? TotalTable.Rows[0].Cells[2].Text = MinutesToStringFormat(workTimeTotal); //みなし2のみ? TotalTable.Rows[0].Cells[3].Text = MinutesToStringFormat(minashiTimeTotal); KoKyuWorkTable.Rows[0].Cells[1].Text = kinmuManager.CalcGekkanKokyuRoudouNissu() + "日"; NenkyuTable.Rows[1].Cells[1].Text = kinmuManager.CalcGekkanNenkyu() + "日"; NenkyuTable.Rows[2].Cells[1].Text = kinmuManager.CaclGekkanAMHankyu() + "日"; NenkyuTable.Rows[3].Cells[1].Text = kinmuManager.CaclGekkanPMHankyu() + "日"; TokukyuAndKokyuTable.Rows[1].Cells[1].Text = kinmuManager.CalcGekkanTokkyuYoteiNissu() + "日"; TokukyuAndKokyuTable.Rows[1].Cells[2].Text = kinmuManager.CalcGekkanTokkyuKakuteiNissu() + "日"; TokukyuAndKokyuTable.Rows[2].Cells[1].Text = kinmuManager.CalcGekkanKoukyuYoteiNissu() + "日"; TokukyuAndKokyuTable.Rows[2].Cells[2].Text = kinmuManager.CalcGekkanKoukyuKakuteiNissu() + "日"; WorkDaysAndTimeTable.Rows[0].Cells[1].Text = kinmuManager.CalcGekkanSyoteiRoudoNissu() + "日"; WorkDaysAndTimeTable.Rows[0].Cells[2].Text = MinutesToStringFormat(kinmuManager.CalcGekkanSyoteiRoudoJikan()); WorkDaysAndTimeTable.Rows[1].Cells[1].Text = kinmuManager.CalcGekkanHouteiNissu() + "日"; WorkDaysAndTimeTable.Rows[1].Cells[2].Text = MinutesToStringFormat(kinmuManager.CalcGekkanHouTeiRoudoJikan()); //作業時間が法定労働時間を超過している場合注意喚起を表示する HoteiRoudoCheckMessageLabel.Text = pdfManager.GetHoteiRoudoCheckMessage(); } catch (KinmuException ex) { WorkPlansPanel.Visible = false; ErrorPanel.Visible = true; ErrorMessageLabel.Text = "データ読み込み時にエラーが発生しました。管理者に連絡してください。" + "\nErrorMessage:" + ex.Message + "\nStackTrace:" + ex.StackTrace; } }
public void GetHoteiRoudoCheckMessageTest2() { //作業時間が法定労働時間を超過していない場合 string employeeCode = "9017812"; int year = 2016; int month = 10; PDFManager pdfManager = new PDFManager(employeeCode, year, month); string message = pdfManager.GetHoteiRoudoCheckMessage(); Assert.IsTrue(message == "", "正常系エラー"); }