protected void LoadGridChart() { SqlCommand cmd = new SqlCommand("SP_GetGridData_Charts", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@IMODE", SqlDbType.Int).Value = 2; DataSet dsGrid = new DataSet(); GenderGrid.DataBind(); SqlDataAdapter da = new SqlDataAdapter(cmd); da.Fill(dsGrid); if (dsGrid != null && dsGrid.Tables.Count > 0 && dsGrid.Tables[0].Rows.Count > 0) { GenderGrid.DataSource = dsGrid.Tables[0]; GenderGrid.DataBind(); } else { GenderGrid.DataSource = new String[] { }; GenderGrid.DataBind(); } }
protected override void OnAppearing() { //Note that the Random Class plays a role in making new animations random every time the ui is loaded base.OnAppearing(); Random randomInit; #region Animation Init values AgeTileGrid.Scale = 0; BloodTypeGrid.Scale = 0; BloodPressureGrid.Scale = 0; GenderGrid.Scale = 0; ChronicDiseaseGrid.Scale = 0; MedicalFileGrid.Scale = 0; MedicationGrid.Scale = 0; AllergiesGrid.Scale = 0; AddFileButtonGrid.Opacity = 0; DoctorNoteGrid.Opacity = 0; PrescriptionFillGrid.Opacity = 0; PageLoadAnimation.Opacity = 0; PatientId.Opacity = 0; #endregion PageLoadAnimation.FadeTo(1, 800, Easing.CubicInOut); randomInit = new Random(); PatientId.FadeTo(1, (uint)randomInit.Next(1000, 2000), Easing.Linear); #region Tile Animations randomInit = new Random(); AgeTileGrid.ScaleTo(1, (uint)randomInit.Next(1000, 2000), Easing.SinOut); randomInit = new Random(); BloodPressureGrid.ScaleTo(1, (uint)randomInit.Next(1000, 2000), Easing.SinInOut); randomInit = new Random(); BloodTypeGrid.ScaleTo(1, (uint)randomInit.Next(1000, 2000), Easing.SinOut); randomInit = new Random(); GenderGrid.ScaleTo(1, (uint)randomInit.Next(1000, 2000), Easing.SinInOut); randomInit = new Random(); ChronicDiseaseGrid.ScaleTo(1, (uint)randomInit.Next(1000, 2000), Easing.SinInOut); randomInit = new Random(); MedicalFileGrid.ScaleTo(1, (uint)randomInit.Next(1000, 2000), Easing.SinInOut); randomInit = new Random(); MedicationGrid.ScaleTo(1, (uint)randomInit.Next(1, 1000), Easing.SinInOut); randomInit = new Random(); AllergiesGrid.ScaleTo(1, (uint)randomInit.Next(1, 1000), Easing.SinInOut); #endregion #region Button Animations randomInit = new Random(); randomInit = new Random(); AddFileButtonGrid.FadeTo(1, (uint)randomInit.Next(1000, 2000), Easing.Linear); randomInit = new Random(); DoctorNoteGrid.FadeTo(1, (uint)randomInit.Next(1000, 2000), Easing.Linear); randomInit = new Random(); PrescriptionFillGrid.FadeTo(1, (uint)randomInit.Next(1000, 2000), Easing.Linear); #endregion }