예제 #1
0
        //Apply leave
        protected void btnApply_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                int i = leave.ApplyLeave(getLeaveInfo(), getHalfdayDetails());
                if (i == 1)
                {
                    //Successfull
                    lblAppliedStatus.Visible = true;
                    lblAppliedStatus.Text    = "Leave Applied Successfully";
                }
                else if (1 == 0)
                {
                    // Already Applied
                    lblAppliedStatus.Text = "Leave Already Applied";
                }
                else
                {
                    lblAppliedStatus.Text = "Error";
                }

                BindLeaveDetails();
                BindApprovalLeaveDetails();
                ClearControls();
            }
        }