protected void Page_Load(object sender, EventArgs e) { Horario h = new Horario(); h = h.GetHorario(); Session["Horario"] = h; }
protected void Page_Load(object sender, EventArgs e) { Horario h = new Horario(); h = h.GetHorario(); Session["Horario"] = h; Estadistica es = new Estadistica(); DataTable personas = es.getPersonas(); DataTable recaudado = es.getRecaudo(); string a = "[" + personas.Rows[0][0].ToString() + "," + personas.Rows[1][0].ToString() + "]"; string b = null; b = "["; for (int i = 1; i < 13; i++) { if (i > 1) { b += ","; } for (int j = 0; j < recaudado.Rows.Count; j++) { int z = int.Parse(recaudado.Rows[(j)][0].ToString()); if (z == i) { string c = (recaudado.Rows[(j)][1].ToString()); b += c; break; } if ((j + 1) == recaudado.Rows.Count) { b += "0"; } } } b += "]"; this.ChartData1 = b; this.ChartData2 = a; //Call the Javascript function from C# Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "DrawChart()", true); }
public static long GetSesionViernesTarde(long oid_plan, long oid_promocion, DateTime fecha_inicial) { long oid_horario = Horario.GetHorario(oid_plan, oid_promocion, fecha_inicial); string query = SELECT_SESION_BY_OID_HORARIO(oid_horario); int sesion = Sesion.OpenSession(); IDataReader reader = nHManager.Instance.SQLNativeSelect(query, Session(sesion)); while (reader.Read()) { DateTime fecha = DateTime.Parse(reader["FECHA"].ToString()); DateTime hora = DateTime.Parse(reader["HORA"].ToString()); if (fecha.ToShortDateString() == fecha_inicial.AddDays(-3).ToShortDateString() && hora.ToShortTimeString() == "18:45") { return((long)reader["OID_PROFESOR"]); } } CloseSession(sesion); return(0); }