コード例 #1
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());
        }
コード例 #2
0
ファイル: ShiftMgt.aspx.cs プロジェクト: DevOps-SFDC/GPH
        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());
        }
コード例 #3
0
        public static string displayTardiness(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.getEmployeeTardiness());
                if (dummy.Rows.Count < 1)
                {
                    dummy.Rows.Add();
                }
                ds.Tables.Add(dummy);
            }
            catch (Exception ex)
            {
            }
            return(ds.GetXml());
        }
コード例 #4
0
ファイル: ShiftMgt.aspx.cs プロジェクト: DevOps-SFDC/GPH
        public static string cancelShift(List <string> _arr)
        {
            TeamMgt _team = new TeamMgt();

            _team.ShiftEmpdID = Convert.ToInt32(_arr[0].ToString());

            return(_team.cancelShift());
        }
コード例 #5
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());
        }
コード例 #6
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());
        }
コード例 #7
0
ファイル: ShiftMgt.aspx.cs プロジェクト: DevOps-SFDC/GPH
        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());
        }
コード例 #8
0
ファイル: ShiftMgt.aspx.cs プロジェクト: DevOps-SFDC/GPH
        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());
        }
コード例 #9
0
        public static string displayComplex(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());
            DataSet ds = new DataSet();

            try
            {
                dummy.Merge(_team.getEmployeeComplex());
                ds.Tables.Add(dummy);
            }
            catch (Exception ex)
            {
            }
            return(ds.GetXml());
        }
コード例 #10
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");
        }
コード例 #11
0
ファイル: ShiftMgt.aspx.cs プロジェクト: DevOps-SFDC/GPH
        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");
            }
        }