Exemple #1
0
        public static IDataReader SearchChat(int iUserId, int iChatId, DateTime dtFrom, DateTime dtTo,
                                             string sKeyWord, int iOrder, int DefaultBias)
        {
            int origUserId = 0;

            if (iUserId != 0)
            {
                origUserId = DbHelper2.RunSpInteger("UserGetOriginalId",
                                                    DbHelper2.mp("@UserId", SqlDbType.Int, iUserId));
                if (origUserId == -1)
                {
                    origUserId = 0;
                }
            }
            return(DbHelper2.RunSpDataReader("ASP_SEARCH_CHAT",
                                             DbHelper2.mp("@User_id", SqlDbType.Int, origUserId),
                                             DbHelper2.mp("@Chat_id", SqlDbType.Int, iChatId),
                                             DbHelper2.mp("@DT_Begin", SqlDbType.DateTime, dtFrom),
                                             DbHelper2.mp("@DT_End", SqlDbType.DateTime, dtTo),
                                             DbHelper2.mp("@Keyword", SqlDbType.NVarChar, 50, sKeyWord),
                                             DbHelper2.mp("@Order", SqlDbType.Int, iOrder),
                                             DbHelper2.mp("@TimeOffset", SqlDbType.Int, DefaultBias * 60)));
        }
Exemple #2
0
 public static int Create(
     object ProjectId, int CreatorId, int ManagerId,
     string Title, string Description, string Location,
     DateTime CreationDate, DateTime StartDate, DateTime FinishDate,
     int PriorityId, int TypeId, int TaskTime,
     object contactUid,
     object orgUid)
 {
     return(DbHelper2.RunSpInteger("EventCreate",
                                   DbHelper2.mp("@ProjectId", SqlDbType.Int, ProjectId),
                                   DbHelper2.mp("@CreatorId", SqlDbType.Int, CreatorId),
                                   DbHelper2.mp("@ManagerId", SqlDbType.Int, ManagerId),
                                   DbHelper2.mp("@Title", SqlDbType.NVarChar, 255, Title),
                                   DbHelper2.mp("@Description", SqlDbType.NText, Description),
                                   DbHelper2.mp("@Location", SqlDbType.NVarChar, 1000, Location),
                                   DbHelper2.mp("@CreationDate", SqlDbType.DateTime, CreationDate),
                                   DbHelper2.mp("@StartDate", SqlDbType.DateTime, StartDate),
                                   DbHelper2.mp("@FinishDate", SqlDbType.DateTime, FinishDate),
                                   DbHelper2.mp("@PriorityId", SqlDbType.Int, PriorityId),
                                   DbHelper2.mp("@TypeId", SqlDbType.Int, TypeId),
                                   DbHelper2.mp("@TaskTime", SqlDbType.Int, TaskTime),
                                   DbHelper2.mp("@ContactUid", SqlDbType.UniqueIdentifier, contactUid),
                                   DbHelper2.mp("@OrgUid", SqlDbType.UniqueIdentifier, orgUid)));
 }
Exemple #3
0
 public static int UpdateManager(int documentId, int valueId)
 {
     return(DbHelper2.RunSpInteger("Act_DocumentUpdateManager",
                                   DbHelper2.mp("@DocumentId", SqlDbType.Int, documentId),
                                   DbHelper2.mp("@ValueId", SqlDbType.Int, valueId)));
 }
Exemple #4
0
 public static int GetSharingLevel(int UserId, int EventId)
 {
     return(DbHelper2.RunSpInteger("SharingGetLevelForEvent",
                                   DbHelper2.mp("@UserId", SqlDbType.Int, UserId),
                                   DbHelper2.mp("@EventId", SqlDbType.Int, EventId)));
 }
Exemple #5
0
 public static int GetStickedObjectsCount(int userId)
 {
     return(DbHelper2.RunSpInteger("StickedObjectsGetCount",
                                   DbHelper2.mp("@UserId", SqlDbType.Int, userId)));
 }
Exemple #6
0
 public static int GetCalendarByProject(int ProjectId)
 {
     return(DbHelper2.RunSpInteger("CalendarGetByProject",
                                   DbHelper2.mp("@ProjectId", SqlDbType.Int, ProjectId)));
 }
Exemple #7
0
 public static int GetBigIconFileId(int ContentTypeId)
 {
     return(DbHelper2.RunSpInteger("ContentTypeGetBigIconFileId",
                                   DbHelper2.mp("@ContentTypeId", SqlDbType.Int, ContentTypeId)));
 }
Exemple #8
0
 public static int Create(string ContainerKey, string Name)
 {
     return(DbHelper2.RunSpInteger("fsc_ReportCreate",
                                   DbHelper2.mp("@ContainerKey", SqlDbType.NVarChar, 50, ContainerKey),
                                   DbHelper2.mp("@ReportName", SqlDbType.NVarChar, 255, Name)));
 }
Exemple #9
0
 public static int GetUsersCount()
 {
     return(DbHelper2.RunSpInteger("ASP_REP_GET_TOTAL_USERS"));
 }
Exemple #10
0
 public static int GetGroupsCount()
 {
     return(DbHelper2.RunSpInteger("ASP_REP_GET_TOTAL_GROUPS"));
 }
Exemple #11
0
 public static int GetOnlineUsersCount()
 {
     return(DbHelper2.RunSpInteger("ASP_REP_GET_ONLINE_USERS_COUNT"));
 }
Exemple #12
0
 public static int GetInActiveUsersCount()
 {
     return(DbHelper2.RunSpInteger("ASP_REP_GET_TOTAL_INACTIVE_USERS"));
 }
Exemple #13
0
 public static int MessageLogAdd(string subject, string body)
 {
     return(DbHelper2.RunSpInteger("Alert2MessageLogAdd",
                                   DbHelper2.mp("@Subject", SqlDbType.NVarChar, 1000, subject),
                                   DbHelper2.mp("@Body", SqlDbType.NText, body)));
 }
Exemple #14
0
 public static int GetAclIdByReportId(int ReportId)
 {
     return(DbHelper2.RunSpInteger("fsc_ReportAccessControlEntriesGetAclIdByReportId",
                                   DbHelper2.mp("@ReportId", SqlDbType.Int, ReportId)));
 }
Exemple #15
0
 /// <summary>
 /// Gets the security for user.
 /// </summary>
 /// <param name="ListId">The list id.</param>
 /// <param name="UserId">The user id.</param>
 /// <returns></returns>
 public static int GetSecurityForUser(int ListId, int UserId)
 {
     return(DbHelper2.RunSpInteger("ListInfoGetSecurityForUser",
                                   DbHelper2.mp("@ListId", SqlDbType.Int, ListId),
                                   DbHelper2.mp("@UserId", SqlDbType.Int, UserId)));
 }
Exemple #16
0
 public static int CheckChildren(int GroupId)
 {
     return(DbHelper2.RunSpInteger("GroupCheckChildren",
                                   DbHelper2.mp("@GroupId", SqlDbType.Int, GroupId)));
 }
Exemple #17
0
 public static int GetParentAccountId(int AccountId)
 {
     return(DbHelper2.RunSpInteger("AccountGetParentId",
                                   DbHelper2.mp("@AccountId", SqlDbType.Int, AccountId)));
 }
Exemple #18
0
 public static int GetGroupForPartnerUser(int UserId)
 {
     return(DbHelper2.RunSpInteger("GroupGetForPartnerUser",
                                   DbHelper2.mp("@PrincipalId", SqlDbType.Int, UserId)));
 }
Exemple #19
0
 public static int CreateCategory(string Name)
 {
     return(DbHelper2.RunSpInteger("fsc_ReportCreateCategory",
                                   DbHelper2.mp("@Name", SqlDbType.NVarChar, 255, Name)));
 }
Exemple #20
0
 public static int GetParentGroup(int GroupId)
 {
     return(DbHelper2.RunSpInteger("GroupGetParent",
                                   DbHelper2.mp("@PrincipalId", SqlDbType.Int, GroupId)));
 }
Exemple #21
0
 public static int Create(string CalendarName, int TimeZoneId)
 {
     return(DbHelper2.RunSpInteger("CalendarCreate",
                                   DbHelper2.mp("@CalendarName", SqlDbType.NVarChar, 250, CalendarName),
                                   DbHelper2.mp("@TimeZoneId", SqlDbType.Int, TimeZoneId)));
 }
Exemple #22
0
 public static int GetOwnerIncidentId(int EMailMessageId)
 {
     return(DbHelper2.RunSpInteger("mc_EMailMessageGetOwnerIssueId", DbHelper2.mp("@EMailMessageId", SqlDbType.Int, EMailMessageId)));
 }
Exemple #23
0
 public static int GetUserCalendarByException(int ExceptionId)
 {
     return(DbHelper2.RunSpInteger("UserCalendarByExceptionGet",
                                   DbHelper2.mp("@ExceptionId", SqlDbType.Int, ExceptionId)));
 }
Exemple #24
0
 public static int GetEMailRouterPop3BoxIdByIssueId(int IncidentId)
 {
     return(DbHelper2.RunSpInteger("mc_EMailMessageGetEMailRouterPop3BoxIdByIssueId", DbHelper2.mp("@IncidentId", SqlDbType.Int, IncidentId)));
 }
Exemple #25
0
 public static int GetManager(int eventId)
 {
     return(DbHelper2.RunSpInteger("EventManagerGet",
                                   DbHelper2.mp("@EventId", SqlDbType.Int, eventId)));
 }
Exemple #26
0
 public static int LocalAddressRangeAdd(string startAddress, string endAddress)
 {
     return(DbHelper2.RunSpInteger("LocalAddressRangeAdd",
                                   DbHelper2.mp("@StartAddress", SqlDbType.NVarChar, 32, startAddress),
                                   DbHelper2.mp("@EndAddress", SqlDbType.NVarChar, 32, endAddress)));
 }
Exemple #27
0
 public static int GetProject(int EventId)
 {
     return(DbHelper2.RunSpInteger("EventGetProject",
                                   DbHelper2.mp("@EventId", SqlDbType.Int, EventId)));
 }
Exemple #28
0
 public static int UpdatePriority(int eventId, int valueId)
 {
     return(DbHelper2.RunSpInteger("Act_EventUpdatePriority",
                                   DbHelper2.mp("@EventId", SqlDbType.Int, eventId),
                                   DbHelper2.mp("@ValueId", SqlDbType.Int, valueId)));
 }
Exemple #29
0
 public static int CheckForUnchangeableRoles(int UserId)
 {
     return(DbHelper2.RunSpInteger("EventsCheckForUnchangeableRoles",
                                   DbHelper2.mp("@UserId", SqlDbType.Int, UserId)));
 }
Exemple #30
0
 public static int UpdateTimeline(int documentId, int taskTime)
 {
     return(DbHelper2.RunSpInteger("Act_DocumentUpdateTimeline",
                                   DbHelper2.mp("@documentId", SqlDbType.Int, documentId),
                                   DbHelper2.mp("@taskTime", SqlDbType.Int, taskTime)));
 }