コード例 #1
0
        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 });
        }
コード例 #2
0
        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 }));
        }
コード例 #3
0
        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 }));
        }
コード例 #4
0
        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) }));
        }
コード例 #5
0
ファイル: Companies.cs プロジェクト: evgeniynet/APIBeta
        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));
        }
コード例 #6
0
        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));
        }
コード例 #7
0
ファイル: Locations.cs プロジェクト: evgeniynet/APIBeta
 public static DataTable SelectTree(int DeptID, int AccID, int ParentId, InactiveStatus inactiveStatus)
 {
     return SelectTree(DeptID, AccID, ParentId, string.Empty, inactiveStatus);
 }
コード例 #8
0
ファイル: Locations.cs プロジェクト: evgeniynet/APIBeta
        //********** 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
                });
        }
コード例 #9
0
ファイル: Classes.cs プロジェクト: evgeniynet/APIBeta
 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);
 }
コード例 #10
0
ファイル: Classes.cs プロジェクト: evgeniynet/APIBeta
 public static DataTable SelectByInactiveStatus(int DeptID, int UserID, InactiveStatus inactiveStatus, int ParentId)
 {
     return SelectByInactiveStatus(Guid.Empty, DeptID, UserID, inactiveStatus, ParentId);
 }
コード例 #11
0
ファイル: Classes.cs プロジェクト: evgeniynet/APIBeta
 public static DataTable SelectByInactiveStatus(Guid OrgId, int DeptID, int UserID, InactiveStatus inactiveStatus)
 {
     return SelectByInactiveStatus(OrgId, DeptID, UserID, inactiveStatus, -1);
 }
コード例 #12
0
ファイル: Classes.cs プロジェクト: evgeniynet/APIBeta
 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);
 }
コード例 #13
0
 public static DataTable SelectByInactiveStatus(int DeptID, InactiveStatus inactiveStatus, int ParentId)
 {
     return(SelectByInactiveStatus(Guid.Empty, DeptID, inactiveStatus, ParentId));
 }
コード例 #14
0
 public static DataTable SelectByInactiveStatus(int DeptID, int UserID, InactiveStatus inactiveStatus)
 {
     return(SelectByInactiveStatus(Guid.Empty, DeptID, UserID, inactiveStatus, -1));
 }
コード例 #15
0
ファイル: Companies.cs プロジェクト: evgeniynet/APIBeta
 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);
 }
コード例 #16
0
        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) });
        }
コード例 #17
0
 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));
 }
コード例 #18
0
ファイル: Locations.cs プロジェクト: evgeniynet/APIBeta
        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 });
            }
        }
コード例 #19
0
ファイル: Classes.cs プロジェクト: evgeniynet/APIBeta
 public static DataTable SelectByInactiveStatus(int DeptID, InactiveStatus inactiveStatus)
 {
     return SelectByInactiveStatus(Guid.Empty ,DeptID, inactiveStatus, -1);
 }
コード例 #20
0
ファイル: Accounts.cs プロジェクト: evgeniynet/APIBeta
 public static DataTable SelectUsers(int DeptID, int AccountID, string Search, InactiveStatus inactiveStatus)
 {
     return SelectUsers(DeptID, AccountID, Search, inactiveStatus, 0);
 }
コード例 #21
0
 public static DataTable SelectByInactiveStatus(Guid OrgId, int DeptID, InactiveStatus inactiveStatus)
 {
     return(SelectByInactiveStatus(OrgId, DeptID, inactiveStatus, -1));
 }
コード例 #22
0
ファイル: Accounts.cs プロジェクト: evgeniynet/APIBeta
        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 });
        }
コード例 #23
0
 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 });
 }