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()); }
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()); }
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()); }
public static string cancelShift(List <string> _arr) { TeamMgt _team = new TeamMgt(); _team.ShiftEmpdID = Convert.ToInt32(_arr[0].ToString()); return(_team.cancelShift()); }
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()); }
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()); }
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()); }
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()); }
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()); }
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"); }
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"); } }