예제 #1
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            EmpBL.EmpBusiness eb = new EmpBL.EmpBusiness();
            Auths a = new Auths();
            Employee ee= a.getEmpOName(TextBox2.Text);
            if (ee.EmpId == 0)
            {
                Label6.Visible = true;
            }
            else
            {
                int i = eb.getSalaryForDays(ee.EmpId, Convert.ToInt32(ddlMonth.SelectedValue));
                int totalDays = DateTime.DaysInMonth(2014, Convert.ToInt32(ddlMonth.SelectedValue));
                int leavesLeft = totalDays - i;
             int attendedDays=   a.getNoofDaysAttendedMonth(ee.EmpId, Convert.ToInt32(ddlMonth.SelectedValue));
                Panel1.Visible = true;
                //Label5.Visible = false;

              //  Label5.Text = totalDays.ToString();
                Label4.Text = attendedDays.ToString();
             //   Label3.Text = ee.Position;
                Label2.Text = ee.Department;
                Label1.Text = ee.EmpId.ToString();
            }
        }
예제 #2
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            EmpBusiness eb = new EmpBusiness();
              //   int   EmpId = Convert.ToInt32(Session["username"]);
            //=eb.getEmpOnId(EmpId);
             Auths a = new Auths();
            EmpEntity.Employee ee=      a.getEmpOName(TextBox2.Text);
            if (ee.EmpId == 0)
            {
            Label5.Visible = true;

            }
            else
            {
            int month = Convert.ToInt32(ddlMonth.SelectedValue);
            Label4.Text = Convert.ToString(eb.calcuSalary(ee.EmpId, month));
            //Label3.Text = ee.Position;
            Label2.Text = ee.Department;
            Label1.Text = ee.EmpId.ToString();
            Panel1.Visible = true;
            }
        }