protected void Link_Command(object sender, CommandEventArgs e) { MySqlConnection dbconn = new MySqlConnection(CommonClass.connectionstring); dbconn.Open(); if (e.CommandArgument.ToString() == "0") { Bind_User_Profile(dbconn); MultiView1.SetActiveView(Profile_View); } else if (e.CommandArgument.ToString() == "1") { AddressBook1.Load_Address(dbconn); MultiView1.SetActiveView(Address_View); } else if (e.CommandArgument.ToString() == "2") { SqlDataSource1.EnableCaching = false; SqlDataSource1.SelectParameters["P_EXTERNAL_USER_ID"].DefaultValue = ClaimsPrincipal.Current.FindFirst("user_id").Value; SqlDataSource1.DataBind(); Order_ListView.DataBind(); MultiView1.SetActiveView(Orders_View); } dbconn.Close(); }
protected void Refresh_Data() { SqlDataSource1.ConnectionString = CommonClass.connectionstring; SqlDataSource1.EnableCaching = false; SqlDataSource1.SelectParameters["P_EXTERNAL_USER_ID"].DefaultValue = ClaimsPrincipal.Current.FindFirst("user_id").Value; SqlDataSource1.DataBind(); Order_ListView.DataBind(); }