if i type the id as 1 i have to show the current month attendance
this is my design
| Width="89px" onclick="ImageButton1_Click" /> |
GridLines="None"
AutoGenerateColumns="False">
Total presents
this is my code
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
public partial class Employee_Total_Days : System.Web.UI.Page
{
Marvel mml = new Marvel();
DataSet sds = new DataSet();
protected void Page_Load(object sender, EventArgs e)
{
MultiView1.Visible = true;
MultiView1.SetActiveView(View1);
}
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
MultiView1.SetActiveView(View2);
string vew = "select Id,Date,Name,Status,Section,Intime from aten where Id='" + TextBox1.Text + "'";
sds = mml.GETDS(vew);
GridView1.DataSource = sds;
GridView1.DataBind();
int count = 0;
foreach (GridViewRow row in this.GridView1.Rows)
{
if (row.Cells[3].Text == "Present")
{
count++;
}
}
this.lblStatusCount.Text = count.ToString();
}
protected void Button1_Click(object sender, EventArgs e)
{
MultiView1.Visible = true;
MultiView1.SetActiveView(View1);
TextBox1.Text = "";
}
}
the label shows the present days but it not for a particular month i need for a current month
1 Reply
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.

Yadlapalli SrikanthPosted May 20, 2014, 3:29 AM