Example #1
0
 protected void GVNewLeave_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "app")
     {
         objBll.UpdateLeave(Convert.ToInt32(e.CommandArgument.ToString()), "Approved");
     }
     else
     {
         objBll.UpdateLeave(Convert.ToInt32(e.CommandArgument.ToString()), "Rejected");
     }
     GVNewLeave.DataSource = objBll.GetLeave("Pending");
     GVNewLeave.DataBind();
     LblNew.Text = GVNewLeave.Rows.Count.ToString();
     MultiView1.ActiveViewIndex = 0;
 }
Example #2
0
        protected void BtnSelect_Click(object sender, EventArgs e)
        {
            if (DdlDept.SelectedValue != "-1")
            {
                if (DdlEmp.SelectedValue != "-1")
                {
                    objBll.DeptId = Convert.ToInt32(DdlDept.SelectedValue);
                    objBll.EmpId  = Convert.ToInt32(DdlEmp.SelectedValue);

                    GVNewLeave.DataSource = objBll.GetLeave("Pending");
                    GVNewLeave.DataBind();
                    LblNew.Text = GVNewLeave.Rows.Count.ToString();
                }
                else
                {
                    MessageBox.Show("Select Employee");
                }
            }
            else
            {
                MessageBox.Show("Select Department");
            }
        }