protected void BtnSelect_Click(object sender, EventArgs e) { if (Calendar1.SelectedDate.ToShortDateString() != null) { DataTable dt = objBll.UserDet(Convert.ToInt32(Session["UserId"])); DataTable dt1 = objBll.UserEmp(dt.Rows[0]["Email"].ToString()); objBll.selectDate = Convert.ToDateTime(Calendar1.SelectedDate.ToShortDateString().Trim()); GVAttDetails.DataSource = null; GVAttDetails.DataSource = objBll.GetAttByEid(Convert.ToInt32(dt1.Rows[0]["EmpId"])); GVAttDetails.DataBind(); LblCnt.Text = "Result = " + GVAttDetails.Rows.Count.ToString(); } else { MessageBox.Show("Select Date"); } }
private void PopulateAttendance() { GVAttDetails.DataSource = null; GVAttDetails.DataSource = objBll.GetAttendance(Convert.ToInt32(DdlDept.SelectedValue)); GVAttDetails.DataBind(); }