15,995,380 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 Member 11403304 (Top 75 by date)
Member 11403304
9-Jan-20 15:51pm
View
Thank you so very much Kris. Your solution did fix the problem and data was inserted into database table. Step one is now done. I have other questions that I will post as I continue to develop my web app. Thank you again. It turned out the solution was very simple!
Member 11403304
8-Jan-20 10:18am
View
Thank you Christian. My supervisor does not want me to use what you suggested.
Member 11403304
31-Dec-19 11:14am
View
Hi Richard. I do not really understand what you mean by complete redesign. Can you please explain for? I am new to web development.
Member 11403304
27-Dec-19 14:57pm
View
I am not sure how to add what you suggested selected index to my code. Please help.
Member 11403304
23-Dec-19 16:27pm
View
MadMyche please accept my apology.
Member 11403304
19-Dec-19 17:01pm
View
Once again thank you Richard. I will post more questions about different things. For example how to hide a page and display a page or panel etc.
Member 11403304
19-Dec-19 13:13pm
View
I will post a new question because I am stuck on populating a RequestorDropDownList. A user will only be allowed to select one name from the list.
Member 11403304
19-Dec-19 12:45pm
View
Thank you again Richard. That fixed my problem. I also understand why I need to do it this way i.e. encode the error message before rendering it. I am learning a lot as I continue to develop this web app
Member 11403304
19-Dec-19 12:32pm
View
Now I would like to add the code I had before in try catch because I would like to catch any exception. When I added the try catch inside public async Task<ienumerable<getrequestorinfomodel>> GetAdditionalStaffEmails() method, I am getting a message '_Default.GetAdditionalStaffEmails()':not all code paths return a value. How to I solve this? I need a try catch
Member 11403304
19-Dec-19 12:03pm
View
Yeeeah. That worked. Since I am in the process of developing a web application. You will probably see a lot of questions from me. I am curious if there was a way to send you an email with a question/s or post here and you will see it?
Member 11403304
19-Dec-19 11:43am
View
After making the changes you suggested, the AdditionalStaffEmailListBox is populated. However the object is displayed instead of names. This is what is populated FTACaseReseting.Model.GetRequestorInfoModel
Member 11403304
19-Dec-19 11:24am
View
That is a great solution. But before I try it. I want you to see how my page is currently loaded. Here is that code. Maybe that will help you see what I am doing.
private void _Default_Load(object sender, EventArgs e)
{
this.PopulateAdditionalStaffEmailListBox();
}
Member 11403304
19-Dec-19 10:45am
View
The only options available for AdditionalStaffEmailListBox. are Dispose, Disposed SupportDisabledAttribute.
When I hover mouse over AdditionalStaffEmailListBox I see AdditionalStaffEmailListBox{System.Web.UI.WebControls.ListBox}
Member 11403304
24-Sep-19 14:29pm
View
I was able to delete the workspace using Visual Studio 2017
Member 11403304
23-Aug-19 13:20pm
View
Now I am stuck on how to send emails to selected names in the listbox. I am not sure how to add the code you suggested to my 'foreach'. I have the following var selectedItem = (GetRequestorInfoModel)AdditionalStaffEmailListBox.SelectedItem; MailAddress to1 = new MailAddress(selectedItem.Email); without the 'foreach' and it sent only one email to the first listbox item selected.
Member 11403304
23-Aug-19 13:18pm
View
Actually based on j snooze suggestions, I am almost done. I am stuck on how to send more than one email to all selected listbox names.
Member 11403304
23-Aug-19 12:10pm
View
You are right. I forgot to add DisplayName as string "". Now my listbox is populated with names! Yeah!. The next part is to select a name or names and send email to the selected name. I will let you know if I am stuck. You have been very helpful on this. I cannot thank you enough. Without you, I won't be able to do this.
Member 11403304
23-Aug-19 11:48am
View
It is WPF
Member 11403304
23-Aug-19 11:37am
View
What is being displayed in the listbox is FTACaseReset.Models.GetAdditionalStaffInfoModel even though I have specified Name as DisplayMember
Member 11403304
23-Aug-19 10:51am
View
You were right DataSource is available. You said to replace the "for' loop. I have 2 of them. One is when adding items to the PopulateAdditionalStaffEmailListBox and the other one is when sending email. Which one do I replace. I tried the one for adding items to the listbox and found out that the listbox is not populated. At least I do not see any items added.
Member 11403304
23-Aug-19 9:58am
View
When I type ListBox. the Datasource is not available among what I can select.
Member 11403304
23-Aug-19 9:47am
View
Should I add code to the code that is populating the listbox?
Member 11403304
23-Aug-19 9:42am
View
Deleted
Hi j snooze, I will try to do what you suggested and will let you know if that works. It sounds like a great idea.
Member 11403304
23-Aug-19 9:39am
View
It is a Windows Application. I have forms yes
Member 11403304
22-Aug-19 11:58am
View
I forgot to update the code here. I did make a change in my code and set emails like this staffEmail.Value = staffEmails[i].Email. However I am MailAddress(ListItem.Value.ToString()) I am getting o'object does not contain a definition for 'Value' and no accessible extension method 'Value' accepting a first argument of type 'object' could be found (are you missing a using directive or an assembly reference?) when I use Value in MailAddress
Member 11403304
22-Aug-19 11:40am
View
Hi Richard. I am not sure how to get the object and extract the email property. That is where I am stuck. I already have code that sends emails when I populate my listbox with emails. However, project owner told me to display names and not emails in the listbox for user to select. Each item in the listbox is an object which also contains email. But I do not know how to extract email from the object. This is why I included a lot of details in my question.
Member 11403304
13-Aug-19 12:16pm
View
Hi Richard, you have solved my issue. Yes I was missing the single quotes around the value. You have stopped all the pain I went through for the last many days. Something so simple yet so difficult to figure out!
Member 11403304
8-Aug-19 23:35pm
View
That seems to work. However there are new requirements given to me by the project owner. I need to also check if CompDate has Op="E" or "A". If CompDate[@Op="A"] or CompDate[@Op="E"] then its true as long as TimeStampChange has no @Op. I add code to the one you gave me but it is returning true when it should return false for the XML above. XML Above should return false. Here is what I added. <xsl:if test="(@Op='E') and (((CompDate[@Op='A']) or (CompDate[@Op='E'])) or (TimestampChange[@Op='E'] and count(*[@Op])=1))">
Member 11403304
5-Aug-19 7:32am
View
Okay I have done that with this question by adding expected xml result.
Member 11403304
4-Aug-19 21:00pm
View
Someone told me to post a new question with these details instead of editing the previous question. I apologize if this is not acceptable.
Member 11403304
2-Aug-19 11:24am
View
I will ask this question in a more simplified manner.
Member 11403304
22-Jul-19 15:22pm
View
So I can use your code in an if statement and then say else objInsertUpdateCase.IConfonfidentail = False
Member 11403304
18-Jul-19 19:09pm
View
Thanks. I thought about doing it that way then got distracted and forgot.
Member 11403304
11-Jul-19 12:33pm
View
I am not able to do it. These are inside the object named objCaseParty
objInsertPWBRorAOS.RelatedParties(i) = objCaseParty
Member 11403304
8-Jul-19 10:44am
View
How do I set selection mode once in the designer?
Member 11403304
8-Jul-19 10:33am
View
What I am trying to do is select items (name) from the listbox which I already have populated with 15 names. The user will select one or more names from the list. If I can get the selection of more than one name from the list, then I want to send email to each person selected in the listbox. Send of email is done by another process. A button Email
Member 11403304
3-Jul-19 15:42pm
View
I have modified my code removing new listbox but I am still not able to select more than one item from the list box
private void AdditionalStaffEmailListBox_SelectedIndexChanged(object sender, EventArgs e)
{
AdditionalStaffEmailListBox.SelectionMode = SelectionMode.MultiSimple;
AdditionalStaffEmailListBox.BeginUpdate();
//Loop through all items in the AdditionalStaffEmailListBox
for (int x = 0; x < AdditionalStaffEmailListBox.Items.Count; x++)
{
//AdditionalStaffEmailListBox.Items.Add("Item " + x.ToString());
if (AdditionalStaffEmailListBox.GetSelected(x) == true)
{
//Deselect all items that are selected
AdditionalStaffEmailListBox.SetSelected(x, false);
}
else
{
//Select all items that are not selected
AdditionalStaffEmailListBox.SetSelected(x, true);
}
}
//Force the AdditionalStaffEmailListBox to scroll back to the top of the list
AdditionalStaffEmailListBox.TopIndex = 0;
}
Member 11403304
1-Jul-19 16:08pm
View
I did not understand what you meant by change the SelectionMode property - it defaults to "One". Please give me more details as to how to make the change you mentioned.
Member 11403304
27-Jun-19 17:13pm
View
This is not about confusing the user. This is the way I figured out to populate the listbox from the same database table. The project owner does not want to add extra work by removing the current combobox and replacing it with a listbox. So the solution I was given is to create a listbox and populate it with the same names from the database. This listbox is for sending email to extra people a sure you decide to send to.
Member 11403304
29-Nov-18 10:11am
View
This is how I did it /Phone[@Current='true' and Type/@Word='HOME' and not(Invalid='true')]
Member 11403304
17-Oct-18 9:18am
View
The problem I am having is that, I get the error message even when I should not get one. I think the problem is where I am saying < 4. I am not sure how to make my if statement compare the time in the WarrantStatusTime element with current time (now) and if that time in WarrantStatusTime element is less than current time (e.g a few minutes earlier than current time) then do nothing. If that time in WarrantStatusTime is not earlier than current time, then show error message
I am doing two things.
1. Check if the date in NewWarrantStatus/WarrantStatusDate is equal to today's date. I have done that successfully.
2. Check the time in WarrantStatusDate/WarrantStatusTime and if this time is not less (earlier) than current time then show error message which means condition has failed. This is the part I need help with.
I knew it was not right but I needed to at least try something before seeking help.
All I need help with right now is part 2 of my if statement.
i.e. Check the time in WarrantStatusDate/WarrantStatusTime and if this time is not less (earlier) than current time, then I will add the error message. I know how to add the error message but need help to check WarrantStatusTime if it is not less than current time.
Thanks for your help.
Member 11403304
7-Aug-18 14:04pm
View
What would be the path if the node was like this?
<charge><chargehistory><statute><StatuteCode Word="269142a4">Traffic
Member 11403304
3-Aug-18 10:28am
View
what is this for var node =? When I convert it to vb.net Dim node As var = I get an error for var that 'Type var is not defined.'
Member 11403304
3-Aug-18 9:37am
View
Actually the exception is "The node to be inserted is from a different document context"
Member 11403304
29-Jul-18 19:21pm
View
I am only required to edit/update the xslt stylesheet. There is no visual studio code that needs to be edited.
So editing the stylesheet I should run the xml through the stylesheet and do the following.
1. Check each Charge with ChargeHistory with Op="A" and Stage="Disposition Event"
2. Find if the vehicle type is one of the following ATV, SNOWMO OR BOAT and offenseType = ST AND the OffenseStatute is not equal to a StatuteCode with first 3 characters of 169 OR the 4 characters of 8491 OR the first 6 characters of 86B331.(Integration/Citation/Vehicle/VehicleType/@Word =ATV or BOAT or SNOWMO)
Member 11403304
16-Jul-18 12:32pm
View
Thank for your suggestion. Point well taken.
Member 11403304
1-May-18 11:30am
View
I mean how do I make sure the user only can enter 1 numeric digit for PhoneCountryCodeID or leave it blank. Make sure the must user must enter 3 numeric digits for PhoneAreasCode
Member 11403304
20-Apr-18 17:02pm
View
Thanks. You are right. My object is already a string. It is working now.
Member 11403304
20-Apr-18 15:55pm
View
This is giving the following error message. Option Strict On disallows implicit from 'string' to IFormatProvider
Member 11403304
9-Apr-18 13:34pm
View
The report is based on customer request. So a customer can requested a report for the Month of March. So when my program run (it is not running yet but in the future), it will get data from the database using a sql query that I have but then it will only give a report in form of a spreadsheet (this is done) for dates e.g. March 1st - March 31st or September 1 - September 30 etc.
Member 11403304
6-Apr-18 8:48am
View
Awesome. It is working! Thank you Maciej Los
Member 11403304
6-Apr-18 8:29am
View
How to I make the date to look like this 2018-03-30T00:00:00
Member 11403304
5-Apr-18 13:42pm
View
Thanks for your help this worked as you suggested
I did solve this by adding Not
e.g. If Not objXMLNode.SelectSingleNode("Report/FName") Is Nothing Then
Member 11403304
27-Sep-17 8:33am
View
Thanks so much for your help. I used what you gave me as an example to get my solution working. I had to work around. Again thank you
Member 11403304
30-Jun-17 13:10pm
View
Thank you so much Peter. Your code with some tweaking is working. You made my day!
Member 11403304
30-Jun-17 11:31am
View
So what do I do with my For each statement? Maybe my question is not clear? List 1 has 3 items and list 2 has 3 items but 2 of the three are duplicates from list one. i.e. 1810458074 from list one appears twice in list two. How do I use a For each and If statements to get that value?
Member 11403304
30-Jun-17 10:38am
View
I am trying to find if list two has duplicate values from list one
Member 11403304
21-Mar-17 7:40am
View
When xml document does not have ProtectionOrder deleted as true I am not getting correct output.
Member 11403304
14-Feb-17 12:15pm
View
I added the code as suggested by _duDE but I am not sure how in debug mode, I can trick the program to think today is Sunday (6) or Saturday (0) so it can run the 3rd option.
Member 11403304
14-Feb-17 11:47am
View
Thanks _duDE, I added the code you suggested. In debug how to I trick the program to think today is Sunday or Saturday so it can run the 3rd option.
Member 11403304
8-Feb-17 11:19am
View
Richard could you please give me an example of how to at least do one if statement for when time is 8AM to 9AM?
Member 11403304
7-Feb-17 8:32am
View
ppolymorphe thanks for helping I did use RegXe and now my code is working!. Thanks for your help
Member 11403304
16-Dec-16 11:27am
View
And that is what I am not sure how to do in my if statements. I know when the first if statement run and there is a type HOME then the rest if statements are skipped. But if the type HOME is not found, I am not sure how to check for other types (CELL, HOME, FAX)
Member 11403304
16-Dec-16 11:13am
View
Thank you for the help. It is now working
Member 11403304
16-Dec-16 10:54am
View
I am not sure how to replace my if statement with what you gave me.
Member 11403304
16-Dec-16 10:42am
View
So xml will always have 4 types of phones HOME, CELL, WORK and FAX. I want to always get the HOME type and display it's number. However if that does not exist and or is does not have @Current ='true', then I want to get the type CELL, if that does not exist or it does not have @Current ='true', then I want to get the type WORK if that does not exist or it does not have @Current ='true', then I want to get type FAX.
So I am not sure how to get the type in that order i.e. Get type 1. HOME 2. If HOME not found get type CELL 3. If not found get type WORK 4. If not found get type FAX. I have edited the code to include FAX and WORK
Member 11403304
13-Dec-16 8:59am
View
Deleted
The order in which the phone elements appear in the xml is not important. What is important is that regardless of where phone type Home element is located in xml, that is the number I want to display unless it does not exist in which case I will display Cell and if that does not exist then display work and if that does not exist display Fax as the last option.
My code is only displaying the first element of phone type which has phone/@Current='true'
How do I logically, select all the nodes with Current equal to true, and sort these items by Type (selecting the first of these is all I need). It sounds simple but I am not sure how or what to change in my code. That way I want to only display phone type Home number if it is found even if there are other phone types found. If phone type Home is not found, then I want to display phone type Cell number, if not found I want to display phone type Work number and if all above are not found, I want to display phone type Fax number.
Member 11403304
13-Dec-16 7:46am
View
The order in which the phone elements appear in the xml is not important. What is important is that regardless of where phone type Home element is located in xml, that is the number I want to display unless it does not exist in which case I will display Cell and if that does not exist then display work and if that does not exist display Fax as the last option.
My code is only displaying the first element of phone type which has phone/@Current='true' which in my xml is Fax. I do not want to display Fax number because there is Home number
How do I logically, select all the nodes with Current equal to true, and sort these items by Type (selecting the first of these is all I need). It sounds simple but I am not sure how or what to change in my code. That way I want to only display phone type Home number if it is found even if there are other phone types found. If phone type Home is not found, then I want to display phone type Cell number, if not found I want to display phone type Work number and if all above are not found, I want to display phone type Fax number.
The output I expect should be
<phone>
<number>218-300-0011>
<type>Home
Member 11403304
9-Dec-16 14:00pm
View
When I debug my code it seems the code is returning the Fax number because that is what it finds first in my xml document. However even though this fax number has current in it, I want to display the Home phone first before the fax number. I am not sure how to do this. The order in xml document is not how I want the numbers displayed.
Member 11403304
9-Nov-16 8:40am
View
I am so lost here. So what I am trying to do before I move forward is test if my sql works.
When for example I test like this Dim strSql As String = GetCaseSQL("5678")
the results is SET @PartyID = 16482594
I would like the result to be SET @PartyID = 5678.
So the result should always be whatever is in the Dim strSql As String = GetCaseDQL("Whatever is in here should be returned as @PartyID")
Member 11403304
9-Nov-16 8:40am
View
I am so lost here. So what I am trying to do before I move forward is test if my sql works.
When for example I test like this Dim strSql As String = GetCaseSQL("5678")
the results is SET @PartyID = 16482594
I would like the result to be SET @PartyID = 5678.
So the result should always be whatever is in the Dim strSql As String = GetCaseDQL("Whatever is in here should be returned as @PartyID")
Member 11403304
4-Nov-16 8:28am
View
Thanks so much for helping me. Your solution worked!
Member 11403304
3-Nov-16 9:28am
View
Okay I will add the code in the question
Member 11403304
3-Nov-16 9:22am
View
Here is the WarrantStatus Class.
public static WarrantStatus GetCurrent(string astrWarrantNumber, bool ablnUsePrimaryDatastoreOnly)
And for the date
Public Property Date As Nullable(Of DateTime)
Get
Set
Member 11403304
3-Nov-16 9:06am
View
Thanks for the help. However I am not sure how to extract the date part from objCurrentWarrantStatus. I do not have a lot of vb.net coding experience.
Show More