protected void TechItem1_SelectedIndexChanged(object sender, EventArgs e) { if (((DropDownList)MultiView1.FindControl("TechItem1")).SelectedValue.Equals("V")) { ((TextBox)MultiView1.FindControl("TechOther1")).Visible = true; } else { ((TextBox)MultiView1.FindControl("TechOther1")).Visible = false; } }
protected void WasteItem2_SelectedIndexChanged(object sender, EventArgs e) { if (((DropDownList)MultiView1.FindControl("WasteItem2")).SelectedValue.Equals("U")) { ((TextBox)MultiView1.FindControl("WasteOther2")).Visible = true; } else { ((TextBox)MultiView1.FindControl("WasteOther2")).Visible = false; } }
protected void Name_Command(object sender, CommandEventArgs e) { int Pid = int.Parse(e.CommandArgument.ToString()); Case obj = getCase(Pid); //Case obj = mgr.getCase(Pid); Id.Value = obj.Id.ToString(); Name2.Text = obj.Name; TechItem2.SelectedValue = obj.Techitem; TechName2.Text = obj.Techname; WasteItem2.SelectedValue = obj.Wasteitem; WasteName2.Text = obj.Wastename; Type2.SelectedValue = obj.Type; CaseDesc2.Text = obj.Casedesc; HelpDesc2.Text = obj.Helpdesc; Datasource2.Text = obj.Datasource; if (obj.Type.Equals("B")) { HelpDesc2.Visible = false; } else { HelpDesc2.Visible = true; } if (!TechItem2.SelectedValue.Equals("V")) { ((TextBox)MultiView1.FindControl("Techother2")).Text = ""; ((TextBox)MultiView1.FindControl("Techother2")).Visible = false; } else { ((TextBox)MultiView1.FindControl("Techother2")).Text = obj.Techother; ((TextBox)MultiView1.FindControl("Techother2")).Visible = true; } if (!WasteItem2.SelectedValue.Equals("U")) { ((TextBox)MultiView1.FindControl("Wasteother2")).Text = ""; ((TextBox)MultiView1.FindControl("Wasteother2")).Visible = false; } else { ((TextBox)MultiView1.FindControl("Wasteother2")).Text = obj.Wasteother; ((TextBox)MultiView1.FindControl("Wasteother2")).Visible = true; } MultiView1.ActiveViewIndex = 2; }
protected void Button3_Click(object sender, EventArgs e) { MultiView1.SetActiveView((View)MultiView1.FindControl("View1")); }