protected void GetLeaveBalance(string strEmpID, string strSex)
        {
            DataTable dtLeaveBalance = objLeaveMgr.SelectEmpLeaveProfileEXCPL(strEmpID, "0", strSex);

            if (dtLeaveBalance.Rows.Count > 0)
            {
                grLeaveBalance.DataSource = dtLeaveBalance;
                grLeaveBalance.DataBind();
                this.FormatLeaveStatusGridNumber();

                this.GetLeaveHistory(strEmpID,
                                     dtLeaveBalance.Rows[0]["LeaveStartPeriod"].ToString().Trim(),
                                     dtLeaveBalance.Rows[0]["LeaveEndPeriod"].ToString().Trim());
            }
        }
Exemplo n.º 2
0
        private void FillEmpLeaveProfile(string EmpId, string Sex)
        {
            DataTable dtEmp = new DataTable();

            dtEmp.Rows.Clear();
            dtEmp.Dispose();

            dtEmp = objLeaveMgr.SelectEmpLeaveProfileEXCPL(EmpId, "0", Sex);

            if (dtEmp.Rows.Count > 0)
            {
                grLeaveStatus.DataSource = null;
                grLeaveStatus.DataBind();

                grLeaveStatus.DataSource = dtEmp;
                grLeaveStatus.DataBind();

                this.FormatLeaveStatusGridNumber();
                strStartLeavePeriod = Common.ReturnDateTimeInString(Common.DisplayDateTime(dtEmp.Rows[0]["LeaveStartPeriod"].ToString(), false, Constant.strDateFormat), false, Constant.strDateFormat);
                strEndLeavePeriod   = Common.ReturnDateTimeInString(Common.DisplayDateTime(dtEmp.Rows[0]["LeaveEndPeriod"].ToString(), false, Constant.strDateFormat), false, Constant.strDateFormat);
            }
        }