public string FindOTType(string OTDate, string WorkNo) { OverTimeBll bll = new OverTimeBll(); string LHZBIsDisplayG2G3 = ""; string OtStatus = ""; OtStatus = bll.GetOTType(WorkNo, OTDate); #region 龍華總部周邊HR。G2,G3名稱更改為G2(休息日上班),G3(法定假日上班) try { LHZBIsDisplayG2G3 = System.Configuration.ConfigurationManager.AppSettings["LHZBIsDisplayG2G3"]; } catch { LHZBIsDisplayG2G3 = "N"; } if (LHZBIsDisplayG2G3 == "Y") { if (OtStatus == "G2") { return OtStatus + "(休息日上班)"; } else if (OtStatus == "G3") { return OtStatus + "(法定假日上班)"; } else { return OtStatus; } } else { return OtStatus; } #endregion }
protected void textBoxOTDate_TextChanged(object sender, EventArgs e) { if (!string.IsNullOrEmpty(textBoxOTDate.Text)) { DateTime dt = Convert.ToDateTime(textBoxOTDate.Text); textBoxWeek.Text = GetWeekCh(dt); OverTimeBll bll = new OverTimeBll(); if (!string.IsNullOrEmpty(textBoxEmployeeNo.Text)) { textBoxOTType.Text = bll.GetOTType(textBoxEmployeeNo.Text.Trim(), textBoxOTDate.Text.Trim()); if (textBoxOTType.Text == "G1" || textBoxOTType.Text == "G3") { ddlIsMoveLeave.Enabled = false; } else { ddlIsMoveLeave.Enabled = true; } } else { this.WriteMessage(1, Message.WorkNoFirst); textBoxEmployeeNo.Focus(); textBoxWeek.Text = string.Empty; textBoxOTType.Text = string.Empty; textBoxOTDate.Text = string.Empty; } } }
public string FindOTType(string OTDate, string WorkNo) { OverTimeBll bll = new OverTimeBll(); return bll.GetOTType(WorkNo, OTDate); }