public static void DeleteReminderSubscriptionPersonalForObject(int DateTypeId, int UserId, int ObjectId) { DbHelper2.RunSp("ReminderSubscribtionDeletePersonalForObject", DbHelper2.mp("@DateTypeId", SqlDbType.Int, DateTypeId), DbHelper2.mp("@UserId", SqlDbType.Int, UserId), DbHelper2.mp("@ObjectId", SqlDbType.Int, ObjectId)); }
/// <summary> /// Reader returns fields: /// EventId, StartDate, FinishDate /// </summary> /// <returns></returns> public static IDataReader GetEventDates(int EventId, int TimeZoneId) { return(DbHelper2.RunSpDataReader( TimeZoneId, new string[] { "StartDate", "FinishDate" }, "EventGetDates", DbHelper2.mp("@EventId", SqlDbType.Int, EventId))); }
public static int SettingsCreateUpdate( int LdapId , string Title , string Domain , string Username , string Password , string Filter , string IbnKey , string LdapKey , bool Activate , bool Deactivate , bool Autosync , DateTime AutosyncStart , int AutosyncInterval ) { return(DbHelper2.RunSpInteger("LdapSettingsCreateUpdate" , DbHelper2.mp("@LdapId", SqlDbType.Int, LdapId) , DbHelper2.mp("@Title", SqlDbType.NVarChar, 255, Title) , DbHelper2.mp("@Domain", SqlDbType.NVarChar, 255, Domain) , DbHelper2.mp("@Username", SqlDbType.NVarChar, 255, Username) , DbHelper2.mp("@Password", SqlDbType.NVarChar, 255, Password) , DbHelper2.mp("@Filter", SqlDbType.NVarChar, 255, Filter) , DbHelper2.mp("@IbnKey", SqlDbType.NVarChar, 255, IbnKey) , DbHelper2.mp("@LdapKey", SqlDbType.NVarChar, 255, LdapKey) , DbHelper2.mp("@Activate", SqlDbType.Bit, Activate) , DbHelper2.mp("@Deactivate", SqlDbType.Bit, Deactivate) , DbHelper2.mp("@Autosync", SqlDbType.Bit, Autosync) , DbHelper2.mp("@AutosyncStart", SqlDbType.DateTime, AutosyncStart) , DbHelper2.mp("@AutosyncInterval", SqlDbType.Int, AutosyncInterval) )); }
/// <summary> /// Reader returns fields: /// EventId, Title, Location, TypeId, StartDate, FinishDate, /// Description, StateId /// </summary> /// <returns></returns> public static IDataReader GetListEventsForUser(int UserId, int TimeZoneId) { return(DbHelper2.RunSpDataReader( TimeZoneId, new string[] { "StartDate", "FinishDate" }, "EventsGetForUser", DbHelper2.mp("@UserId", SqlDbType.Int, UserId))); }
/// <summary> /// OldState, NewState /// </summary> /// <returns></returns> public static IDataReader RecalculateState(int EventId, DateTime DT) { return(DbHelper2.RunSpDataReader("EventRecalculateState", DbHelper2.mp("@EventId", SqlDbType.Int, EventId), DbHelper2.mp("@DateNow", SqlDbType.DateTime, DT) )); }
/* * ProjectGroupsGet * [ProjectGroupId], [Title], [Description], [CreationDate], [CreatorId] */ public static IDataReader GetProjectGroup(int ProjectGroupId, int TimeZoneId) { return(DbHelper2.RunSpDataReader( TimeZoneId, new string[] { "CreationDate" }, "ProjectGroupGet", DbHelper2.mp("@ProjectGroupId", SqlDbType.Int, ProjectGroupId))); }
public static void AddResource(int EventId, int PrincipalId, bool MustBeConfirmed) { DbHelper2.RunSp("EventResourceAdd", DbHelper2.mp("@EventId", SqlDbType.Int, EventId), DbHelper2.mp("@PrincipalId", SqlDbType.Int, PrincipalId), DbHelper2.mp("@MustBeConfirmed", SqlDbType.Bit, MustBeConfirmed)); }
public static void UpdateOutlineLevelAndNumber(int AccountId, int OutlineLevel, string OutlineNumber) { DbHelper2.RunSp("AccountUpdateOutlineLevelAndNumber", DbHelper2.mp("@AccountId", SqlDbType.Int, AccountId), DbHelper2.mp("@OutlineLevel", SqlDbType.Int, OutlineLevel), DbHelper2.mp("@OutlineNumber", SqlDbType.VarChar, 255, OutlineNumber)); }
public static int CreateRootAccount(int ProjectId, string Title, int LastEditorId) { return(DbHelper2.RunSpInteger("AccountCreateRoot", DbHelper2.mp("@ProjectId", SqlDbType.Int, ProjectId), DbHelper2.mp("@Title", SqlDbType.NVarChar, 255, Title), DbHelper2.mp("@LastEditorId", SqlDbType.Int, LastEditorId))); }
public static void UpdateAccountECur(int AccountId, decimal Value, int LastEditorId) { DbHelper2.RunSp("AccountUpdateECur", DbHelper2.mp("@AccountId", SqlDbType.Int, AccountId), DbHelper2.mp("@Value", SqlDbType.Money, Value), DbHelper2.mp("@LastEditorId", SqlDbType.Int, LastEditorId)); }
public static void RenameAccount(int AccountId, string Title, int LastEditorId) { DbHelper2.RunSp("AccountRename", DbHelper2.mp("@AccountId", SqlDbType.Int, AccountId), DbHelper2.mp("@Title", SqlDbType.NVarChar, 255, Title), DbHelper2.mp("@LastEditorId", SqlDbType.Int, LastEditorId)); }
public static void UpdateActualFinancesValue(int ActualId, decimal AValue, int LastEditorId) { DbHelper2.RunSp("ActualFinancesUpdateValue", DbHelper2.mp("@ActualId", SqlDbType.Int, ActualId), DbHelper2.mp("@AValue", SqlDbType.Money, AValue), DbHelper2.mp("@LastEditorId", SqlDbType.Int, LastEditorId)); }
/// <summary> /// ActualId, AccountId, Title, OutlineLevel, ActualDate, Description, AValue, /// LastEditorId, LastSavedDate, ObjectTypeId, ObjectId, ObjectTitle /// </summary> public static DataTable GetListActualFinancesByProject(int ProjectId, int TimeZoneId) { return(DbHelper2.RunSpDataTable( TimeZoneId, new string[] { "ActualDate", "LastSavedDate" }, "ActualFinancesGetListByProject", DbHelper2.mp("@ProjectId", SqlDbType.Int, ProjectId))); }
public static int AddChildAccount(int ParentId, string Title, int LastEditorId) { return(DbHelper2.RunSpInteger("AccountAddChild", DbHelper2.mp("@ParentId", SqlDbType.Int, ParentId), DbHelper2.mp("@Title", SqlDbType.NVarChar, 255, Title), DbHelper2.mp("@LastEditorId", SqlDbType.Int, LastEditorId))); }
public static IDataReader GetOverlapedUserExceptions(int ExceptionId, DateTime FromDate, DateTime ToDate) { return(DbHelper2.RunSpDataReader("UserCalendarExceptionsGetOverlaped", DbHelper2.mp("@ExceptionId", SqlDbType.Int, ExceptionId), DbHelper2.mp("@FromDate", SqlDbType.DateTime, FromDate), DbHelper2.mp("@ToDate", SqlDbType.DateTime, ToDate))); }
public virtual void Update() { if (_state == DataRowState.Modified) { DbHelper2.RunSp("mc_EMailIncidentMappingUpdate" , DbHelper2.mp("@EMailIncidentMappingId", SqlDbType.Int, _EMailIncidentMappingId) , DbHelper2.mp("@Name", SqlDbType.NVarChar, 255, _Name) , DbHelper2.mp("@Type", SqlDbType.NVarChar, 1024, _Type) , DbHelper2.mp("@UserControl", SqlDbType.NVarChar, 1024, _UserControl) ); } else if (_state == DataRowState.Added) { SqlParameter outPutKey = new SqlParameter("@EMailIncidentMappingId", SqlDbType.Int); outPutKey.Direction = ParameterDirection.Output; DbHelper2.RunSp("mc_EMailIncidentMappingInsert", outPutKey , DbHelper2.mp("@Name", SqlDbType.NVarChar, 255, _Name) , DbHelper2.mp("@Type", SqlDbType.NVarChar, 1024, _Type) , DbHelper2.mp("@UserControl", SqlDbType.NVarChar, 1024, _UserControl) ); _EMailIncidentMappingId = (int)outPutKey.Value; } }
public static int AddUserException(int userCalendarId, DateTime FromDate, DateTime ToDate) { return(DbHelper2.RunSpInteger("UserCalendarExceptionAdd", DbHelper2.mp("@UserCalendarId", SqlDbType.Int, userCalendarId), DbHelper2.mp("@FromDate", SqlDbType.DateTime, FromDate), DbHelper2.mp("@ToDate", SqlDbType.DateTime, ToDate))); }
public static int Create(string CalendarName, int TimeZoneId, int ProjectId) { return(DbHelper2.RunSpInteger("CalendarCreateWithProject", DbHelper2.mp("@CalendarName", SqlDbType.NVarChar, 250, CalendarName), DbHelper2.mp("@TimeZoneId", SqlDbType.Int, TimeZoneId), DbHelper2.mp("@ProjectId", SqlDbType.Int, ProjectId))); }
/// <summary> /// ResourceId, EventId, PrincipalId, IsGroup, MustBeConfirmed, ResponsePending, /// IsConfirmed, IsExternal /// </summary> /// <returns></returns> public static DataTable GetListEventResourcesDataTable(int EventId, int TimeZoneId) { return(DbHelper2.RunSpDataTable( TimeZoneId, new string[] { "LastSavedDate" }, "EventResourcesGet", DbHelper2.mp("@EventId", SqlDbType.Int, EventId))); }
public static int GetDurationByFinishDate(int CalendarId, DateTime StartDate, DateTime FinishDate) { return(DbHelper2.RunSpInteger("Cal_GetDurationByFinishDate", DbHelper2.mp("@CalendarId", SqlDbType.Int, CalendarId), DbHelper2.mp("@StartDate", SqlDbType.DateTime, StartDate), DbHelper2.mp("@EndDate", SqlDbType.DateTime, FinishDate))); }
/// <summary> /// Reader returns fields: /// EventId, Title, PrincipalId, IsConfirmed, LastSavedDate, StateId /// </summary> /// <returns></returns> public static IDataReader GetListEventResourcesNotPending(int UserId, int TimeZoneId) { return(DbHelper2.RunSpDataReader( TimeZoneId, new string[] { "LastSavedDate", "StartDate", "FinishDate" }, "EventResourcesGetNotPending", DbHelper2.mp("@UserId", SqlDbType.Int, UserId))); }
public static DateTime GetStartDateByDuration(int CalendarId, DateTime FinishDate, int Duration) { return(DbHelper2.RunSpDateTime("Cal_GetStartDateByDuration", DbHelper2.mp("@CalendarId", SqlDbType.Int, CalendarId), DbHelper2.mp("@FinishDate", SqlDbType.DateTime, FinishDate), DbHelper2.mp("@Duration", SqlDbType.Int, Duration))); }
/// <summary> /// ItemId, Title, PriorityId, PriorityName, ItemType, CreationDate, StartDate, FinishDate, /// PercentCompleted, IsCompleted, ManagerId, ReasonId, ProjectId, ProjectTitle, /// StateId, CompletionTypeId, /// TaskTime, TotalMinutes, TotalApproved, HasRecurrence, ContactUid, OrgUid, ClientName, /// CategoryId, CategoryName /// </summary> /// <returns></returns> public static DataTable GetListEventsForManagerViewWithCategories(int PrincipalId, int TimeZoneId, int LanguageId, int ManagerId, int ProjectId, int categoryId, bool ShowActive, DateTime dtCompleted1, DateTime dtCompleted2, DateTime dtUpcoming1, DateTime dtUpcoming2, DateTime dtCreated1, DateTime dtCreated2, PrimaryKeyId orgUid, PrimaryKeyId contactUid) { object obj_dtCompleted1 = (dtCompleted1 <= DateTime.MinValue.AddDays(1)) ? null : (object)dtCompleted1; object obj_dtCompleted2 = (dtCompleted2 <= DateTime.MinValue.AddDays(1)) ? null : (object)dtCompleted2; object obj_dtUpcoming1 = (dtUpcoming1 >= DateTime.MaxValue.AddDays(-1)) ? null : (object)dtUpcoming1; object obj_dtUpcoming2 = (dtUpcoming2 >= DateTime.MaxValue.AddDays(-1)) ? null : (object)dtUpcoming2; object obj_dtCreated1 = (dtCreated1 <= DateTime.MinValue.AddDays(1)) ? null : (object)dtCreated1; object obj_dtCreated2 = (dtCreated2 <= DateTime.MinValue.AddDays(1)) ? null : (object)dtCreated2; return(DbHelper2.RunSpDataTable( TimeZoneId, new string[] { "CreationDate", "StartDate", "FinishDate" }, "EventsGetForManagerViewWithCategories", DbHelper2.mp("@PrincipalId", SqlDbType.Int, PrincipalId), DbHelper2.mp("@LanguageId", SqlDbType.Int, LanguageId), DbHelper2.mp("@ManagerId", SqlDbType.Int, ManagerId), DbHelper2.mp("@ProjectId", SqlDbType.Int, ProjectId), DbHelper2.mp("@CategoryId", SqlDbType.Int, categoryId), DbHelper2.mp("@ShowActive", SqlDbType.Bit, ShowActive), DbHelper2.mp("@CompletedDate1", SqlDbType.DateTime, obj_dtCompleted1), DbHelper2.mp("@CompletedDate2", SqlDbType.DateTime, obj_dtCompleted2), DbHelper2.mp("@StartDate1", SqlDbType.DateTime, obj_dtUpcoming1), DbHelper2.mp("@StartDate2", SqlDbType.DateTime, obj_dtUpcoming2), DbHelper2.mp("@CreationDate1", SqlDbType.DateTime, obj_dtCreated1), DbHelper2.mp("@CreationDate2", SqlDbType.DateTime, obj_dtCreated2), DbHelper2.mp("@OrgUid", SqlDbType.UniqueIdentifier, orgUid), DbHelper2.mp("@ContactUid", SqlDbType.UniqueIdentifier, contactUid))); }
public static void Update(int CalendarId, string CalendarName, int TimeZoneId) { DbHelper2.RunSp("CalendarUpdate", DbHelper2.mp("@CalendarId", SqlDbType.Int, CalendarId), DbHelper2.mp("@CalendarName", SqlDbType.NVarChar, 250, CalendarName), DbHelper2.mp("@TimeZoneId", SqlDbType.Int, TimeZoneId)); }
public static int GetState(int ObjectId) { return(DBCommon.NullToInt32( DbHelper2.RunSpScalar("EventGetState" , DbHelper2.mp("@ObjectId", SqlDbType.Int, ObjectId) ))); }
public static void AddUserCalendar( int CalendarId, int UserId) { DbHelper2.RunSp("UserCalendarAdd", DbHelper2.mp("@CalendarId", SqlDbType.Int, CalendarId), DbHelper2.mp("@UserId", SqlDbType.Int, UserId)); }
public virtual void Update() { if (_state == DataRowState.Modified) { DbHelper2.RunSp("mc_BusinessScoreUpdate" , DbHelper2.mp("@BusinessScoreId", SqlDbType.Int, _BusinessScoreId) , DbHelper2.mp("@Key", SqlDbType.NVarChar, 15, _Key) , DbHelper2.mp("@Name", SqlDbType.NVarChar, 255, _Name) ); } else if (_state == DataRowState.Added) { SqlParameter outPutKey = new SqlParameter("@BusinessScoreId", SqlDbType.Int); outPutKey.Direction = ParameterDirection.Output; DbHelper2.RunSp("mc_BusinessScoreInsert", outPutKey , DbHelper2.mp("@Key", SqlDbType.NVarChar, 15, _Key) , DbHelper2.mp("@Name", SqlDbType.NVarChar, 255, _Name) ); _BusinessScoreId = (int)outPutKey.Value; } }
public static void UpdateUserException(int ExceptionId, DateTime FromDate, DateTime ToDate) { DbHelper2.RunSp("UserCalendarExceptionUpdate", DbHelper2.mp("@ExceptionId", SqlDbType.Int, ExceptionId), DbHelper2.mp("@FromDate", SqlDbType.DateTime, FromDate), DbHelper2.mp("@ToDate", SqlDbType.DateTime, ToDate)); }
public static void SettingsUpdateLastSynchronization(int LdapId, DateTime LastSynchronization) { DbHelper2.RunSp("LdapSettingsUpdateLastSynchronization" , DbHelper2.mp("@LdapId", SqlDbType.Int, LdapId) , DbHelper2.mp("@LastSynchronization", SqlDbType.DateTime, LastSynchronization) ); }
/// <summary> /// Reader returns fields: /// SubscriptionId, DateTypeId, UserId, ObjectId, Lag, IsActive, HookId, SubscriptionType /// </summary> /// <returns></returns> public static IDataReader GetReminderSubscriptionPersonalForObject(int DateTypeId, int UserId, int ObjectId) { return(DbHelper2.RunSpDataReader("ReminderSubscribtionGetPersonalForObject", DbHelper2.mp("@DateTypeId", SqlDbType.Int, DateTypeId), DbHelper2.mp("@UserId", SqlDbType.Int, UserId), DbHelper2.mp("@ObjectId", SqlDbType.Int, ObjectId))); }