« first day (2351 days earlier)      last day (2612 days later) » 

user7480455
4:00 PM
Hi steve so will I need to add the dates to the viewmodel??
 
user7480455
not clear what that guys is saying
 
read the post and you'll know
 
user7480455
I just read it
 
read it again
 
user7480455
let me look again
 
4:01 PM
no where on that page does it say viewmodel anywhere
he has the exact code you need
you can use route attributes to specify parameters.
with attributes on your class and your method you can code up a REST URL
 
oo regex
 
oh he said that doesn't work
[Route(@"daterange/{startDateString}/{endDateString}")]
[HttpGet]
public IEnumerable<MyRecordType> GetByDateRange([FromUri]string startDateString, [FromUri]string endDateString)
or, set up odata
but i wouldn't recommend that for you, it'll confuse you more
heck even the next answer is a good way
 
user7480455
hmm
 
user7480455
yeah see I am not clear on what he is saying to do and how it relates to my call from the view
 
user7480455
so I add that route to the controller?
 
4:14 PM
http get = get data, http post = create data, http put = update data, http delete = delete data.

You wanted to use post for getting data, because you couldn't figure out how to pass parameters for get. I showed you how.
 
user7480455
yeah I think we are talking about different things... my stuff is not as advance as this guys stuff
 
no we're not, you have a drop down list of some sort, they select it, you want to do an ajax call to get data based on that initial lists value
 
user7480455
I am just using the onfocus of a droplist in a view to call a item in the controller and then return the data back
 
user7480455
yeah... so this is a bit advance in that answer from that guy
 
user7480455
I know in webforms this would be very easy
 
user7480455
4:17 PM
to update that list
 
yeah just argue with me
that'll help you
 
user7480455
lol not doing that
 
user7480455
just saying that I think we are on different pages...
 
user7480455
I am grateful for the help but the help exceeds my skill set
 
copy and paste is hard
 
user7480455
4:18 PM
as I am not understanding what the ol'boy is point out
 
steve y u so dum
my porblem is easy
 
user7480455
well let me look around the web some more... as I am not trying to having you hating me
 
i copy code
i paste code
it no work
 
user7480455
I am sure someone has an example of what it is I am trying to do
 
post moar code for me 2 copy
Sorry I'm just pissy lately.
 
user7480455
4:20 PM
yeah man
 
user7480455
chill it's tueday
 
user7480455
tuesday
 
user7480455
I had to ignore some dude today because he having a bad day
 
user7480455
poor guy
 
Gotta get down on Tuesday
 
user7480455
4:21 PM
I'm not clicking any links... trust not click not!
 
lol Mike not that song again
 
user7480455
My grand Pa-pa from the old country taught me that back in 35'
 
Hey guys I'm looking to build a utility in MVC to display a list of database tables and the data in them. I don't want to re-invent the wheel. Can you help me identify what kind of search phase I might use to research and locate an existing sample?
 
user7480455
anyway back to me search for a solution... Help me Ob-Web... you're our only hope...
 
The solution should allow me to browse any tables in the database, and view the data in the tables.
 
4:24 PM
so like, phpmyadmin
 
I'm not familiar with PHP.
 
You get the hell out of here with that PHP garbage
 
lmao
 
Is there a reason SSMS isn't sufficient?
Assuming that you're using SQL Server.
 
Yes, I would like to build a web based tool.
I am using SQL server.
 
4:27 PM
theres probably already web based tools built out there if you look around
 
Please recommend me a good JavaScript book I can read after 9 hrs work, I also want to get involved with ES6 so I can use Angular, I tried Eloquent JavaScript but it has very difficult examples (I stopped after the table example), I know the basics pretty well, but I need to know more. I'm not mainly JS developer I use it in the .NET apps, so what do you recommend?
 
so when you say you don't want to re-invent the wheel, you probably are
 
Yes, that's what I'm trying to locate, but it has to be open-source so that I can utilize the code.
The tool/sample must be in MVC
 
are you familiar with mvc?
 
4:28 PM
A bit.
 
@Mr.Noob This appears to be the sort of thing I need. Let me investigate further. Thank you!
 
i did what he was doing when i was like 15, it was a fun project, AND IT WAS IN PHP
 
if this guy could add screenshot of that app it would be very helpful...
 
R E C O M M E N D
 
4:33 PM
oh
but but
I dont need it...
 
AND LETS BE HONEST, razor is just php lite
 
I like PHP, if I evar finish this coop shit I am trying to add to my wpf app I would do something in PHP (when CI 4 is out)...
2nd week trying to debug this FileSystemWatcher mess :\
 
oh... FileSystemWatcher... Buggy as hell
 
@peterpep So, I need to implement a four loop?
 
^ That seemed random.
 
4:47 PM
five loop
 
yes it buggy + I am using it on lan/network drive, but it works fine until user logout and login then I get 2/3 messages for each notification...
its something in my code but I can't find the problem :\
 
@Mr.Noob The samples I found weren't dynamic or weren't in MVC...
 
5:02 PM
you want to build your own tool?
 
Yes.
It only needs to be fairly simple. Browse any tables, display data.
I can do it in C#, but I'm looking to understand how the model would be constructed, since it's dynamic information.
I mean I could do it easily in webforms, but looking to use this as a learning experience for MVC.
 
you can follow some common MVC example, you can use any good MVC tutorial and after you understand it you will be able to build anything you need
 
user7480455
To Steve G.... See, I don't think the application is having trouble with the passing of vars from the ajax json or javascript thingy... when I press f12 I see the data being passed:
 
user7480455
var data = {
 
user7480455
data = Object {StartDate: "03/24/2017", EndDate: "03/24/2017", StartTime: "00:00", EndTime: "00:00"}
 
user7480455
5:10 PM
sO I don't think that is the issue
 
user7480455
So like the other fellow said to me I changed the thing to post and I still Get the 500 error...
 
user7480455
A boat has been missed some where....
 
that other guy is an idiot
and your getting a 500 because your C# code is breaking
 
user7480455
I would not say that... I think we work for microsoft
 
a normal person wouldput a breakpoint on that method, and step through it to see whats causing the issue
he's an idiot if he's suggesting post for getting data
 
user7480455
5:13 PM
and abnormal person would do the same thing
 
@Mr.Noob I've been doing webforms for so long that it's fairly difficult for me to envision the correct model for this sort of behavior. The model wouldn't be fixed, since the field names and values to display in the table would be various.
 
user7480455
I have stepped... am stepping and continue to step...
 
user7480455
this is how I am seeming the error
 
user7480455
the problem is that the google f12 tool is not going back into the mvc code
 
whatline of code is throwing the exception and what is the exception type and message
lmao
you put a breakpoint in mvc
and 'start' debugging
 
user7480455
5:15 PM
there is no line error
 
user7480455
it's not breaking in mvc
 
yes it is
 
user7480455
that's my point mate
 
user7480455
no it's not
 
a 500 is 'internal server error'
server
not browser
server
 
user7480455
5:15 PM
the page runs if I take off the debugger out of the javascript
 
you're right, it's in the javascript, good luck finding it
 
user7480455
but in the browser tool its a horror show in red text
 
lol steve
you rascal
 
user7480455
yeah javascript is dumb...
3
 
lmao yeah
the javascript
 
user7480455
5:17 PM
I wish there was some other way
 
I can imagine I might have a list of table names passed to the view, for example, and for each table I might call up a partial view that is tied to the table. But how do I read the data in display it in MVC if I don't know what fields will be in the table? I know there's probably ten ways to skin this cat, but I'd like to avoid doing it the wrong way three times...
 
maybe this can help:
http://www.c-sharpcorner.com/UploadFile/cd3310/disply-data-on-grid-in-Asp-Net-mvc-3-application/
 
user7480455
lol
 
Yeah it's totally the Javascript that's your problem
 
Music breakâ„¢:
https://www.youtube.com/watch?v=8Pb-MQCPQsc
 
5:17 PM
lmao
 
@Mr.Noob Looking.
 
i can only lead a horse to water, i can't force him to drink
 
user7480455
mike... gonna ignore you
 
user7480455
yeah I don't want you to do my work for me bro
 
@SteveG not with that attitude you can't
 
5:18 PM
:D
 
im done argueing
lol
now i just sit back and laugh
 
Whoever coined that phrase obviously didn't have duct tape and a garden hose.
 
user7480455
But I am not communicating my issue very well I accept that.. as you guys are very technical...
 
user7480455
but I appreciate all you try
 
user7480455
5:19 PM
let me ask this.. because I don't wantto deal with the java and the ajax stuff
 
user7480455
is there a better way to update a drop list based on user selections on a form
 
you said "i'm calling my api end point (api in mvc), and its returning a 500 internal server error", itell you to place a breakpoint in mvcand you tell me no
 
This example uses a fixed set of data, a model that contains Employee class with FirstName, LastName, etc.
This sort of model makes sense. But how would you do it if you don't know the field names?
 
user7480455
lets forget about the other stuff... just lead said horse to some chewable hay
 
user7480455
in never said anything about an api
 
user7480455
5:21 PM
I am working with a view and a drop down
 
@007 If I wanted to do that, my first choice would be having a list of lists and setting one in JS based on the other input.
 
doesn't matter, 500 is always server
 
user7480455
are those api's if so I have learned a new vocab word
 
This looks like it might work for me...
http://lvasquez.github.io/2013/08/15/return-dynamic-result-from-database-asp-mvc/
 
user7480455
Hi Kendall... but that puts me back in the js world though and that's my prob... I have to methods to building my list
 
user7480455
5:22 PM
my default list then a new list that gets built when the user enters some data in the date fields
 
JS is great
 
user7480455
that all gets returned to a view bag
 
user7480455
I don;t understand js sadly
 
It's terrible too, but I still like it
 
user7480455
I can't get the syntax
 
5:23 PM
That's odd coming from a C# programmer
Almost all JS syntax is identical to C#
 
user7480455
I am not a programmer
 
JavaScript sucks.
 
user7480455
I normally work with vba access and some vb.net
 
: P
 
everything sucks compared to php
 
5:24 PM
access lmao
 
user7480455
so maybe that's why I have trouble with the syntax
 
user7480455
hey Access is great
 
hahahaha
 
user7480455
I would have this app done 3 years ago in access
 
hehehehehehe
 
5:24 PM
my turn, knock knock
 
whos there
 
fuck, i was not prepared for this
 
lol
 
user7480455
people lol at access but it is cool
 
user7480455
5:25 PM
all these technologies are cool if the can solve the solution right?
 
you're funny
 
user7480455
c vb php all this stuff
 
no
 
i was kidding about php
 
user7480455
I don't know them.. but my brain is too small to learn all of them
 
5:26 PM
nah
 
Why you guys shitting on 007 and Access? What's next, y'all don't like Basic either??
 
user7480455
but for this app we picked mvc because all the kids talked about it.. I picked C3 because the demos where don in C3 and here we are
 
user7480455
I'm stuck like a boot in the mud
 
when you see people use shitty excel doc and trying to make it work like an app you understand that sometimes the solution can be very bad
 
user7480455
this will be my first and last mvc app that's for ture lol
 
5:27 PM
> C3
 
po
 
user7480455
you say that but I have created some cool excel add-ins
 
:D
 
No love here for us dinosaurs!
 
The version of C long before C99
@007 me too me too
 
5:29 PM
btw, please don't take anything I say seriously if it's not related specifically to code... all else is merely a distraction for entertainment.
 
guys i have a C# error, it says $ is 'undefined' plx hlp
 
user7480455
so Kendall do you have an example of what you suggested that you can point me too or a internet search term I could use
 
@SeventhSon this should be this chat room slogan
 
user7480455
to find something like you suggested
 
user7480455
5:30 PM
ok,,,
 
@Mr.Noob Ya.
 
ha
nice try fucker
 
LOL
 
But I feel for guys like 007, I used to do Access, VBA, and still do use webforms, coming into this century with the MVC world is challenging.
 
user7480455
5:31 PM
Very!
 
well theres tons of ppl to help if you listen :)
 
I wrote a Rubik's Cube in Access
 
user7480455
Thanks for understanding 7Son
 
@mikeTheLiar LOL I got rick-rolled.
 
user7480455
Access I love it
 
5:31 PM
you dont have to use mvc...
 
user7480455
I know it was a mistake
 
user7480455
but now knee deep I can;t go back
 
@Mr.Noob I love MVC, it's just challenging.
 
I wrote a Visual Basic GUI to ping an IP address in Access.
 
I just use tracert
 
5:32 PM
r u a wizard
 
lol
 
puts on his robe and wizard hat
 
user7480455
I know of at least two places that are still using my access apps and the are big cos...
 
@mikeTheLiar i'm a what!?
 
user7480455
they were stop gap tools
 
user7480455
5:33 PM
but still they are in access and they rock!
 
@KendallFrey Russian Wizard
 
user7480455
but they will be replaced
 
if they rock then why replace them?
 
I'm a wizard!?
 
that because they dont want progress
 
user7480455
5:34 PM
because
 
ah makes sense
 
@KendallFrey Yer a wizard, Kendall
 
user7480455
yep it should!
 
but im just kendall
 
user7480455
all of you guys are super smart
 
user7480455
5:35 PM
that's why I come here when I can
 
See this is what I needed, I guess.
https://msdn.microsoft.com/en-us/library/system.dynamic.expandoobject(v=vs.110).aspx
 
user7480455
it's interesting to see how you guys interact...
 
not me, i'm a crayon eating window licker
i like the blue ones
 
user7480455
you are all Gandolfs in my book!
 
I don't often see blue windows
 
user7480455
5:36 PM
no you are are smart too steve... arrogant but smart!
 
stained glass is very popular
 
Steve's a something licker alright
 
@007 'right' is the word you're looking for
 
I saw companies/factories that instead of getting app that will do what they need invent all kind of excel "solutions" that actually makes them work less effective, but they cant understand it...
 
enough fantasies
 
user7480455
5:38 PM
well in the world in which I work...
 
user7480455
modeling and simulation we use excel
 
user7480455
because of the modeling software
 
user7480455
it uses excel
 
user7480455
shocked me when I first saw it I will admit
 
in that case it maybe ok...
 
user7480455
5:39 PM
they now have a .net solution but tools are tools mates
 
but factory who track orders use shared excel doc?
 
user7480455
if you could loosen nuts with a paper wrench would you bitch about it if it works?
 
user7480455
I doubt it..
 
user7480455
if it work
 
until it rains
 
5:40 PM
lol
 
thats the thing about fragile code / stuff, it works, sure, but any small thing can break it
 
there is a limit to what can be called a "solution"
 
It all depends on your company's/client's tolerance for hackery.
 
tracking orders in shared excel doc can't be called a solution for example
 
user7480455
no every co can afford to offshore dev or pay for devs... if Terry in accounting is good with Access and Excel and it keeps the biz going
 
5:41 PM
@SteveG in your case something very small
 
user7480455
only among computer and technical people
 
;)
pencil small?
 
Only in your wildest dreams.
 
user7480455
people use to use birds to ferry messages.. that was a solution
 
user7480455
tech folks like the latest and greatest I find
 
5:43 PM
If I have a class that is a wrapper for an API and this class has a public method GetCategories(); which performs an API call and returns a list of categories..

Should I wrap the API call in the method with a Try Catch and return an empty list if there is an excepton?
or should I not catch any exceptions so that the exception bubbles up on its own to the user of the api class?
 
you should check the status code returned by the api and throw a custom exception if it's an error status code, if you want to stop executing / the api call is required for the app to work
it wouldn't be terrible to wrap it in a try catch, if you expect it to throw, it all depends on what library you're using to make the api call
this wrapper class could also be where you put your retry logic
it's also a good idea to pass in a base url, and user/pass to the ctor, so when you di it up, you can just pull from an external config, but this isn't a rule, just how i like to do it
 
File.Refresh() only updates file attributes?
 
user7480455
Hmm I found this.. but I still dont get the post thing.. .and why would it require post when the form is not submitted Anyone?
 
user7480455
21
Q: Fill drop down list on selection of another drop down list

Mark FenechI am using MVC and I am still new with MVC. Can anyone tell me if you can fill a drop down list with data on selection of another drop down list. I want to use Jquery to avoid postbacks and therefore making the page smoother.

 
user7480455
Although I don't need to trigger my issue on the action of another drop down... I don;t get why this is a post in the java script
 
5:52 PM
because it's not right, thats why
 
user7480455
It got green checked
 
user7480455
if that means anything
 
im not saying his answer isn't right, just his choice to use post
 
user7480455
so is post flexible?
 
if you really wanted to, you could use the delete verb for retreiving data
 
user7480455
5:55 PM
verb?
 
get post put delete = http verbs
 
user7480455
ahh
 
user7480455
hmmm looking at the delete iin the controller
 
you're making an api btw, a single api call
an 'endpoint'
 
user7480455
I don't know what that means but I will look it up
 
5:57 PM
an api returns data, a webpage returns a view
 
user7480455
I do see that the wizard has built the delete ation result under get
 
user7480455
ok cool so my controller is the api?
 
it's probably both
 
user7480455
    // GET: VRS_REQUEST/Delete/5  I wonder if I just need to add this to my action result
 
user7480455
I know its just a comment but
 
5:59 PM
NOPE
VRS_REQUEST/5 you hit this with http delete
same url, different verbs
 
user7480455
its crazy that it will not run this function
 

« first day (2351 days earlier)      last day (2612 days later) »