Click here to Skip to main content
15,888,454 members
Home / Discussions / C#
   

C#

 
GeneralRe: Serial communication between LPC2132 microcontroller and serial interface PC through RS 232 and RJ45 Pin
Sanjay Siwach17-Jan-22 5:23
Sanjay Siwach17-Jan-22 5:23 
GeneralRe: Serial communication between LPC2132 microcontroller and serial interface PC through RS 232 and RJ45 Pin
Sanjay Siwach17-Jan-22 9:46
Sanjay Siwach17-Jan-22 9:46 
GeneralRe: Serial communication between LPC2132 microcontroller and serial interface PC through RS 232 and RJ45 Pin
Luc Pattyn17-Jan-22 11:40
sitebuilderLuc Pattyn17-Jan-22 11:40 
GeneralRe: Serial communication between LPC2132 microcontroller and serial interface PC through RS 232 and RJ45 Pin
Member 1549617517-Jan-22 21:51
Member 1549617517-Jan-22 21:51 
GeneralRe: Serial communication between LPC2132 microcontroller and serial interface PC through RS 232 and RJ45 Pin
Luc Pattyn18-Jan-22 2:29
sitebuilderLuc Pattyn18-Jan-22 2:29 
QuestionEasy way programmatically select step by step button. Pin
Member 154938239-Jan-22 2:20
Member 154938239-Jan-22 2:20 
AnswerRe: Easy way programmatically select step by step button. Pin
OriginalGriff9-Jan-22 2:24
mveOriginalGriff9-Jan-22 2:24 
GeneralRe: Easy way programmatically select step by step button. Pin
Member 154938239-Jan-22 2:37
Member 154938239-Jan-22 2:37 
GeneralRe: Easy way programmatically select step by step button. Pin
OriginalGriff9-Jan-22 3:09
mveOriginalGriff9-Jan-22 3:09 
AnswerRe: Easy way programmatically select step by step button. Pin
#realJSOP9-Jan-22 3:15
mve#realJSOP9-Jan-22 3:15 
AnswerRe: Easy way programmatically select step by step button. Pin
Gerry Schmitz9-Jan-22 7:17
mveGerry Schmitz9-Jan-22 7:17 
GeneralRe: Easy way programmatically select step by step button. Pin
OriginalGriff9-Jan-22 9:38
mveOriginalGriff9-Jan-22 9:38 
GeneralRe: Easy way programmatically select step by step button. Pin
Gerry Schmitz9-Jan-22 21:11
mveGerry Schmitz9-Jan-22 21:11 
GeneralRe: Easy way programmatically select step by step button. Pin
OriginalGriff9-Jan-22 21:18
mveOriginalGriff9-Jan-22 21:18 
JokeRe: Easy way programmatically select step by step button. Pin
Richard Deeming9-Jan-22 21:30
mveRichard Deeming9-Jan-22 21:30 
GeneralRe: Easy way programmatically select step by step button. Pin
OriginalGriff9-Jan-22 21:58
mveOriginalGriff9-Jan-22 21:58 
QuestionMessage Removed Pin
5-Jan-22 9:21
Laomedeia5-Jan-22 9:21 
Questionbind a gridview and a listbox to a database Pin
steven_noppe5-Jan-22 2:03
steven_noppe5-Jan-22 2:03 
AnswerRe: bind a gridview and a listbox to a database Pin
Gerry Schmitz5-Jan-22 5:26
mveGerry Schmitz5-Jan-22 5:26 
AnswerRe: bind a gridview and a listbox to a database Pin
RobertSF7-Jan-22 10:47
professionalRobertSF7-Jan-22 10:47 
GeneralRe: bind a gridview and a listbox to a database Pin
steven_noppe11-Jan-22 22:31
steven_noppe11-Jan-22 22:31 
GeneralRe: bind a gridview and a listbox to a database Pin
RobertSF12-Jan-22 12:37
professionalRobertSF12-Jan-22 12:37 
GeneralRe: bind a gridview and a listbox to a database Pin
RobertSF12-Jan-22 13:33
professionalRobertSF12-Jan-22 13:33 
QuestionIs there a way to improve this code? Pin
Richard A Knox4-Jan-22 8:06
Richard A Knox4-Jan-22 8:06 
This is a program I have been tinkering with for my daughter to help her budget her finances. I understand that there are programs out there, but I wanted something to do and decided to play around with do this.

I am working on the income section, which has income coming in either weekly, semi monthly, bimonthly, monthly or yearly. What I am showing is the weekly section and I am curious as to whether there is a better method, which there usually is to what I am attempting to accomplish.

The "ds.Tables[0].Rows[i][0].ToString()" brings in the test verbiage for whether its weekly, monthly, whatever.

The "f" variable in the for loop is a numerical response provided by the user as to how far out they which to forecast their budget. 4 weeks, 6 weeks, 8 weeks and so forth.

If there is more detail needed, please let me know.


C#
//============= Begining of Weekly (52) ==========
                        if (ds.Tables[0].Rows[i][0].ToString() == "Weekly (52)")
                        {
                        var date = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);

                        for (int x = 1; x < 7; x++)
                            {
                              if (ds.Tables[0].Rows[i][1].ToString() != date.ToString("ddd"))
                                {
                                   
                                DateTime newdate = date.AddDays(1);
                                date = newdate;
   
                                }
                                else
                                {
                                    for (int n = 0; n <= ((4*f)-1); n++)
                                        {
                                        list.Add(date);
                                        DateTime newdate = date.AddDays(7);
                                        date = newdate;
                                          
                                        }

                                    break;
                                }
                            }
                        }
                        //============= Ending of Weekly (52) ==========

Thank you,
Richard
Disable Vet
Grandfather
Pain in the @ss

AnswerRe: Is there a way to improve this code? Pin
Gerry Schmitz4-Jan-22 12:25
mveGerry Schmitz4-Jan-22 12:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.