Exemplo n.º 1
0
        private void FillEmpLeaveDetails(string EmpId)
        {
            DataTable dtEmpLvDtls = new DataTable();

            dtEmpLvDtls.Rows.Clear();
            dtEmpLvDtls.Dispose();

            dtEmpLvDtls = objLeaveMgr.SelectEmpLeaveDetails(EmpId, strStartLeavePeriod, strEndLeavePeriod);

            if (dtEmpLvDtls.Rows.Count > 0)
            {
                grLeaveDtls.DataSource = null;
                grLeaveDtls.DataBind();

                grLeaveDtls.DataSource = dtEmpLvDtls;
                grLeaveDtls.DataBind();
                this.FormatLeaveDetailsGridNumber();
            }
        }
        protected void GetLeaveHistory(string strEmpID, string strLvStartPeriod, string strLvEndPeriod)
        {
            lblLvStartPeriod.Text = Common.DisplayDateTime(strLvStartPeriod, false, Constant.strDateFormat);
            lblLvEndPeriod.Text   = Common.DisplayDateTime(strLvEndPeriod, false, Constant.strDateFormat);

            //strLvStartPeriod = Common.DisplayDateTime(strLvStartPeriod, false, Constant.strDateFormat);
            //strLvEndPeriod = Common.DisplayDateTime(strLvEndPeriod, false, Constant.strDateFormat);


            DataTable dtLeaveHistory = objLeaveMgr.SelectEmpLeaveDetails(strEmpID, strLvStartPeriod, strLvEndPeriod);

            if (dtLeaveHistory.Rows.Count > 0)
            {
                grLeaveHistory.DataSource = null;
                grLeaveHistory.DataBind();


                grLeaveHistory.DataSource = dtLeaveHistory;
                grLeaveHistory.DataBind();
                this.FormatLeaveDetailsGridNumber();
            }
        }