示例#1
0
 public EmpCheckDay(USERINFO emp, CHECKINOUT obj)
 {
     Emp       = emp;
     CheckDate = obj.CHECKTIME.Date;
     RawChecks.Add(obj);
     Checks = RawChecks;
 }
示例#2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         DataTable dt = CHECKINOUT.GetAllDataRecord();
         GvAttendance.DataSource = dt;
         GvAttendance.DataBind();
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         DataTable dt = CHECKINOUT.GetAllDataRecord(int.Parse(Session["Sid"].ToString()));
         GvAttendance.DataSource = dt;
         GvAttendance.DataBind();
     }
 }
示例#4
0
        /// <summary>
        /// 添加考勤记录
        /// </summary>
        /// <param name="obj"></param>
        public void Add(CHECKINOUT obj)
        {
            Checks.Add(obj);
            var emp = EmpChecks.Where(p => p.CheckDate == obj.CHECKTIME.Date).SingleOrDefault();

            if (emp != null)
            {
                emp.Add(obj);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Page.IsPostBack == false)
            {
                //  StuDT = StuAdapter.Select_UNAME(Session["sname"].ToString());

                DataTable std = StdMst.GetAllActiveData();

                int       month        = DateTime.Now.Month;
                DataTable attendancedt = CHECKINOUT.GetAllMonthlyAttendanceRecord(int.Parse(Session["Sid"].ToString()), month);

                if (attendancedt != null && attendancedt.Rows.Count > 0)
                {
                    lbltotalatt.Text = attendancedt.Rows.Count.ToString();


                    // AttDT = AttAdapter.Select_Roll_Atatus(StuDT.Rows[0]["rollno"].ToString(), "Present");

                    try
                    {
                        lblpresent.Text = attendancedt.Select("Status='Present' OR Status='Holiday'").CopyToDataTable().Rows.Count.ToString();
                    }
                    catch
                    {
                        lblpresent.Text = "0";
                    }
                    try
                    {
                        lblabsent.Text = attendancedt.Select("Status='Abscent'").CopyToDataTable().Rows.Count.ToString();
                    }
                    catch
                    {
                        lblabsent.Text = "0";
                    }
                    // AttDT = AttAdapter.Select_Roll_Atatus(StuDT.Rows[0]["rollno"].ToString(), "Absent");

                    try
                    {
                        lblleave.Text = attendancedt.Select("Status='Leave'").CopyToDataTable().Rows.Count.ToString();
                    }
                    catch
                    {
                        lblleave.Text = "0";
                    }


                    DataTable LeaveDT = LeaveMst.GetAllDataRecordByStId("", null, int.Parse(Session["Sid"].ToString()));
                    lbltotalleave.Text = LeaveDT.Rows.Count.ToString();


                    DataTable CompDT = Complainmst.GetAllDataRecordByStId("", null, int.Parse(Session["Sid"].ToString()));
                    lbltotalattcompl.Text = CompDT.Rows.Count.ToString();
                }
            }
        }
示例#6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Page.IsPostBack == false)
            {
                int month = DateTime.Now.Month;
                //int.Parse(Session["Sid"].ToString())
                DataTable AttDT = CHECKINOUT.GetAllMonthlyAttendanceRecord(int.Parse(Session["Sid"].ToString()), month);
                if (AttDT != null)
                {
                    //AttDT = AttAdapter.Select_By_ROLLNO(StuDT.Rows[0]["rollno"].ToString());

                    GridView1.DataSource = AttDT;
                    GridView1.DataBind();
                    lbl.Text = "Result = " + GridView1.Rows.Count.ToString();
                }
            }
        }
示例#7
0
 protected void Button7_Click(object sender, EventArgs e)
 {
     try
     {
         int month = DateTime.Now.Month;
         //if (drpmonth.SelectedIndex > 0)
         //{
         //    month = int.Parse(drpmonth.SelectedValue);
         //}
         DataTable Student = CHECKINOUT.GetAllMonthlyAttendanceRecordByDivId(month, int.Parse(drpdiv.SelectedValue));
         GridView1.DataSource = Student;
         GridView1.DataBind();
     }
     catch (Exception)
     {
         // throw;
     }
     // MultiView1.ActiveViewIndex = 0;
 }
示例#8
0
        //protected void GvStaff_RowDeleting(object sender, GridViewDeleteEventArgs e)
        //{
        //   CHECKINOUT CHECKINOUT.Delete(Convert.ToInt32(GvStaff.DataKeys[e.RowIndex].Value));
        //    DataTable StaffDT = CHECKINOUT.GetAllActiveData();
        //    GvStaff.DataSource = StaffDT;
        //    GvStaff.DataBind();
        //}
        //protected void GvStaff_RowEditing(object sender, GridViewEditEventArgs e)
        //{
        //    try
        //    {
        //        GvStaff.EditIndex = e.NewEditIndex;

        //        int StaffId = int.Parse((GvStaff.Rows[e.NewEditIndex].FindControl("lbl_SID") as Label).Text);
        //        Response.Redirect("AddStaff.aspx?SId=" + StaffId,false);
        //    }
        //    catch (Exception ex)
        //    {
        //    }

        //}

        protected void btnsearch_Click(object sender, EventArgs e)
        {
            DataTable checkoutdt = null;

            try
            {
                DataTable dt = CHECKINOUT.GetAllDataRecord();
                if (dt != null)
                {
                    checkoutdt = dt.Select("Name LIKE '%" + txtName.Text.Trim() + "%' AND RollNo like '%" + txtRollNo.Text.Trim() + "%'").CopyToDataTable();
                    GvAttendance.DataSource = checkoutdt;
                    GvAttendance.DataBind();
                }
            }
            catch
            {
                GvAttendance.DataSource = checkoutdt;
                GvAttendance.DataBind();
            }
        }
示例#9
0
        protected void btnreport_Click(object sender, EventArgs e)
        {
            if (drpmonth.SelectedIndex == 0)
            {
                lbl.Text = "Select month first !!";
            }
            else
            {
                int month = int.Parse(drpmonth.SelectedValue);

                DataTable AttDT = CHECKINOUT.GetAllMonthlyAttendanceRecord(int.Parse(Session["Sid"].ToString()), month);
                if (AttDT != null)
                {
                    //AttDT = AttAdapter.Select_By_ROLLNO(StuDT.Rows[0]["rollno"].ToString());

                    GridView1.DataSource = AttDT;
                    GridView1.DataBind();
                    lbl.Text = "Result = " + GridView1.Rows.Count.ToString();
                }
                lbl.Text = "Result = " + GridView1.Rows.Count.ToString();
            }
        }
示例#10
0
 /// <summary>
 /// 添加考情
 /// </summary>
 /// <param name="obj"></param>
 public void Add(CHECKINOUT obj)
 {
     RawChecks.Add(obj);
 }