protected void ddpDemo_SelectedIndexChanged(object sender,EventArgs e) { TextBox1.Text = ddpDemo.SelectedValue; int i = AvailableReports.IndexOf(ddpDemo.SelectedValue); if (i >= 0) { TextBox8.Text = AvailableReportsDescr[i]; } }
private void SetDemo() { if (IsDemoMode()) { DemoMode = true; ddpDemo.Visible = true; TextBox1.Text = ddpDemo.SelectedValue; int i = AvailableReports.IndexOf(ddpDemo.SelectedValue); if (i >= 0) { TextBox8.Text = AvailableReportsDescr[i]; } } else { TextBox1.Visible = true; } }
public Scheduler DoWork(bool saved = false) { string rep = GridView1.Rows[GridView1.SelectedIndex].Cells[2].Text; if (DemoMode) { if (!AvailableReports.Contains(rep)) { ShowAlert(DoMessage(rep, AvailableReports)); } } AfterB2.Visible = true; Scheduler s = new Scheduler(); s.Variant = Session[VarNameSaved].ToString(); if (RadioButtonList3.SelectedValue == "N") { s.ColumnsNamed = "X"; } else { s.WithMetadata = "X"; } foreach (GridViewRow g0 in GridView2.Rows) { if (IsValid(g0.Cells[4].Text) || IsValid(g0.Cells[5].Text)) { Parameter ps = new Parameter(); ps.Selname = g0.Cells[1].Text; ps.Sign = "I"; ps.Kind = SAPKind(g0.Cells[2].Text); ps.Option = g0.Cells[4].Text; ps.Low = g0.Cells[5].Text; if (IsValid(g0.Cells[5].Text)) { if (IsValid(g0.Cells[6].Text)) { if (GetOptions(true).Contains(ps.Option)) { ps.High = g0.Cells[6].Text; } else { ShowAlert(DoMessage(ps.Option, ValidOptionsH, true)); return(null); } } else if (GetOptions(false).Contains(ps.Option)) { ps.High = ps.Low; } else { ShowAlert(DoMessage(ps.Option, ValidOptionsNH, true)); return(null); } s.Parameters.Add(ps); } } } s.Report = GridView1.Rows[GridView1.SelectedIndex].Cells[2].Text; s.Username = GetUserName(); if (!saved) { Model.ScheduleReport(s); TextBox2.Text = Model.schedulerResponses.Pky; TextBox3.Text = Model.schedulerResponses.Message; } return(s); }