Forgot your password?
Sign in with
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View Python questions
View C++ questions
View Java questions
All Message Boards...
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Design and Architecture
Internet of Things
C / C++ / MFC
ATL / WTL / STL
Objective-C and Swift
Hardware & Devices
Hosting and Servers
.NET (Core and Framework)
Site Bugs / Suggestions
Spam and Abuse Watch
The Insider Newsletter
The Daily Build Newsletter
Most Valuable Professionals
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
What is 'CodeProject'?
Ask a Question
Bugs and Suggestions
Article Help Forum
Comments by Member 7870345 (Top 18 by date)
You are ok, MAX(COALESCE(age,1)) it was a mistake.
It must be MAX(COALESCE(age,0))
In theory there is no problem.
Can you send me the text of your query with the joins with customer?
Please replace CAST( purdate as date ) with CONVERT(date, purdate,105)
and replace CAST( sd.SaleInvdt as date ) with CONVERT(date, sd.SaleInvdt,105).
In general dont use the function CAST to convert to date instead use the CONVERT function with tree parameters to control how the string must be interpreted.
I´ve made a correction in my previous response in hope can help you
In https://www.yourwebskills.com/htmlobject.php you could see information about that.
IF EXISTS(SELECT 1 FROM HRM.tbAttendanceTimeSlots WHERE (@FromMinutes BETWEEN FromMinutes AND Tominutes) OR (@ToMinutes BETWEEN FromMinutes AND Tominutes))
RETURN -1 --clashing
IF EXISTS(SELECT 1 FROM HRM.tbAttendanceTimeSlots WHERE (FromMinutes BETWEEN @FromMinutes AND @Tominutes) OR (ToMinutes BETWEEN @FromMinutes AND @Tominutes))
RETURN -1 --OVERLAP
INSERT INTO HRM.tbAttendanceTimeSlots
Please put a breakpoint in the sentence "if (Url.IsLocalUrl(ReturnUrl))" and another breakpoint "public ActionResult Nerd()".
Then execute the code, and watch what is the value of "ReturnUrl" (please tell in a message this value). Let the code continue executing and watch if the second breakpoint (in the public ActionResult Nerd()) is executed or not.
I am sorry, but I dont understand what do you mean.
Reading the code there are several case:
a) is a invalid user then ViewBag.Message = "Invalid credential provided" and the Login view is showed again (with ViewBag.Message == "Invalid credential provided")
b) is a valid user and the email is not verified then ViewBag.Message = "Please verify your email first" and the Login view is showed again (with ViewBag.Message == "Please verify your email first")
c) is a valid user and then email is verified and the password is ok, then the cookie with the identification is set and
c.1) if the returnUrl is local then the user is redirected to returnUrl
c.2) if the returnUrl is not local then the user is redirected to RedirectToAction("Nerd", "Home");
d) is a valid user and then email is verified and the password is not ok, then ViewBag.Message = "Invalid credential provided" and the Login view is showed again (with ViewBag.Message == "Invalid credential provided").
Wich is the behavior that do you want? Wich are the diferences between your requeriments and the code?
If Model is null, its imposible to enumerate Model (basically what foreach does).
Conceptually it has no sense
How to iterate, enumerate somethis that not exists?
In my opinion there is a previous error that makes the Model null (perhaps a bad parameter in the call)
Just a suggest:
Does your controller have the [Authorize] attribute? It that case automatically it will be redirect to the Login page whenever its logout.
I hope this will help you.
You are wellcome!
In wich line the exception ocurrs?
I think that to redirect in the _layout.cshtml is imposible. But in your controllers methods you can use the attribute [Authorize] that cause that is the user is not autorized to execute that method he will redirect to the login page.
If you google "authorize attribute mvc example" you can see examples of how to use.
Sorry, i've forgot something else that i need to help you.
Could you send me the result (as text) of the query when is executed in the Sql Server Management Studio?
(please leave the headers in the text)
Could you send me the schema of the tables that appear on the query (that is, CssRplOutboundPackageInfo, UsrMain and csslogicalunit)?
Sorry but perhaps i dont understand the question then.
If you type the query (just you have written) as a "new query" in the "Sql Server Management Studio"? What do you get for the "Initial Package Count"
c) an empty column?
I´m sorry, but i don´t understand the code.
Perhaps this will help you: The controller must have a parameter that conforms the model of the data corresponding to the form submited
Try with this: declare your controller:
Function ProdView(listProd as ProduitViewModel) As ActionResult
and delete the declaration of 'Dim listProd As New ProduitViewModel' in the body of the function
Hope that it will help you.
Could you include the code in the view/html concernig to the form that relates to ProdView?
Without this, I can´t figure what could happen?
Last Updated 1 Jan 1900
All Rights Reserved.