Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements


Wayne Taylor Kryptos Backup People!
  • Linq Query Question

    Thanks for replying.   Yes I know my names are mess up :(  My bad.  

    Sorry. I don't understand how or where pc is defined? :(

  • Linq Query Question

    I'm new to MVC/EF.

    The entity needs to return Job.  

    Currently if I search for "Company 10" then it will return all of the jobs for "Company 10".

    "Company 10" has previous been know as "Company ABC", the previous company names being held in the PreviousCompany table and held in pCompanyName.

    So if I searched for "Company ABC" (or any other previous name), then it would return the same as entering "Company 10". 

    I hope that makes sense and thanks for helping, v. grateful!. 


  • Linq Query Question

    @SimonJ:Thanks.  With my current query don't have access to the pCompany. 

    I think I need to rethink how this should work... Currently I'm trying to bring back related companies with different names and I'm searching on the Jobs table, I think I need to search on the company and bring back related jobs.... 


  • "Comments have been closed since this content was published more than 30 days ago..."

    How about if there has been no posts in the last 30 days it closes but if somebody comments within 30 days it resets the counter....

  • Linq Query Question

    @GreyLensman:I'm don't understand how that search's the pCompanyName field.

    @SimonJ: Thanks for the input.

    I'm not sure if I have explained my self very well. What I posted works fine. I just want it to check the pCompanyName field and return any results which match the fields in the Company table.

    Thanks for the help so far, it's appreciated. 

  • Linq Query Question

    Tables Context (image)

    I want to be able to define a query that will bring back all of the names found in the pCompany table (I know it's not great), when the user enters a string "ABC" along with anything found in the Company Table, CompanyName

    Current I have the following : 

    var jobs = from j in db.Jobs
    select j;
    if (!String.IsNullOrEmpty(JobType))
    jobs = jobs.Where(t => t.Type.Contains(JobType));
    if (!String.IsNullOrEmpty(SearchString))
    SearchString = SearchString.Trim();
    jobs = jobs.Where(j => j.Engineer.ToUpper().Contains(SearchString.ToUpper())
    || j.JobRef.ToString().Contains(SearchString.ToUpper())
    || j.Company.CompanyName.ToUpper().Contains(SearchString.ToUpper())
    || j.Engineer.ToUpper().Contains(SearchString.ToUpper())
    || j.OrderRef.ToString().Contains(SearchString));
    return View(jobs.ToList());

  • MVC View Question... I think... :-(

    @spivonious:@blowdart:Thanks guys.  C9 has been such a good resource and great community!

    OK. I have it kinda of working... in the controller. which isn't great based on both of your comments. 

    What I can't seem to be able to is test if the value has changed and also, it would be useful to be able to update some fields and not others... having trouble working out that.

    Where should I put the Business Logic, do I create a new class?  How do I pass values between, what's the correct way to call between Controllers/Business logic....

    Once again, thanks for your assistance. 

  • MVC View Question... I think... :-(

    I want to capture the company name. if the user changes the company name then update the previousnames table .... I have used the out of the box scaffolding....  I'm not sure if I should be doing this test on the view......

    This is what I would like to do : - Inside the Edit

    • Before the CompanyName is updated grab it, in to a variable
    • Test if the CompanyName Field has been changed if so, call a c# function to update the database with the companyname captured. 

    Sorry for all the questions.... trying to wrap my head around MVC/C#/EF, etc all at once... :(


  • Company Name Rename

    @phreaks:humm intresting..   I've been working on another section, since I posted this...   Still haven't got around to this section as of yet. 

  • 2013 MVC5

    @spivonious:This is what I did.  I thought there was an requirement for auth and turn out the client changed their mind.  Otherwise I would of started with no auth. 

    @blowdart:I meant as in, could I right click on the project and remove auto rather than manually removing it all.


    Thanks for the replies. :)