protected void Page_Load(object sender, EventArgs e) { if (Inventions.GetInstance() == null) { Inventions locInventions = new Inventions(1); } QueryStringParameter locParameters = (QueryStringParameter)FastActionList.SelectParameters[0]; locParameters.DefaultValue = (string)Session["UserName"]; QueryStringParameter locParameters2 = (QueryStringParameter)IfActionList.SelectParameters[0]; locParameters2.DefaultValue = (string)Session["UserName"]; int OldIndex3 = ActionList2.SelectedIndex; ActionList2.DataSource = CreateActionListDataSource(); ActionList2.DataTextField = "TextField"; ActionList2.DataValueField = "ValueField"; ActionList2.DataBind(); ActionList2.SelectedIndex = OldIndex3; int OldIndex5 = ProductList.SelectedIndex; ProductList.DataSource = CreateProductListDataSource(); ProductList.DataTextField = "TextField"; ProductList.DataValueField = "ValueField"; ProductList.DataBind(); ProductList.SelectedIndex = OldIndex5; int OldIndex6 = ProductList2.SelectedIndex; ProductList2.DataSource = CreateProductListDataSource2(); ProductList2.DataTextField = "TextField"; ProductList2.DataValueField = "ValueField"; ProductList2.DataBind(); ProductList2.SelectedIndex = OldIndex6; int OldIndex7 = ProductList3.SelectedIndex; ProductList3.DataSource = CreateProductListDataSource2(); ProductList3.DataTextField = "TextField"; ProductList3.DataValueField = "ValueField"; ProductList3.DataBind(); ProductList3.SelectedIndex = OldIndex7; int OldIndex8 = IfActionsNumberList1.SelectedIndex; IfActionsNumberList1.DataSource = CreateIfActionsNumberListDataSource2(); IfActionsNumberList1.DataTextField = "TextField"; IfActionsNumberList1.DataValueField = "ValueField"; IfActionsNumberList1.DataBind(); IfActionsNumberList1.SelectedIndex = OldIndex8; int OldIndex9 = LicenseTypeList.SelectedIndex; LicenseTypeList.DataSource = CreateLicenseTypeSource(); LicenseTypeList.DataTextField = "TextField"; LicenseTypeList.DataValueField = "ValueField"; LicenseTypeList.DataBind(); LicenseTypeList.SelectedIndex = OldIndex9; }
/* * public string agentName = "test"; * public string AgentName * { * get { return agentName; } * }*/ protected void Page_Load(object sender, EventArgs e) { Product locProduct = new Product(1); /* * if (Plan.GetInstance() == null) * { * Plan locPlan = new Plan(1); * }*/ int OldIndex = ProductList.SelectedIndex; ProductList.DataSource = CreateProductDataSource(); ProductList.DataTextField = "TextField"; ProductList.DataValueField = "ValueField"; ProductList.DataBind(); ProductList.SelectedIndex = OldIndex; Product.SetProductID = "0"; Product.SetOptionID = 0; QueryStringParameter locParameters = (QueryStringParameter)Plan1.SelectParameters[0]; locParameters.DefaultValue = (string)Session["UserName"]; QueryStringParameter locParameters2 = (QueryStringParameter)Product1.SelectParameters[0]; locParameters2.DefaultValue = (string)Session["UserName"]; }
public void TestEnumerablesBrackets() { var parameter = new QueryStringParameter("param", new[] { "test1", "test2" }, true); var result = parameter.ToString(); Assert.AreEqual("param=[test1,test2]", result); }
public void TestEnumBrackets() { var parameter = new QueryStringParameter("param", Synology.Tests.TestEnum.Test1 | Synology.Tests.TestEnum.Test2, true); var result = parameter.ToString(); Assert.AreEqual("param=[test1,test2]", result); }
public void TestEnum() { var parameter = new QueryStringParameter("param", Synology.Tests.TestEnum.Test1 | Synology.Tests.TestEnum.Test2); var result = parameter.ToString(); Assert.AreEqual("param=test1,test2", result); }
public void QueryStringParameter_Clone() { QueryStringParameterPoker queryParam = new QueryStringParameterPoker("EmployeeName", TypeCode.String, "Name"); QueryStringParameter clonedParam = (QueryStringParameter)queryParam.DoClone(); Assert.AreEqual("EmployeeName", clonedParam.Name, "QueryStringParameterCloneName"); Assert.AreEqual(TypeCode.String, clonedParam.Type, "QueryStringParameterCloneType"); Assert.AreEqual("Name", clonedParam.QueryStringField, "QueryStringParameterCloneFormField"); }
public void TestEmptyParameters() { var parameter = new QueryStringParameter("param", string.Empty); var parameter2 = new QueryStringParameter(string.Empty, "param"); Assert.AreEqual(string.Empty, parameter.ToString()); Assert.AreEqual(string.Empty, parameter2.ToString()); Assert.AreEqual(parameter.ToString(), parameter2.ToString()); }
protected void Page_Load(object sender, EventArgs e) { this.LBInsertar_Nuevo.Visible = (Session["id_role"] != null && (int)Session["id_role"] == 1); if (Request.QueryString["mode"] != null && Request.QueryString["mode"] == "search") { this.ProductosCategoriasObjectDataSource.SelectMethod = "Buscar"; this.ProductosCategoriasObjectDataSource.TypeName = "BLLayer.Productos_X_Categoria"; Parameter p = new QueryStringParameter("p", TypeCode.String, "query"); this.ProductosCategoriasObjectDataSource.SelectParameters.Add(p); } }
private void SettingQuerystringSession() { ViewState["FormID"] = string.Empty; //20120726 取消此註解。 每次進來都先做清除已便強制繼承此 basepage 的頁面進行權限驗證 if (Request.QueryString.GetValues(strFunctionParaValue) != null) { ViewState["QueryStringParameter"] = GetQueryStringParameter(this.GetUrlParamValueMode(Request.QueryString.GetValues(strFunctionParaValue)[0], string.Empty)); if (QueryStringParameter.ContainsKey("strFunctionID")) { ViewState["FormID"] = QueryStringParameter["strFunctionID"]; } } }
private void Page_Load(object sender, System.EventArgs e) { // <snippet2> QueryStringParameter empIdParam = new QueryStringParameter(); empIdParam.Name = "empId"; empIdParam.QueryStringField = "empId"; AccessDataSource1.SelectParameters.Add(empIdParam); // </snippet2> // <snippet4> MyAccessDataSource.SelectParameters.Add(new QueryStringParameter("employee", "employee")); // </snippet4> }
public override void PreRequestDataBinding(object sender, PreRequestDataBindingEventArgs e) { // Remove empty state query string parameter QueryStringParameter state = null; foreach (var item in e.Request.QueryStringParameters) { if (item.Name.ToLower() == "state" && string.IsNullOrEmpty(item.Value)) { state = item; break; } } if (state != null) { e.Request.QueryStringParameters.Remove(state); } base.PreRequestDataBinding(sender, e); }
protected void Page_Load(object sender, EventArgs e) { /* * if (Market.GetInstance() == null) * { * Market locMarket = new Market(1); * }*/ QueryStringParameter locParameters = (QueryStringParameter)MarketState.SelectParameters[0]; locParameters.DefaultValue = (string)Session["UserName"]; QueryStringParameter locParameters2 = (QueryStringParameter)ExchangeVariant.SelectParameters[0]; locParameters2.DefaultValue = (string)Session["UserName"]; int OldIndex = ProductList.SelectedIndex; ProductList.DataSource = CreateProductDataSource(); ProductList.DataTextField = "TextField"; ProductList.DataValueField = "ValueField"; ProductList.DataBind(); ProductList.SelectedIndex = OldIndex; int OldIndex2 = ProductListFromStock.SelectedIndex; ProductListFromStock.DataSource = CreateProductListFromStockDataSource(); ProductListFromStock.DataTextField = "TextField"; ProductListFromStock.DataValueField = "ValueField"; ProductListFromStock.DataBind(); ProductListFromStock.SelectedIndex = OldIndex2; int OldIndex3 = LotList.SelectedIndex; LotList.DataSource = CreateLotListDataSource(); LotList.DataTextField = "TextField"; LotList.DataValueField = "ValueField"; LotList.DataBind(); LotList.SelectedIndex = OldIndex3; }
public Request() { Headers = new Header[0]; QueryStringParameters = new QueryStringParameter[0]; }
public QueryStringParameterPoker(QueryStringParameter param) : base(param) { }
public Request() { BodyTokens = new BodyToken[0]; Headers = new Header[0]; QueryStringParameters = new QueryStringParameter[0]; }