protected void Page_Load(object sender, EventArgs e) { string empType = Session["empType"].ToString(); int empId = -1; if(empType == "Receptionist") empId = Convert.ToInt32(Session["receptionistId"].ToString()); else if(empType == "Doctor") empId = Convert.ToInt32(Session["doctorId"].ToString()); DateTime dt = Convert.ToDateTime(Request.QueryString["date"].ToString()); Label1.Text = dt.Date.ToShortDateString(); string date = Request.QueryString["date"].ToString(); Common_GetCalendarReminderInfoBL objGetCalendarReminderInfoBL = new Common_GetCalendarReminderInfoBL(); ds = objGetCalendarReminderInfoBL.Common_GetCalendarReminderInfo(DateTime.ParseExact((Convert.ToDateTime(date)).ToString("dd-MM-yyyy"), "dd/MM/yyyy", System.Globalization.CultureInfo.InstalledUICulture).ToString(), empId); GridView1.DataSource = ds; GridView1.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { string empType = Session["empType"].ToString(); int empId = -1; if (empType == "Receptionist") { empId = Convert.ToInt32(Session["receptionistId"].ToString()); } else if (empType == "Doctor") { empId = Convert.ToInt32(Session["doctorId"].ToString()); } DateTime dt = Convert.ToDateTime(Request.QueryString["date"].ToString()); Label1.Text = dt.Date.ToShortDateString(); string date = Request.QueryString["date"].ToString(); Common_GetCalendarReminderInfoBL objGetCalendarReminderInfoBL = new Common_GetCalendarReminderInfoBL(); ds = objGetCalendarReminderInfoBL.Common_GetCalendarReminderInfo(DateTime.ParseExact((Convert.ToDateTime(date)).ToString("dd-MM-yyyy"), "dd/MM/yyyy", System.Globalization.CultureInfo.InstalledUICulture).ToString(), empId); GridView1.DataSource = ds; GridView1.DataBind(); }