public static DataTable SelectByInactiveStatus(int DeptID, InactiveStatus inactiveStatus) { SqlParameter _pInactive = new SqlParameter("@btInactive", SqlDbType.Bit); if (inactiveStatus == InactiveStatus.DoesntMatter) _pInactive.Value = DBNull.Value; else _pInactive.Value = inactiveStatus; return SelectRecords("sp_SelectCategories", new SqlParameter[] { new SqlParameter("@DId", DeptID), new SqlParameter("@Id", DBNull.Value), _pInactive }); }
public static DataTable SelectByInactiveStatusAndResolved(int DeptID, InactiveStatus inactiveStatus, bool isResolved) { SqlParameter _pInactive = new SqlParameter("@btInactive", SqlDbType.Bit); if (inactiveStatus == InactiveStatus.DoesntMatter) { _pInactive.Value = DBNull.Value; } else { _pInactive.Value = inactiveStatus; } return(SelectRecords("sp_SelectResolutions", new SqlParameter[] { new SqlParameter("@DId", DeptID), new SqlParameter("@btResolved", isResolved), _pInactive })); }
public static DataTable SelectByInactiveStatus(int DeptID, InactiveStatus inactiveStatus) { SqlParameter _pInactive = new SqlParameter("@btInactive", SqlDbType.Bit); if (inactiveStatus == InactiveStatus.DoesntMatter) { _pInactive.Value = DBNull.Value; } else { _pInactive.Value = inactiveStatus; } return(SelectRecords("sp_SelectCategories", new SqlParameter[] { new SqlParameter("@DId", DeptID), new SqlParameter("@Id", DBNull.Value), _pInactive })); }
public static DataTable SelectByUser(int DeptID, int UserID, InactiveStatus inactiveStatus) { SqlParameter _pInactive = new SqlParameter("@btInactive", SqlDbType.Bit); if (inactiveStatus == InactiveStatus.DoesntMatter) { _pInactive.Value = DBNull.Value; } else { _pInactive.Value = inactiveStatus; } return(SelectRecords("sp_SelectNotificationRules", new SqlParameter[] { new SqlParameter("@DId", DeptID), new SqlParameter("@Id", SqlDbType.Int), _pInactive, new SqlParameter("@UserId", UserID) })); }
public static DataTable SelectTechsHourlyRates(int DepartmentId, InactiveStatus TechStatus) { SqlParameter[] _params = new SqlParameter[2]; _params[0] = new SqlParameter("@DepartmentId", DepartmentId); _params[1] = new SqlParameter("@Inactive", SqlDbType.Bit); switch (TechStatus) { case InactiveStatus.DoesntMatter: _params[1].Value = DBNull.Value; break; case InactiveStatus.Active: _params[1].Value = 0; break; case InactiveStatus.Inactive: _params[1].Value = 1; break; } return(SelectRecords("sp_SelectTechsHourlyRates", _params)); }
public static DataTable SelectByInactiveStatus(Guid OrgId, int DeptID, InactiveStatus inactiveStatus, int ParentId) { SqlParameter _pInactive = new SqlParameter("@btInactive", SqlDbType.Bit); if (inactiveStatus == InactiveStatus.DoesntMatter) { _pInactive.Value = DBNull.Value; } else { _pInactive.Value = inactiveStatus; } SqlParameter _pParentId = new SqlParameter("@ParentId", SqlDbType.Int); if (ParentId == -1) { _pParentId.Value = DBNull.Value; } else { _pParentId.Value = ParentId; } return(SelectRecords("sp_SelectClassList", new SqlParameter[] { new SqlParameter("@DId", DeptID), _pInactive, _pParentId }, OrgId)); }
public static DataTable SelectTree(int DeptID, int AccID, int ParentId, InactiveStatus inactiveStatus) { return SelectTree(DeptID, AccID, ParentId, string.Empty, inactiveStatus); }
//********** Location tab and Audit wizard public static DataTable SelectLocationsWithTicketCount(int DeptID, int AccID, int ParentId, string Search, InactiveStatus inactiveStatus) { SqlParameter pInactiveStatus = new SqlParameter("@Inactive", SqlDbType.Bit); if (inactiveStatus == InactiveStatus.DoesntMatter) pInactiveStatus.Value = DBNull.Value; else pInactiveStatus.Value = (inactiveStatus == InactiveStatus.Inactive) ? true : false; SqlParameter pSearch = new SqlParameter("@Search", SqlDbType.NVarChar); if (!String.IsNullOrEmpty(Search)) pSearch.Value = "%" + Search + "%"; else pSearch.Value = DBNull.Value; return SelectRecords("sp_SelectLocationsWithTicketCount", new SqlParameter[] { new SqlParameter("@DId", DeptID), new SqlParameter("@Id", DBNull.Value), new SqlParameter("@AccId", AccID), // 0 - NULL = Internal Account, -1 = Internal Location new SqlParameter("@ParentId", ParentId), // 0 - top, NULL - all pSearch, pInactiveStatus }); }
public static DataTable SelectByInactiveStatus(Guid OrgId, int DeptID, int UserID, InactiveStatus inactiveStatus, int ParentId) { return PostFilter(GlobalFilters.SetFilter(OrgId, DeptID, UserID, SelectByInactiveStatus(OrgId, DeptID, inactiveStatus, ParentId), "id", GlobalFilters.FilterType.Classes), ParentId); }
public static DataTable SelectByInactiveStatus(int DeptID, int UserID, InactiveStatus inactiveStatus, int ParentId) { return SelectByInactiveStatus(Guid.Empty, DeptID, UserID, inactiveStatus, ParentId); }
public static DataTable SelectByInactiveStatus(Guid OrgId, int DeptID, int UserID, InactiveStatus inactiveStatus) { return SelectByInactiveStatus(OrgId, DeptID, UserID, inactiveStatus, -1); }
public static DataTable SelectByInactiveStatus(Guid OrgId, int DeptID, InactiveStatus inactiveStatus, int ParentId) { SqlParameter _pInactive = new SqlParameter("@btInactive", SqlDbType.Bit); if (inactiveStatus == InactiveStatus.DoesntMatter) _pInactive.Value = DBNull.Value; else _pInactive.Value = inactiveStatus; SqlParameter _pParentId = new SqlParameter("@ParentId", SqlDbType.Int); if (ParentId == -1) _pParentId.Value = DBNull.Value; else _pParentId.Value = ParentId; return SelectRecords("sp_SelectClassList", new SqlParameter[] { new SqlParameter("@DId", DeptID), _pInactive, _pParentId }, OrgId); }
public static DataTable SelectByInactiveStatus(int DeptID, InactiveStatus inactiveStatus, int ParentId) { return(SelectByInactiveStatus(Guid.Empty, DeptID, inactiveStatus, ParentId)); }
public static DataTable SelectByInactiveStatus(int DeptID, int UserID, InactiveStatus inactiveStatus) { return(SelectByInactiveStatus(Guid.Empty, DeptID, UserID, inactiveStatus, -1)); }
public static DataTable SelectTechsHourlyRates(int DepartmentId, InactiveStatus TechStatus) { SqlParameter[] _params = new SqlParameter[2]; _params[0] = new SqlParameter("@DepartmentId", DepartmentId); _params[1] = new SqlParameter("@Inactive", SqlDbType.Bit); switch (TechStatus) { case InactiveStatus.DoesntMatter: _params[1].Value = DBNull.Value; break; case InactiveStatus.Active: _params[1].Value = 0; break; case InactiveStatus.Inactive: _params[1].Value = 1; break; } return SelectRecords("sp_SelectTechsHourlyRates", _params); }
public static DataTable SelectByUser(int DeptID, int UserID, InactiveStatus inactiveStatus) { SqlParameter _pInactive = new SqlParameter("@btInactive", SqlDbType.Bit); if (inactiveStatus == InactiveStatus.DoesntMatter) _pInactive.Value = DBNull.Value; else _pInactive.Value = inactiveStatus; return SelectRecords("sp_SelectNotificationRules", new SqlParameter[] { new SqlParameter("@DId", DeptID), new SqlParameter("@Id", SqlDbType.Int), _pInactive, new SqlParameter("@UserId", UserID) }); }
public static DataTable SelectByInactiveStatus(Guid OrgId, int DeptID, int UserID, InactiveStatus inactiveStatus, int ParentId) { return(PostFilter(GlobalFilters.SetFilter(OrgId, DeptID, UserID, SelectByInactiveStatus(OrgId, DeptID, inactiveStatus, ParentId), "id", GlobalFilters.FilterType.Classes), ParentId)); }
public static DataTable SelectTree(int DeptID, int AccID, int ParentId, string Search, InactiveStatus inactiveStatus) { SqlParameter _pParentId = new SqlParameter("@ParentId", SqlDbType.Int); if (ParentId < 0) _pParentId.Value = DBNull.Value; else _pParentId.Value = ParentId; SqlParameter pInactiveStatus = new SqlParameter("@Inactive", SqlDbType.Bit); if (inactiveStatus == InactiveStatus.DoesntMatter) pInactiveStatus.Value = DBNull.Value; else pInactiveStatus.Value = (inactiveStatus == InactiveStatus.Inactive) ? true : false; if (Search.Length > 0) { if (AccID < 0) AccID = 0; return SelectRecords("sp_SelectLocationsSearch", new SqlParameter[] { new SqlParameter("@DId", DeptID), _pParentId, new SqlParameter("@AccId", AccID), new SqlParameter("@Search", "%" + Search + "%"), pInactiveStatus }); } else { SqlParameter _pId = new SqlParameter("@Id", SqlDbType.Int); _pId.Value = DBNull.Value; return SelectRecords("sp_SelectLocationsTree", new SqlParameter[] { new SqlParameter("@DId", DeptID), _pId, new SqlParameter("@AccId", AccID), _pParentId, pInactiveStatus }); } }
public static DataTable SelectByInactiveStatus(int DeptID, InactiveStatus inactiveStatus) { return SelectByInactiveStatus(Guid.Empty ,DeptID, inactiveStatus, -1); }
public static DataTable SelectUsers(int DeptID, int AccountID, string Search, InactiveStatus inactiveStatus) { return SelectUsers(DeptID, AccountID, Search, inactiveStatus, 0); }
public static DataTable SelectByInactiveStatus(Guid OrgId, int DeptID, InactiveStatus inactiveStatus) { return(SelectByInactiveStatus(OrgId, DeptID, inactiveStatus, -1)); }
public static DataTable SelectUsers(int DeptID, int AccountID, string Search, InactiveStatus inactiveStatus, int MaxCount) { SqlParameter _pSearch = new SqlParameter("@strSearch", SqlDbType.NVarChar, 25); SqlParameter _pInactive = new SqlParameter("@btInactive", SqlDbType.Bit); SqlParameter _pMaxCount = new SqlParameter("@Top", SqlDbType.Int); if (MaxCount > 0) _pMaxCount.Value = MaxCount; else _pMaxCount.Value = DBNull.Value; if (!string.IsNullOrEmpty(Search)) _pSearch.Value = Search; else _pSearch.Value = DBNull.Value; if (inactiveStatus == InactiveStatus.DoesntMatter) _pInactive.Value = DBNull.Value; else _pInactive.Value = inactiveStatus; return SelectRecords("sp_SelectAcctUsers", new SqlParameter[] { new SqlParameter("@DId", DeptID), new SqlParameter("@Id", AccountID), _pSearch, _pInactive, _pMaxCount }); }
public static DataTable SelectByInactiveStatusAndResolved(int DeptID, InactiveStatus inactiveStatus, bool isResolved) { SqlParameter _pInactive = new SqlParameter("@btInactive", SqlDbType.Bit); if (inactiveStatus == InactiveStatus.DoesntMatter) _pInactive.Value = DBNull.Value; else _pInactive.Value = inactiveStatus; return SelectRecords("sp_SelectResolutions", new SqlParameter[] { new SqlParameter("@DId", DeptID), new SqlParameter("@btResolved", isResolved), _pInactive }); }