Entries:
Comments:
Posts:

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

Discussions

Wayne Taylor Kryptos Backup People!
  • MVC View Question... I think... :-(

    @ScanIAm:Yes it is... I'm sure I will get there. :)

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

    @spivonious:thanks for you reply... sorry it's taken me so long to reply.  All this in new too me.

    I feel silly asking this, but is GetCustomer just returning the Customer Object?

    Thanks again....

  • Linq Query Question

    THANK YOU!!!!! SO Much!   I owe you a beer!! :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D

  • 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.