protected void GetLeaveDates(string strLvAppId, string gridStatus, string strDateFrom, string strDateTo) { string strFromDate = ""; string strToDate = ""; if (gridStatus == "A") { strFromDate = strDateFrom; strToDate = strDateTo; } else if (gridStatus == "D") { strFromDate = strDateFrom; strToDate = strDateTo; } else if (gridStatus == "AC") { strFromDate = strDateFrom; strToDate = strDateTo; } DataTable dtLeaveDates = new DataTable(); dtLeaveDates = objLeaveMgr.GetLeaveDates(strLvAppId); if (dtLeaveDates.Rows.Count > 0) { hfLDates.Value = ""; foreach (DataRow dRow in dtLeaveDates.Rows) { if (hfLDates.Value != "") { hfLDates.Value = hfLDates.Value + "," + Common.ReturnDateTimeInString(Common.DisplayDateTime(dRow["LevDate"].ToString(), false, Constant.strDateFormat), false, Constant.strDateFormat); } else { hfLDates.Value = Common.ReturnDateTimeInString(Common.DisplayDateTime(dRow["LevDate"].ToString(), false, Constant.strDateFormat), false, Constant.strDateFormat); } } } }