示例#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)));
        }
示例#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)));
 }
示例#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)));
 }
示例#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)));
 }
示例#5
0
 public static int GetStickedObjectsCount(int userId)
 {
     return(DbHelper2.RunSpInteger("StickedObjectsGetCount",
                                   DbHelper2.mp("@UserId", SqlDbType.Int, userId)));
 }
示例#6
0
 public static int GetCalendarByProject(int ProjectId)
 {
     return(DbHelper2.RunSpInteger("CalendarGetByProject",
                                   DbHelper2.mp("@ProjectId", SqlDbType.Int, ProjectId)));
 }
示例#7
0
 public static int GetBigIconFileId(int ContentTypeId)
 {
     return(DbHelper2.RunSpInteger("ContentTypeGetBigIconFileId",
                                   DbHelper2.mp("@ContentTypeId", SqlDbType.Int, ContentTypeId)));
 }
示例#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)));
 }
示例#9
0
 public static int GetUsersCount()
 {
     return(DbHelper2.RunSpInteger("ASP_REP_GET_TOTAL_USERS"));
 }
示例#10
0
 public static int GetGroupsCount()
 {
     return(DbHelper2.RunSpInteger("ASP_REP_GET_TOTAL_GROUPS"));
 }
示例#11
0
 public static int GetOnlineUsersCount()
 {
     return(DbHelper2.RunSpInteger("ASP_REP_GET_ONLINE_USERS_COUNT"));
 }
示例#12
0
 public static int GetInActiveUsersCount()
 {
     return(DbHelper2.RunSpInteger("ASP_REP_GET_TOTAL_INACTIVE_USERS"));
 }
示例#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)));
 }
示例#14
0
 public static int GetAclIdByReportId(int ReportId)
 {
     return(DbHelper2.RunSpInteger("fsc_ReportAccessControlEntriesGetAclIdByReportId",
                                   DbHelper2.mp("@ReportId", SqlDbType.Int, ReportId)));
 }
示例#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)));
 }
示例#16
0
 public static int CheckChildren(int GroupId)
 {
     return(DbHelper2.RunSpInteger("GroupCheckChildren",
                                   DbHelper2.mp("@GroupId", SqlDbType.Int, GroupId)));
 }
示例#17
0
 public static int GetParentAccountId(int AccountId)
 {
     return(DbHelper2.RunSpInteger("AccountGetParentId",
                                   DbHelper2.mp("@AccountId", SqlDbType.Int, AccountId)));
 }
示例#18
0
 public static int GetGroupForPartnerUser(int UserId)
 {
     return(DbHelper2.RunSpInteger("GroupGetForPartnerUser",
                                   DbHelper2.mp("@PrincipalId", SqlDbType.Int, UserId)));
 }
示例#19
0
 public static int CreateCategory(string Name)
 {
     return(DbHelper2.RunSpInteger("fsc_ReportCreateCategory",
                                   DbHelper2.mp("@Name", SqlDbType.NVarChar, 255, Name)));
 }
示例#20
0
 public static int GetParentGroup(int GroupId)
 {
     return(DbHelper2.RunSpInteger("GroupGetParent",
                                   DbHelper2.mp("@PrincipalId", SqlDbType.Int, GroupId)));
 }
示例#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)));
 }
示例#22
0
 public static int GetOwnerIncidentId(int EMailMessageId)
 {
     return(DbHelper2.RunSpInteger("mc_EMailMessageGetOwnerIssueId", DbHelper2.mp("@EMailMessageId", SqlDbType.Int, EMailMessageId)));
 }
示例#23
0
 public static int GetUserCalendarByException(int ExceptionId)
 {
     return(DbHelper2.RunSpInteger("UserCalendarByExceptionGet",
                                   DbHelper2.mp("@ExceptionId", SqlDbType.Int, ExceptionId)));
 }
示例#24
0
 public static int GetEMailRouterPop3BoxIdByIssueId(int IncidentId)
 {
     return(DbHelper2.RunSpInteger("mc_EMailMessageGetEMailRouterPop3BoxIdByIssueId", DbHelper2.mp("@IncidentId", SqlDbType.Int, IncidentId)));
 }
示例#25
0
 public static int GetManager(int eventId)
 {
     return(DbHelper2.RunSpInteger("EventManagerGet",
                                   DbHelper2.mp("@EventId", SqlDbType.Int, eventId)));
 }
示例#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)));
 }
示例#27
0
 public static int GetProject(int EventId)
 {
     return(DbHelper2.RunSpInteger("EventGetProject",
                                   DbHelper2.mp("@EventId", SqlDbType.Int, EventId)));
 }
示例#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)));
 }
示例#29
0
 public static int CheckForUnchangeableRoles(int UserId)
 {
     return(DbHelper2.RunSpInteger("EventsCheckForUnchangeableRoles",
                                   DbHelper2.mp("@UserId", SqlDbType.Int, UserId)));
 }
示例#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)));
 }