Example #1
0
        public static string cancelShift(List<string> _arr)
        {
            TeamMgt _team = new TeamMgt();
            _team.ShiftEmpdID = Convert.ToInt32(_arr[0].ToString());

            return _team.cancelShift();
        }
Example #2
0
        public static string cancelLeaves(List<string> _arr)
        {
            TeamMgt _team = new TeamMgt();
            _team.LeaveID = Convert.ToInt32(_arr[0].ToString());
            _team.EmployeeID = Convert.ToInt32(_arr[1].ToString());

            return _team.cancelLeaves();
        }
Example #3
0
        public static string getTeamStaff(List<string> _arr)
        {
            DataTable dummy = new DataTable();

            TeamMgt _team = new TeamMgt();
            _team.TeamID = Convert.ToInt32(_arr[0].ToString());

            DataSet ds = new DataSet();
            try
            {
                dummy.Merge(_team.displayTeamStaff().Tables[0]);
                ds.Tables.Add(dummy);
            }
            catch (Exception ex)
            {

            }
            return ds.GetXml();
        }
Example #4
0
        public static string displayAIXport(List<string> _arr)
        {
            DataTable dummy = new DataTable();

            TeamMgt _team = new TeamMgt();
            _team.MonthYear = Convert.ToDateTime(_arr[0].ToString());
            _team.TeamID = Convert.ToInt32(_arr[1].ToString());
            DataSet ds = new DataSet();
            try
            {
                AttendanceMgt _atmgt = new AttendanceMgt();
                _atmgt.Session["xport"] = _team.getAIExport();
                string x = string.Concat("Attendance-Incentive-", _arr[2].Replace(" ", ""));
                _atmgt.Session["xportfilename"] = x;
            }
            catch (Exception ex)
            {

            }
            return "RAWR";
        }
Example #5
0
        public static string getEmployeeShift(List<string> _arr)
        {
            DataTable dummy = new DataTable();
            dummy.Columns.Add("StartDate", typeof(DateTime));
            dummy.Columns.Add("EndDate", typeof(DateTime));
            dummy.Columns.Add("DayShift");
            dummy.Columns.Add("Shift");
            //dummy.Rows.Add();

            TeamMgt _team = new TeamMgt();
            _team.TeamEmpID = Convert.ToInt32(_arr[0].ToString());
            _team.ShiftStartDate = Convert.ToDateTime(_arr[1].ToString());
            if (!_arr[2].ToString().Equals(string.Empty) || !_arr[2].ToString().Equals(""))
            {
                _team.ShiftEndDate = Convert.ToDateTime(_arr[2].ToString());
            }
            DataSet ds = new DataSet();
            try
            {
                dummy.Merge(_team.getEmployeeShift());
                ds.Tables.Add(dummy);
            }
            catch (Exception ex)
            {

            }
            //return ds.GetXml();
            if (ds.Tables[0].Rows.Count < 1)
            {
                return "0";
            }
            else
            {
                return "1";
            }
        }
Example #6
0
        public static string displayAIQualify(List<string> _arr)
        {
            DataTable dummy = new DataTable();

            TeamMgt _team = new TeamMgt();
            _team.EmployeeID = Convert.ToInt32(_arr[0].ToString());
            _team.MonthYear = Convert.ToDateTime(_arr[1].ToString());
            _team.TeamID = Convert.ToInt32(_arr[2].ToString());
            DataSet ds = new DataSet();
            try
            {
                dummy.Merge(_team.getEmployeeAIQualify());
                if (dummy.Rows.Count < 1)
                {
                    dummy.Rows.Add();
                }
                ds.Tables.Add(dummy);
            }
            catch (Exception ex)
            {

            }
            return ds.GetXml();
        }
Example #7
0
        public static string saveNewShift(List<string> _arr)
        {
            TeamMgt _team = new TeamMgt();
            _team.TeamEmpID = Convert.ToInt32(_arr[0].ToString());

            int n;
            if (int.TryParse(_arr[1].ToString(), out n)) { _team.ShiftID = Convert.ToInt32(_arr[1].ToString()); }

            _team.DayShiftID = Convert.ToInt32(_arr[2].ToString());
            _team.ShiftStartDate = Convert.ToDateTime(_arr[3].ToString());
            if (!_arr[4].ToString().Equals(string.Empty) || !_arr[4].ToString().Equals(""))
            {
                _team.ShiftEndDate = Convert.ToDateTime(_arr[4].ToString());
            }
            _team.EmployeeID = Convert.ToInt32(_arr[5].ToString());
            if (!string.IsNullOrEmpty(_arr[6].ToString()) || !_arr[6].ToString().Equals(string.Empty) || !_arr[6].ToString().Equals(""))
            {
                _team.CustomStart = Convert.ToDateTime(_arr[6].ToString());
            }
            if (!string.IsNullOrEmpty(_arr[7].ToString()) || !_arr[7].ToString().Equals(string.Empty) || !_arr[7].ToString().Equals(""))
            {
                _team.CustomEnd = Convert.ToDateTime(_arr[7].ToString());
            }
            return _team.insertNewShift();
        }
Example #8
0
        public static string test1(Int32 teamempid)
        {
            DataTable dummy = new DataTable();

            TeamMgt _team = new TeamMgt();
            _team.TeamEmpID = teamempid;
            DataSet ds = new DataSet();
            try
            {
                dummy.Merge(_team.displayEmployeeShift());
                ds.Tables.Add(dummy);
            }
            catch (Exception ex)
            {

            }
            return ds.GetXml();
        }
Example #9
0
        public static string displayAttendance(List<string> _arr)
        {
            DataTable dummy = new DataTable();
            //dummy.Columns.Add("Date", typeof(DateTime));
            //dummy.Columns.Add("Day", typeof(String));
            //dummy.Columns.Add("Present", typeof(Decimal));
            //dummy.Columns.Add("SL", typeof(Decimal));
            //dummy.Columns.Add("EL", typeof(Decimal));

            TeamMgt _team = new TeamMgt();
            _team.EmployeeID = Convert.ToInt32(_arr[0].ToString());
            _team.MonthYear = Convert.ToDateTime(_arr[1].ToString());
            DataSet ds = new DataSet();
            try
            {
                dummy.Merge(_team.getEmployeeAttendance());
                if (dummy.Rows.Count < 1)
                {
                    dummy.Rows.Add();
                }
                ds.Tables.Add(dummy);
            }
            catch (Exception ex)
            {

            }
            return ds.GetXml();
        }
Example #10
0
        public static string saveLeaves(List<string> _arr)
        {
            TeamMgt _team = new TeamMgt();
            _team.TeamEmpID = Convert.ToInt32(_arr[0].ToString());
            _team.LeaveType = _arr[1].ToString();
            _team.LeaveDate = Convert.ToDateTime(_arr[2].ToString());
            _team.LeaveVolume = Convert.ToDecimal(_arr[3].ToString());
            _team.LeaveReason = _arr[4].ToString();
            _team.EmployeeID = Convert.ToInt32(_arr[5].ToString());

            return _team.insertLeaves();
        }
Example #11
0
        public static string displayLeaves(List<string> _arr)
        {
            DataTable dummy = new DataTable();

            TeamMgt _team = new TeamMgt();
            _team.TeamID = Convert.ToInt32(_arr[0].ToString());
            _team.LeaveDate = Convert.ToDateTime(_arr[1].ToString());
            DataSet ds = new DataSet();
            try
            {
                dummy.Merge(_team.getEmployeeLeaves());
                ds.Tables.Add(dummy);
            }
            catch (Exception ex)
            {

            }
            return ds.GetXml();
        }