protected void drpLocation_SelectedIndexChanged(object sender, EventArgs e) { LocID = Convert.ToInt32(drpLocation.SelectedValue); ViewState.Add("LocID", LocID); if (drpCategory.SelectedIndex != 0) { catID = Convert.ToInt32(ViewState["CatID"]); ResourceHandler resHandler = new ResourceHandler(); List <Resource> resList = resHandler.GetResourceListByCatIDandLocation(catID, Convert.ToInt32(drpLocation.SelectedValue)); if (resList != null) { RadComboBox1.DataSource = resList; RadComboBox1.DataTextField = "name"; RadComboBox1.DataValueField = "ID"; RadComboBox1.DataBind(); } else { RadComboBox1.Items.Clear(); } } string scrp = "var objCal1 = new AMIB.persianCalendar('ContentPlaceHolder1_pcal1', {extraInputID: 'ContentPlaceHolder1_pcal1',extraInputFormat: 'yyyy/mm/dd'}); "; ScriptManager.RegisterStartupScript(this, GetType(), ClientID, scrp, true); }
protected void Page_Load(object sender, EventArgs e) { // Page.Form.Action = "Photo Category.aspx?tab1=tab_gallery&tab2=photoCategory"; if (Request.QueryString.Count > 0) { Int32.TryParse(Request.QueryString["id"], out news_id); //todo check if news_id is not valid if (Request.QueryString.Count == 3) { edit_mode = true; } } if (!IsPostBack) { RadComboBox1.DataSource = database.loadSymbols(); RadComboBox1.DataBind(); if (!edit_mode) { DatePicker1.Date = DateTime.Now; txtTime.Text = DateTime.Now.ToString("hh:mm"); } else { loadNews(database.LoadNewsForEdit(news_id)); } } }
protected void Page_Load(object sender, EventArgs e) { if (Session["UserName"] == null || Session["UserName"].ToString() == "") { Response.Redirect("~/Default.aspx"); } List <THE_SesionUsuario> existeSesion = MngNegocioUsuarioSesion.VerExisteSesionUsuario(Int32.Parse(Session["numeroUsuario"].ToString()), Session["UserIP"].ToString()); if (existeSesion.Count == 0) { return; } try { if (!IsPostBack) { List <TDI_BaseRespuestas> empl2 = MngNegocioBaseRespuestas.ObtenerRespFrecuentes(); TDI_LogPaginas logPaginas = new TDI_LogPaginas(); logPaginas.LogFecha = DateTime.Now; logPaginas.LogIp = Session["UserIP"].ToString(); logPaginas.LogUrlPagina = Request.RawUrl; logPaginas.EmpleadoLlavePrimaria = new THE_Empleado { EmpleadoLlavePrimaria = int.Parse(Session["numeroUsuario"].ToString()) }; MngNegocioLogPaginas.GuardarLogPaginas(logPaginas); List <THE_Encuesta> encuGra = MngNegocioEncuesta.ObtieneEncuestasActivas(); if (encuGra.Count > 0) { RadComboBox1.DataSource = encuGra; RadComboBox1.DataTextField = "Nombreencuesta"; RadComboBox1.DataValueField = "IdEncuesta"; RadComboBox1.DataBind(); //List<THE_Usuario> Usuario = MngNegocioUsuario.ObtieneTodosUsuarios(); //foreach (var us in Usuario) //{ // us.UsuarioNombre = us.UsuarioNombre + " " + us.UsuarioApellPaterno + " " + us.UsuarioApellMaterno; //} //if (Usuario.Count > 0) //{ // RadComboBox2.DataSource = Usuario; // RadComboBox2.DataTextField = "UsuarioNombre"; // RadComboBox2.DataValueField = "UsuarioLlavePrimaria"; // RadComboBox2.DataBind(); //} } } } catch (Exception msException) { } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { RadComboBox1.DataSource = Helper.Helper.GetEselonList(); RadComboBox1.DataBind(); RadComboBox1.SelectedIndex = 0; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { RadComboBox1.DataSource = GetData("spGetRoles", null); RadComboBox1.DataBind(); RLabel2.Visible = false; RadComboBox2.Visible = false; } }
protected void Page_Load(object sender, EventArgs e) { m1.AddAjaxSettingsFromTwoContainer(phSource, phResult); if (!IsPostBack) { var data = new List <KeyValuePair <string, string> >(); for (int i = 0; i < 20; i++) { data.Add(new KeyValuePair <string, string>(i.ToString() + "-KeyKeyKeyKeyKey", "value" + i.ToString())); } var treeView = RadComboBox1.FindNestedTreeView(); treeView.DataSource = data; treeView.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { List <Contact> contacts = new List <Contact>(); contacts.Add(new Contact() { ContactName = "Maria Anders", City = "Berlin", ContactTitle = "Sales Representative" }); contacts.Add(new Contact() { ContactName = "Ana Trujillo", City = "Mexico D.F.", ContactTitle = "Owner" }); contacts.Add(new Contact() { ContactName = "Thomas Hardy", City = "London", ContactTitle = "Owner" }); RadComboBox1.DataSource = contacts; RadComboBox1.DataBind(); }
public void Initialize(Int32 stateNumber, WeibullMarkovModel model) { foreach (WeibullMarkovConditionState state in model.States) { if (state.Number == stateNumber) { RadNumericTextBox1.Value = state.t50.Value; if (state.x != null && state.t9X.HasValue) { RadNumericTextBox2.Value = state.t9X.Value; RadNumericTextBox2.Visible = true; LabelAndSetPeriod.Visible = true; } else { LabelAndSetPeriod.Visible = false; RadNumericTextBox2.Visible = false; } if (state.x != null) { RadComboBoxItem item = RadComboBox1.FindItemByValue(state.x); RadComboBox1.SelectedIndex = (item == null ? 0 : item.Index); } else { RadComboBox1.SelectedIndex = 0; } break; } } if (stateNumber == 4) { LastState = "true"; } IsModelEstimated = false; RadButtonEstimate_Click(RadButtonEstimate, null); }
protected void bindAnalysis() { using (MySqlConnection con = new MySqlConnection(@"Server = localhost; Database = clinic; Uid = root; Password = root; charset=utf8")) { using (MySqlCommand cmd = new MySqlCommand("SELECT id_analysis, analysis_name FROM analysis")) { using (MySqlDataAdapter sda = new MySqlDataAdapter()) { cmd.Connection = con; sda.SelectCommand = cmd; using (DataTable ds = new DataTable()) { sda.Fill(ds); if (ds.Rows.Count > 0) { RadComboBox1.DataSource = ds; RadComboBox1.DataBind(); } } } } } }
private void BindRadComboBox() { RadComboBox1.DataSource = Helper.Helper.GetEselonList(); RadComboBox1.DataBind(); }
private void BindRadComboBox() { RadComboBox1.DataSource = Helper.MembershipHelper.GetAllRoles("SuperAdmin"); RadComboBox1.DataBind(); }