TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
selvi subramanian
NA
799
572.5k
i need to calculate the present days like this
Aug 6 2014 7:08 AM
i have calculated for the first 10 days that is (1-08-2014 to 10-08-2014)
use this method
DataSet sds = new DataSet();
string vew = "select * from salary where Id='" + TextBox1.Text + "' and nextdate='" + TextBox2.Text + "' ";
sds = mvl.GETDS(vew);
GridView1.DataSource = sds;
GridView1.DataBind();
int count = 0;
foreach (GridViewRow row in this.GridView1.Rows)
{
if (row.Cells[15].Text == "Present")
{
count++;
}
}
this.Label3.Text = count.ToString();
Label3.ForeColor = System.Drawing.Color.LightPink;
in this i got the result 10 days as output
now my need is (12-08-2014 to 20-08-2014) i need to calculate the days
if i use like this means
DataSet sds = new DataSet();
string vew = "select * from salary where Id='" + TextBox1.Text + "' and nextdate='" + TextBox2.Text + "' and Status='" + TextBox3.Text + "'";
sds = mvl.GETDS(vew);
GridView1.DataSource = sds;
GridView1.DataBind();
int count = 0;
foreach (GridViewRow row in this.GridView1.Rows)
{
if (row.Cells[15].Text == "Present")
{
count++;
}
}
this.Label3.Text = count.ToString();
Label3.ForeColor = System.Drawing.Color.LightPink;
it show the 1ly one day but i need 8 days as output
Reply
Answers (
2
)
Learning ASP.NET
How to find the parameters of POST request to .net website?