protected void OpenEmployeeRecord() { dtMPC = objPayOptMgr.GetMPCData(ddlMPC.SelectedValue.Trim()); if (dtMPC.Rows.Count > 0) { this.GetEmpWiseValidationDate(dtMPC.Rows[0]["ASTARTDAY"].ToString().Trim(), dtMPC.Rows[0]["AENDDAY"].ToString().Trim(), dtMPC.Rows[0]["PSTARTDAY"].ToString().Trim(), dtMPC.Rows[0]["PENDDAY"].ToString().Trim(), ddlMonth.SelectedValue.Trim(), ddlYear.SelectedValue.Trim()); strAttnStartDate = Common.SetDate(AttnDateFrom.ToShortDateString()); //if (ddlEmpType.SelectedValue == "1") // strAttnEndDate = Common.SetDate(AttnDateTo.ToShortDateString()); //else //{ //DateTime dtToDate = new DateTime(); //AttnDateTo = AttnDateTo.AddDays(10); strAttnEndDate = Common.SetDate(AttnDateTo.ToShortDateString()); //} } else { return; } DataTable dtEmpInfo = objPreMgr.GetEmployeeDataForAttndClearance(strAttnEndDate, ddlMPC.SelectedValue.ToString(), txtEmpID.Text.Trim(), ddlEmpType.SelectedValue.Trim(), ddlCostCenter.SelectedValue.ToString().Trim()); if (dtEmpInfo.Rows.Count == 0) { lblMsg.Text = "No Employee information found... "; return; } else { lblMsg.Text = ""; grAttendance.DataSource = dtEmpInfo; grAttendance.DataBind(); lblRecordCount.Text = grAttendance.Rows.Count.ToString(); this.GenerateAttendanceSummery(); } }