예제 #1
0
        protected void btnGo_OnClick(object sender, EventArgs e)
        {
            if (ddlStatus.SelectedValue.ToString() == "-1")
            {
                ClientScript.RegisterStartupScript(typeof(Page), "MessagePopUp",
                                                   "<script>alert('Select Status.');</script>");
            }
            else
            {
                ApplicationResult objResult       = new ApplicationResult();
                LeaveApplyBl      objLeaveApplyBl = new LeaveApplyBl();

                objResult = objLeaveApplyBl.LeaveApply_Select(Convert.ToInt32(ddlStatus.SelectedValue), Convert.ToInt32(Session[ApplicationSession.USERID]));
                if (objResult != null)
                {
                    if (objResult.resultDT.Rows.Count > 0)
                    {
                        gvLeaveApprove.DataSource = objResult.resultDT;
                        gvLeaveApprove.DataBind();
                        PanelVisibility(2);
                    }
                    else
                    {
                        PanelVisibility(3);
                    }
                }
            }
        }
예제 #2
0
        private void BindApplyLeave()
        {
            ApplicationResult objResult       = new ApplicationResult();
            LeaveApplyBl      objLeaveApplyBl = new LeaveApplyBl();

            objResult = objLeaveApplyBl.LeaveApply_Select(0, Convert.ToInt32(Session[ApplicationSession.USERID].ToString()));
            if (objResult != null)
            {
                if (objResult.resultDT.Rows.Count > 0)
                {
                    gvLeaveApprove.DataSource = objResult.resultDT;
                    gvLeaveApprove.DataBind();
                    divLeaveApprove.Visible = true;
                }
                else
                {
                    divLeaveApprove.Visible = false;
                }
            }
        }