public void GetMonthlyHour() { //decimal monlyHour = 0; string strDayhour = System.Web.Configuration.WebConfigurationManager.AppSettings["LeaveHour"]; dtMonHour = timeSheetMgr.GET_TimeSheetPolicy(lblYear.Text.Trim(), mon.Trim()); if (dtMonHour.Rows.Count > 0) { foreach (DataRow dr in dtMonHour.Rows) { monlyHour = Convert.ToDecimal(dr["PHour"].ToString()); lblAssignedHour.Text = monlyHour.ToString(); } //lblMsg.Text = ""; } else { monlyHour = 0.0M; //lblMsg.Text = "No hour is assigned for this month-year"; } }
private void OpenRecord() { string mon = ""; //string year = ddlYear.SelectedValue.ToString(); //string month = ddlMonth.SelectedValue.ToString(); dtTimeSheetPolicy = timeSheetMgr.GET_TimeSheetPolicy("", ""); grTimeSheetPolicy.DataSource = dtTimeSheetPolicy; grTimeSheetPolicy.DataBind(); foreach (GridViewRow gRow in grTimeSheetPolicy.Rows) { mon = gRow.Cells[2].Text.Trim(); switch (mon) { case "1": gRow.Cells[2].Text = "January"; break; case "2": gRow.Cells[2].Text = "February"; break; case "3": gRow.Cells[2].Text = "March"; break; case "4": gRow.Cells[2].Text = "April"; break; case "5": gRow.Cells[2].Text = "May"; break; case "6": gRow.Cells[2].Text = "June"; break; case "7": gRow.Cells[2].Text = "July"; break; case "8": gRow.Cells[2].Text = "August"; break; case "9": gRow.Cells[2].Text = "September"; break; case "10": gRow.Cells[2].Text = "October"; break; case "11": gRow.Cells[2].Text = "November"; break; case "12": gRow.Cells[2].Text = "December"; break; } } }