Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
N

NeillJam

@NeillJam
About
Posts
12
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Creating Events with Dynamically created ComboBox(es)
    N NeillJam

    Hi all, If you know all the ComboBoxes are inside the panel, why not just iterate of the Panel's ComboBox controls?

    foreach (ComboBox cBox in panel1.Controls)
    {
    cBox.SelectedIndexChanged += cBox_SelectedIndexChanged;
    }

    Then when any of the ComboBox's SelectedIndexChanged events fire, you capture which one it is and do what needs to be done. eg.

    void cBox_SelectedIndexChanged(object sender, EventArgs e)
    {
    var currentComboBox = sender as ComboBox;

    if (currentComboBox == null)
          return;
    
    MessageBox.Show(currentComboBox.SelectedItem.ToString());
    

    }

    Neill

    C# question

  • How to resolve network related or instance specific error
    N NeillJam

    Another thing that I am confused by (which happens far too easily.) is if you are using a specific framework? Why create ServerConnection with the specified ConnectionString which specifies the initial database, and then attempt sqlServer.Databases[strDBName] which is the database name passed into the method? Neill

    C# database sysadmin sql-server help tutorial

  • How to resolve network related or instance specific error
    N NeillJam

    Well the connection string format looks fine. There could still be quite a few things causing the problem. 1. Are your sure the PC210090 name is correct? 2. Is SQLEXPRESS correct or are you using a named instance? 3. Is the DB name correct? 4. Is the username correct? 5. is the password correct? If you have SQL Management Studio installed on your machine, can you connect to the database from there using the username and password? In Visual Studio, try creating a connection from the Server Explorer window. Is PC210090 where the db server is located the same machine you are using? It could be a firewall issue. There are really quite a few reasons as to why its could not be working. Neill

    C# database sysadmin sql-server help tutorial

  • How to resolve network related or instance specific error
    N NeillJam

    Yeah, the error is pretty self explanatory,a nd OriginalGriff is right, don't use sa account. That being said; Did posting the code mess up your connection string or is that whats wrong? Also why are there 2 \'s between hostname and instance name? Message: Failed to connect to server D**>ata Source=PC210090\\SQLEXPRESS;Initial Catalog=testdb2;Persist Secur>**ity Info=True;User ID=sa;password=password-1 Neill

    C# database sysadmin sql-server help tutorial

  • Why does Navigation throw null exception when returning to a page 2nd time
    N NeillJam

    After reviewing some more, it is quite likely that the code is losing reference to the NavigationService object due to DoTrans() being run on a different thread. But hey, maybe I just don't have any clue to suggest. Good luck in finding the problem. Neill

    C# csharp sharepoint wpf linq question

  • Why does Navigation throw null exception when returning to a page 2nd time
    N NeillJam

    Like I said, its only a possibility that that is causing your problem. Do some research to try and figure out how to get the CurrentSource, we can't do everything for you. Neill

    C# csharp sharepoint wpf linq question

  • Why does Navigation throw null exception when returning to a page 2nd time
    N NeillJam

    Its been a while but a quick search leads me to using CurrentSource of the NavigationService. Something like: NavigationWindow.CurrentSource.ToString());

    C# csharp sharepoint wpf linq question

  • Why does Navigation throw null exception when returning to a page 2nd time
    N NeillJam

    Good day. Please fix the formatting. It makes it really hard to read, so I have not read through your code. Anyway, the first thing that comes to mind is check that when you try to navigate to a XAML page a second time, the NavigationService.Navigate method already has the page you are trying to navigate to in memory. Something similar happened to me quote some time ago. I fixed it by first checking if the page I wanted to navigate to was not already loaded into the NavigationService. If it was, I didn't do anything, else let the Navigation proceed. Hope that helps. Neill

    C# csharp sharepoint wpf linq question

  • aNDROID dEVELOPMENT : fRUSTRATION
    N NeillJam

    Probably for the 249.6 million people that bought an Android smartphone in 2014 alone..... ;) http://bgr.com/2014/07/31/android-vs-ios-vs-windows-phone-vs-blackberry/[^]

    The Lounge android mobile visual-studio help tutorial

  • aNDROID dEVELOPMENT : fRUSTRATION
    N NeillJam

    I downloaded and installed Android Studio 1.0 with JDK 8 about 2 weeks ago and installed it no problem. Perhaps check if its the 32bit or 64 bit, for both the JDK and Android Studio; I think they might separate downloads. And with your PC having 16GB of RAM its most probably running 64 bit Windows. I also downloaded it from the Android Studio site: http://developer.android.com/sdk/index.html[^] I find Android Studio much more pleasant to work with then Eclipse too. Neill

    The Lounge android mobile visual-studio help tutorial

  • Next Linq Question
    N NeillJam

    Hi, probably not the best solution but off the top of my head i can think of 2 methods. 1. Use a switch on ProductID - case 0: --> do query to return all default: --> do other query to return specifics matching ProductId 2.

    List<< PartModel>> results = **((ProductId != 0) ? ** (from pp in context.mmlProductsParts
    join pa in context.tblParts on pp.PartId equals pa.PartId
    where pa.PartNumber.Contains(searchModel.SearchTerm) ||
    pa.Keyword.Contains(searchModel.SearchTerm)
    && pp.ProductId == ProductId
    select new PartModel
    {
    PartId = pa.PartId,
    Category = GetCategory(pa.CategoryId),
    PartNumber = pa.PartNumber,
    Keywords = pa.Keyword,
    PartDescription = pa.Description,
    Price = pa.Price.Value,
    Ratio = pa.Ratio.Value,
    Tribal = pa.Tribal
    }).ToList()
    : (from pp in context.mmlProductsParts
    join pa in context.tblParts on pp.PartId equals pa.PartId
    where pa.PartNumber.Contains(searchModel.SearchTerm) ||
    pa.Keyword.Contains(searchModel.SearchTerm)
    select new PartModel
    {
    PartId = pa.PartId,
    Category = GetCategory(pa.CategoryId),
    PartNumber = pa.PartNumber,
    Keywords = pa.Keyword,
    PartDescription = pa.Description,
    Price = pa.Price.Value,
    Ratio = pa.Ratio.Value,
    Tribal = pa.Tribal
    }

    C# question csharp linq

  • How to trigger the Property Change from WCF service in Silverlight
    N NeillJam

    Hi, Don't know if you have solved this yet, but maybe this will help. I am assuming (oops) that your class is inheriting from INotifyPropertyChanged. Also I don't see in your code (you probably just aren't showing it) the event declaration ie public event PropertyChangedEventHandler PropertyChanged; as well as the OnNotifyPropertyChanged method, although if it wasn't there the OnNotifyPropertyChanged("CustomerSurname"); would complain loudly. The other thing I don't see , and this is what got me in the beginning, is setting the data context. Without it the binding doesn't work. so lets say you have this public class TestingBinding : INotifyPropertyChanged { All your code here } Then using your class: TestingBinding newBindTest = new TestingBinding(); this.DataContext = newBindTest; //<------ without this binding won't work. Hope that helps you out. Regards, Neill

    WCF and WF csharp database wcf asp-net
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups