コード例 #1
0
        //Leave Type Bind
        #region [Leave Type Bind]

        private void GrdLeaveTypeBind()
        {
            try
            {
                objEWA.Action   = "SelectLeaveData";
                objEWA.OrgId    = Convert.ToInt32(Session["OrgId"].ToString());
                objEWA.UserCode = Session["UserCode"].ToString();

                DataSet ds = objBL.LeaveBalanceGridBind_BL(objEWA);

                if (ds.Tables[0].Rows.Count > 0)
                {
                    ViewState["LeaveBalance"] = ds.Tables[0];

                    GrdLeaveType.DataSource = ds.Tables[0];
                    //GrdLeaveType.ShowHeader = false;
                    GrdLeaveType.DataBind();
                }
                else
                {
                    DataTable dt = new DataTable();

                    GrdLeaveType.DataSource = dt;
                    //GrdLeaveType.ShowHeader = false;
                    GrdLeaveType.DataBind();
                }
            }
            catch (Exception exp)
            {
                GeneralErr(exp.Message);
            }
        }
コード例 #2
0
        //Grid PageIndex Change
        #region GrdIndexChanged

        protected void GrdLeaveType_PageIndexChanging(object sender, GridViewPageEventArgs e)
        {
            try
            {
                objEWA.OrgId            = "1";
                GrdLeaveType.PageIndex  = e.NewPageIndex;
                GrdLeaveType.DataSource = objBL.LeaveTypeGridBind_BL(objEWA);
                GrdLeaveType.DataBind();
            }
            catch (Exception exp)
            {
                GeneralErr(exp.Message.ToString());
            }
        }
コード例 #3
0
        //Leave Grid Bind
        #region [Leave Grid Bind]

        private void GrdLeaveBind()
        {
            try
            {
                //EWA_LeaveType objEWA = new EWA_LeaveType();
                //objEWA.LeaveId = Convert.ToInt32(ViewState["LeaveId"].ToString());

                DataSet ds = objBL.LeaveTypeGridBind_BL(objEWA);
                GrdLeaveType.DataSource = ds;
                GrdLeaveType.DataBind();
            }
            catch (Exception exp)
            {
                GeneralErr(exp.Message.ToString());
            }
        }