Click here to Skip to main content
15,905,316 members
Home / Discussions / C#
   

C#

 
AnswerRe: determine whether a driver is a print driver or a fax driver Pin
Curtis Schlak.20-Dec-05 4:35
Curtis Schlak.20-Dec-05 4:35 
GeneralRe: determine whether a driver is a print driver or a fax driver Pin
cobra200520-Dec-05 6:14
cobra200520-Dec-05 6:14 
GeneralRe: determine whether a driver is a print driver or a fax driver Pin
cobra200520-Dec-05 6:15
cobra200520-Dec-05 6:15 
QuestionLeave event for Data Grid TextBox Pin
Taimoor Mirza20-Dec-05 3:04
Taimoor Mirza20-Dec-05 3:04 
Questionneed some DateTime help Pin
Joshua Lunsford20-Dec-05 2:55
Joshua Lunsford20-Dec-05 2:55 
AnswerRe: need some DateTime help Pin
Judah Gabriel Himango20-Dec-05 7:22
sponsorJudah Gabriel Himango20-Dec-05 7:22 
GeneralRe: need some DateTime help Pin
Joshua Lunsford20-Dec-05 7:48
Joshua Lunsford20-Dec-05 7:48 
GeneralRe: need some DateTime help Pin
Joshua Lunsford21-Dec-05 5:45
Joshua Lunsford21-Dec-05 5:45 
I think I figured out my issue. Here is my code for anyboday else that needs to do the same.

int dayOfMonth = Int32.Parse(monthly1TxtBox1.Text);
int iterativeMonths = Int32.Parse(monthly1TxtBox2.Text);
string matchpattern2 = "(^1?[1-9]$|^[1-2]0$|^2?[1-8]$)";
Regex re2 = new Regex(matchpattern2);
if(re2.Match(monthly1TxtBox1.Text.ToString()).Success == true)
{

int intDays = 0;
TimeSpan tsWeekly = endDateTime.Date.Subtract(startDateTime);
intDays = tsWeekly.Days;
DateTime[] datearray = new DateTime[intDays];
for(int x=0; x < intDays; x++)
{
datearray[x] = startDateTime.AddDays(x);
}
Array.Sort(datearray);

int loopcounter = 0;
int intRecur = 0;
if(occTxtBox.Text.Length > 0)
intRecur = Int32.Parse(occTxtBox.Text.ToString());
int occurNum = 0;
for(int x=0;x < intDays;x++)
{
if(intRecur == 0)
{
if(datearray[x].Day == dayOfMonth)
{
if(loopcounter == 0)
{
//DoWork
loopcounter = loopcounter + iterativeMonths+1;
}
else if(datearray[x].Month == startDateTime.AddMonths(loopcounter).Month)
{
//DoWork
loopcounter = loopcounter + iterativeMonths;
}
}
}
else
{
if(datearray[x].Day == dayOfMonth && occurNum < intRecur)
{
if(loopcounter == 0)
{
//DoWork
loopcounter = loopcounter + iterativeMonths+1;
occurNum++;
}
else if(datearray[x].Month == startDateTime.AddMonths(loopcounter).Month)
{
//DoWork
loopcounter = loopcounter + iterativeMonths;
occurNum++;
}
}
}
}
msg.Text += "<font color=red>Task Added</font>";
posAddEdit = 0;

}
else
{
msg.Text = "<font color=red>Please enter a day between 1 & 28</font>";
}
p.s. pre /pre always eats my for loops





-- modified at 18:23 Wednesday 21st December, 2005 0;
if(rmConn.State == ConnectionState.Open)
rmConn.Close();

}
else
{
msg.Text = "<font color=red>Please enter a day between 1 & 28</font>";
if(rmConn.State == ConnectionState.Open)
rmConn.Close();
}
p.s. pre /pre always eats my for loops




AnswerRe: need some DateTime help Pin
Roy Heil20-Dec-05 7:22
professionalRoy Heil20-Dec-05 7:22 
GeneralRe: need some DateTime help Pin
Joshua Lunsford20-Dec-05 7:45
Joshua Lunsford20-Dec-05 7:45 
GeneralRe: need some DateTime help Pin
Roy Heil27-Dec-05 9:11
professionalRoy Heil27-Dec-05 9:11 
Questionhow to access bookmark in C# web application Pin
narendrakumarp20-Dec-05 2:54
narendrakumarp20-Dec-05 2:54 
QuestionHow to access a password protected UNC address? Pin
Zishan Haider20-Dec-05 2:42
Zishan Haider20-Dec-05 2:42 
AnswerRe: How to access a password protected UNC address? Pin
narendrakumarp20-Dec-05 2:57
narendrakumarp20-Dec-05 2:57 
GeneralRe: How to access a password protected UNC address? Pin
Zishan Haider20-Dec-05 3:08
Zishan Haider20-Dec-05 3:08 
GeneralRe: How to access a password protected UNC address? Pin
Judah Gabriel Himango20-Dec-05 3:58
sponsorJudah Gabriel Himango20-Dec-05 3:58 
AnswerRe: How to access a password protected UNC address? Pin
Dave Kreskowiak20-Dec-05 5:20
mveDave Kreskowiak20-Dec-05 5:20 
GeneralRe: How to access a password protected UNC address? Pin
Zishan Haider20-Dec-05 6:30
Zishan Haider20-Dec-05 6:30 
GeneralRe: How to access a password protected UNC address? Pin
Dave Kreskowiak20-Dec-05 18:31
mveDave Kreskowiak20-Dec-05 18:31 
GeneralRe: How to access a password protected UNC address? Pin
Zishan Haider22-Dec-05 1:52
Zishan Haider22-Dec-05 1:52 
QuestionFolder View(Arrange Icons By) Pin
rakesh_nits20-Dec-05 1:34
rakesh_nits20-Dec-05 1:34 
QuestionExecuting Javascript based on a condition in codebehind Pin
Krugger40420-Dec-05 1:01
Krugger40420-Dec-05 1:01 
AnswerRe: Executing Javascript based on a condition in codebehind Pin
Guffa20-Dec-05 1:13
Guffa20-Dec-05 1:13 
GeneralRe: Executing Javascript based on a condition in codebehind Pin
Krugger40420-Dec-05 1:26
Krugger40420-Dec-05 1:26 
AnswerRe: Executing Javascript based on a condition in codebehind Pin
Guffa20-Dec-05 2:50
Guffa20-Dec-05 2:50 

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.