16,012,352 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Sam 9100 (Top 22 by date)
Sam 9100
30-Apr-15 17:01pm
View
//
Sam 9100
30-Apr-15 15:31pm
View
//
Sam 9100
30-Apr-15 12:10pm
View
I have a normal dropdown combobox, not a dropdownlist box
Sam 9100
30-Apr-15 11:57am
View
I appreciate your professional and courteous answer Unkownwar.
I replace the line 'if(cb.SelectedItem== null) portion, but it still did not work. I add it here because it renders my pick list item whether one is selected or not.
//In my comboboxExtension class
public static int? SelectedPicklistNullableID(this ComboBox cb)
{
//if (cb.SelectedItem == null) return null;
//added here
if (cb.SelectedIndex.Equals(-1)) return null;
return ((PickListItem)cb.SelectedItem).ID;
}
public static int SelectedPicklistID(this ComboBox cb)
{
return cb.SelectedPicklistNullableID().Value;
My combobox still defaults to the last item of the dropdown list. it is getting overriden everytime.
Sam 9100
30-Apr-15 10:13am
View
Deleted
Why do you even reply to comments when all you do is lecture and talk down to others who are requesting assistance? The principles of working with combo boxes are similar for all combo boxes regardless of their type.
Sam 9100
29-Apr-15 17:31pm
View
I state in the 3rd paragraph this is for my cboCaseStatus as an example. But it happens for all my comboboxes with nullable ID's.
These obvious statements like this, "You can always get selection and see if something is selected or not.' does not help me at all. I have explained in my question that the problem is when I do NOT select anything, that particular combobx returns the last item in my dropdown list, it should leave it empty.
The reason is my users will be entering case data that are "in progress" so some of my combobox controls may start out empty and change.
There is no issue when I select an item from my combobox dropdown list. It saves what I selected. No issue here.
Sam 9100
13-Apr-15 15:03pm
View
I was able to get something resemble to what I wanted. thank you.
Sam 9100
6-Mar-15 10:32am
View
that is all the code I have for the GetNewCaseNumber in my DAL, and the is the stored procedure. Once I get this working, then I do what I need to in the BLL and in the UI.
Sam 9100
5-Mar-15 14:35pm
View
I tried that it gave different error, cannot convert int to string. So I modified my GetNewCaseNumber (above), now it says not all code paths return a value.
Sam 9100
4-Mar-15 23:06pm
View
The error is either int CaseType? or NewIDOUT varchar? Do I need to convert.ToInt32 somewhere?
Sam 9100
4-Mar-15 23:01pm
View
George, the 2015SP00001 s/b the NewCaseNumber/final outcome once saved. I wanted to pass it as a string, but if I need to return as int, I need help with syntax, also may change the Public static int GetNewCaseNumber?
Sam 9100
2-Mar-15 16:40pm
View
Deleted
While trying to figure it out myself, I also changed the name of OpenedDate to DateOpened same as database. They are all the same in db and in code. Not an issue there.
Sam 9100
2-Mar-15 16:31pm
View
Deleted
in database table and stored procedure, datatype of datefields are all datetime.
//Params
@DateOpened datetime,
@DateGrandJury datetime
In my application all dates are datetimepickers.
My apologies for getting back so late. I do still need help.
Sam 9100
16-Jan-15 17:53pm
View
Deleted
Maybe I am saying it incorrectly, but I need help with code in my BLL layer, using the GetNewCaseNumber(or instance?) from the DAL that I originally posted above. The SQL database is fine, the stored Proc "CaseNumber_Insert" already has the case number format calculated. I am not asking about the SQL server, the stored Proc works fine too. I just need to call it somehow in the BLL. That is ALL I need help with.
Sam 9100
15-Jan-15 21:28pm
View
Deleted
@Mycroft Holmes All things considered, the 3 layer application is already set up. First, you misunderstood the nature of my post, and now you say I need to redesign the application? Completely disagree and an unacceptable answer. Again, you cannot just throw things out there when you cannot comprehend the question asked. Why are you even on here?
DAL-db connection successful. All other classes work, only getting a new case number failed. BLL communicates with the UI just fine. I only need help with using the GetNewCaseNumber in the BLL class. this portion was incomplete when I took over the project. Please DO NOT ever suggest anyone to redesign anything when it is an almost perfectly running application. Pay attention to the specific details that users ask.
Sam 9100
15-Jan-15 21:02pm
View
Deleted
@Mycroft Holmes Sorry you consider it crappy. Not very professional on your part when you do not have the full knowledge of how it is designed. I only need help with how to call/use? the DAL GetNewCaseNumber and its stored proc in the BLL layer. That is what my question pertains to. My question was not about cancelling anything. Its about how the BLL class uses the specified DAL method. Please pay attention.
Sam 9100
15-Jan-15 20:59pm
View
Deleted
@PIEBDconsult, Dont worry about the DatabaseFactory, that part is fine. It was not part of the question. If I need to create an instance, then I will need to do that. That IS what I need to know, and the answer I am seeking. I do not want to call it again. An example would be helpful. Thank you.
Sam 9100
15-Jan-15 20:47pm
View
Deleted
@SA I did not post UI code. I can do that portion once I get the BLL class completed, which is what I need help with. And this is not a Form, it is a User Control in the UI. The UI portion, I know how to do. That was not part of the question. The question is on how I can use the DAL GetNewCaseNumber in the BLL layer.
Sam 9100
15-Jan-15 20:41pm
View
Deleted
@Bruno Sorry nothing disappeared. That is it as I am not sure exactly how to start it. I am just trying to simplify some existing code if possible.
Sam 9100
2-Jan-15 13:26pm
View
The String works for the caseType. Thankyou. Now I cannot implicitly convert type int to System.dateTime for openedDate. I am trying to calculate the start of fiscal yr(OpenedDate) each year on July 1. Is there a better way to do this? The original way this is done is the NewInvestigationNumber is an insert stored procedure using the function above. Maybe there is a better way to call the stored proc and just use that so no double entry is done in the database by 2 different users simultaneously. Any help is appreciated.
Sam 9100
2-Jan-15 11:52am
View
Thank you for all your help everyone. I will test it today
Sam 9100
2-Jan-15 11:45am
View
Thanks George. 2015 is the fiscal year start. SP is the case type name "SP-Complex Crimes". But I need to get the SP portion. Database table was set up like that so I have to work with whats there. The '0001' are syst-generated consecutive #s for when a case is entered, it should increment for every new case.
Show More