public void PatientCount(int Hid, int UserId) { AdminDetails admObj = (AdminDetails)Session["UserDetails"]; int flag = 1; if (admObj.RoleId == "AHE") { flag = 2; } else { flag = 1; } DataSet ds = BP.CountForCards(Hid, UserId, flag); if (ds.Tables[0].Rows[0][0].ToString() == null) { Session["TodayAppointment"] = "0"; } else { Session["TodayAppointment"] = ds.Tables[0].Rows[0][0].ToString(); } if (ds.Tables[1].Rows[0][0].ToString() == null) { Session["TodayNewPatient"] = "0"; } else { Session["TodayNewPatient"] = ds.Tables[1].Rows[0][0].ToString(); } if (ds.Tables[2].Rows[0][0].ToString() == null) { Session["YesterdayPatients"] = "0"; } else { Session["YesterdayPatients"] = ds.Tables[2].Rows[0][0].ToString(); } if (ds.Tables[3].Rows[0][0].ToString() == null) { Session["TotalPatientCount"] = "0"; } else { Session["TotalPatientCount"] = ds.Tables[3].Rows[0][0].ToString(); } if (ds.Tables[4].Rows[0][0].ToString() == null) { Session["TodaysNewPatientCount"] = "0"; } else { Session["TodaysNewPatientCount"] = ds.Tables[4].Rows[0][0].ToString(); } }
public void StaffCount(int Hid, int UserId) { AdminDetails admObj = (AdminDetails)Session["UserDetails"]; int flag = 1; if (admObj.RoleId == "AHE") { flag = 2; } else { flag = 1; } DataSet ds = c.CountForCards(Hid, UserId, flag); if (ds.Tables[8].Rows[0][0].ToString() == null) { Session["TotalStaffCount"] = "0"; } else { Session["TotalStaffCount"] = ds.Tables[8].Rows[0][0].ToString(); } if (ds.Tables[9].Rows[0][0].ToString() == null) { Session["TotalActiveStaffCount"] = "0"; } else { Session["TotalActiveStaffCount"] = ds.Tables[9].Rows[0][0].ToString(); } if (ds.Tables[10].Rows[0][0].ToString() == "0" || ds.Tables[10].Rows[0][0].ToString() == null) { Session["TotalInActiveStaffCount"] = "0"; } else { Session["TotalInActiveStaffCount"] = ds.Tables[10].Rows[0][0].ToString(); } }