当前位置: 首页>>代码示例>>C#>>正文


C# HPMUniqueID类代码示例

本文整理汇总了C#中HPMUniqueID的典型用法代码示例。如果您正苦于以下问题:C# HPMUniqueID类的具体用法?C# HPMUniqueID怎么用?C# HPMUniqueID使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


HPMUniqueID类属于命名空间,在下文中一共展示了HPMUniqueID类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: HansoftEnumValue

 internal HansoftEnumValue(HPMUniqueID projectId, EHPMProjectDefaultColumn column, object value, int iValue)
 {
     this.projectId = projectId;
     this.column = column;
     this.value = value;
     this.iValue = iValue;
 }
开发者ID:patrikha,项目名称:Hansoft-ObjectWrapper,代码行数:7,代码来源:HansoftEnumValue.cs

示例2: GetTask

 /// <summary>
 /// Factory method for creating a Task (subclass of).
 /// </summary>
 /// <param name="uniqueID">The Task ID or TaskRef ID that a Task shuld be created for</param>
 /// <param name="viewType">The view that the task appears in (primarily  important for product backlog items which can appear in mutiple views).</param>
 /// <returns>A concrete task acting as a wrapper to access the Hansoft API for the task in question.</returns>
 internal static Task GetTask(HPMUniqueID uniqueID, EHPMReportViewType viewType)
 {
     if ((viewType == EHPMReportViewType.ScheduleMainProject || viewType == EHPMReportViewType.AgileMainProject) && SdkSession.UtilIsIDTask(uniqueID) && SdkSession.UtilIsIDBacklogProject(SdkSession.TaskGetContainer(uniqueID)))
         return GetTask(SdkSession.TaskGetProxy(uniqueID));
     else
         return GetTask(uniqueID);
 }
开发者ID:aidinabedi,项目名称:Hansoft-ObjectWrapper,代码行数:13,代码来源:Task.cs

示例3: FindReport

 public static HPMReport FindReport(HPMUniqueID projId, HPMUniqueID reportUserId, string reportName)
 {
     HPMReports reports = SessionManager.Instance.Session.ProjectGetReports(projId, reportUserId);
     foreach (HPMReport report in reports.m_Reports)
     {
         if (report.m_Name == reportName)
             return report;
     }
     return null;
 }
开发者ID:persu,项目名称:HansoftExport,代码行数:10,代码来源:HPMUtilities.cs

示例4: GetChildren

 internal static List<HansoftItem> GetChildren(HPMUniqueID uniqueID, bool deep)
 {
     List<HansoftItem> children = new List<HansoftItem>();
     if (HasChildren(uniqueID))
     {
         HPMTaskEnum tasks = Session.TaskRefUtilEnumChildren(uniqueID, deep);
         foreach (HPMUniqueID id in tasks.m_Tasks)
             children.Add(Task.GetTask(id));
     }
     return children;
 }
开发者ID:Hansoft,项目名称:Hansoft-ObjectWrapper,代码行数:11,代码来源:TaskHelper.cs

示例5: Release

 private Release(HPMUniqueID uniqueID, HPMUniqueID uniqueTaskID)
     : base(uniqueID, uniqueTaskID)
 {
     if (cachedData.ContainsKey(uniqueTaskID.m_ID))
         cache = cachedData[uniqueTaskID.m_ID];
     else
     {
         cache = new CachedData();
         cachedData.Add(uniqueTaskID.m_ID, cache);
     }
 }
开发者ID:Hansoft,项目名称:Hansoft-ObjectWrapper,代码行数:11,代码来源:Release.cs

示例6: FromString

        public static HansoftEnumValue FromString(HPMUniqueID projectId, EHPMProjectDefaultColumn column, string sValue)
        {
            if (!maxColumnValuebyColumn.ContainsKey(column))
                throw new ArgumentException("Unsupported default column in HansoftEnumValue.FromString/3: " + column);

            for (uint i = 0; i <= maxColumnValuebyColumn[column]; i += 1)
            {
                string translated = GetTranslatedString(projectId, column, i);
                if (translated == sValue)
                    return FromInt(projectId, column, (int)i);
            }
            return FromInt(projectId, column, 0);
        }
开发者ID:patrikha,项目名称:Hansoft-ObjectWrapper,代码行数:13,代码来源:HansoftEnumValue.cs

示例7: FromObject

 internal static HansoftEnumValue FromObject(HPMUniqueID projectId, EHPMProjectDefaultColumn column, object value)
 {
     if (value is HansoftEnumValue)
         return FromInt(projectId, column, ((HansoftEnumValue)value).iValue);
     else
     {
         string sValue = value.ToString();
         int iValue;
         if (Int32.TryParse(sValue, out iValue))
             return FromInt(projectId, column, iValue);
         else
             return FromString(projectId, column, sValue);
     }
 }
开发者ID:aidinabedi,项目名称:Hansoft-ObjectWrapper,代码行数:14,代码来源:HansoftEnumValue.cs

示例8: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            // The ID of the authenticated user
            FormsIdentity ID = (FormsIdentity)HttpContext.Current.User.Identity;
            m_ResourceID = new HPMUniqueID(Convert.ToInt32(ID.Name));
            m_NoUserID = new HPMUniqueID(-1);
            // Find context is empty but can be set by choosing a report or providing a search string
            m_FindContexts = new Dictionary<string, HPMFindContextData>();
            ErrorLabel.Visible = false;

            try
            {
                InitHansoftVirtualSession();
                m_UpdatedFromWeb = m_VirtSession.LocalizationCreateUntranslatedStringFromString("Updated from web integration sample");
                AddProjectControls();

                // update info contains info from callbacks about changed Hansoft elements
                HPMUpdateInfo update = Session["updateinfo"] as HPMUpdateInfo;

                if (!IsPostBack || update.FullUpdate)
                {
                    AddData();
                    update.FullUpdate = false;
                    // retain selected tab between postbacks (doesn't work for the first tab - TabContainer bug?) Uncomment it if you want to experiment with it
                    //if (Session["ActiveTabIndex"] != null)
                    //{
                    //    int storedIndex = (int)Session["ActiveTabIndex"];
                    //    TabContainer projectTabs = Page.FindControl("ProjectTabs") as TabContainer;
                    //    if (storedIndex <= projectTabs.Tabs.Count)
                    //        projectTabs.ActiveTabIndex = storedIndex;
                    //}
                    BindDataSources();
                }


            }
            catch (HPMSdkException error)
            {
                SetErrorMessage("An error occurred when communicating with the Hansoft server.", error.ErrorAsStr());
            }
            catch (HPMSdkManagedException error)
            {
                SetErrorMessage("An error occurred when communicating with the Hansoft server.", error.ErrorAsStr());
            }
        }
开发者ID:Hansoft,项目名称:hansoft-csharp-sdk-web-sample,代码行数:45,代码来源:Default.aspx.cs

示例9: CreateTask

 private static Task CreateTask(HPMUniqueID uniqueID)
 {
     HPMUniqueID refTaskID = SdkSession.TaskRefGetTask(uniqueID);
     EHPMTaskLockedType lockedType = SdkSession.TaskGetLockedType(refTaskID);
     switch (lockedType)
     {
         case EHPMTaskLockedType.BacklogItem:
             if (SdkSession.UtilIsIDBacklogProject(SdkSession.TaskGetContainer(refTaskID)))
             {
                 if (SdkSession.TaskGetMainReference(refTaskID).m_ID == uniqueID.m_ID)
                     return ProductBacklogItem.GetProductBacklogItem(uniqueID, refTaskID);
                 else
                     return ProductBacklogItemInSprint.GetProductBacklogItemInSprint(uniqueID, refTaskID);
             }
             else
                 return SprintBacklogItem.GetSprintBacklogItem(uniqueID, refTaskID);
         case EHPMTaskLockedType.QABug:
             return Bug.GetBug(uniqueID, refTaskID);
         case EHPMTaskLockedType.SprintItem:
             return Sprint.GetSprint(uniqueID, refTaskID);
         case EHPMTaskLockedType.Normal:
         default:
             if (SdkSession.TaskGetForceSubProject(refTaskID))
             {
                 return SubProject.GetSubProject(uniqueID, refTaskID);
             }
             else
             {
                 EHPMTaskType taskType = SdkSession.TaskGetType(refTaskID);
                 switch (taskType)
                 {
                     case EHPMTaskType.Milestone:
                         return Release.GetRelease(uniqueID, refTaskID);
                     case EHPMTaskType.Planned:
                     default:
                         if (SdkSession.UtilIsIDBacklogProject(SdkSession.TaskGetContainer(refTaskID)))
                             return ProductBacklogItemInSchedule.GetProductBacklogItemInSchedule(uniqueID, refTaskID);
                         else
                             return ScheduledTask.GetScheduledTask(uniqueID, refTaskID);
                 }
             }
     }
 }
开发者ID:aidinabedi,项目名称:Hansoft-ObjectWrapper,代码行数:43,代码来源:Task.cs

示例10: Resource

 internal Resource(HPMUniqueID uniqueID)
     : base(uniqueID)
 {
 }
开发者ID:patrikha,项目名称:Hansoft-ObjectWrapper,代码行数:4,代码来源:Resource.cs

示例11: GetRelease

 internal static Release GetRelease(HPMUniqueID uniqueID, HPMUniqueID uniqueTaskID)
 {
     return new Release(uniqueID, uniqueTaskID);
 }
开发者ID:Hansoft,项目名称:Hansoft-ObjectWrapper,代码行数:4,代码来源:Release.cs

示例12: GetProductBacklogItemInSchedule

 internal static ProductBacklogItemInSchedule GetProductBacklogItemInSchedule(HPMUniqueID uniqueID, HPMUniqueID uniqueTaskID)
 {
     return new ProductBacklogItemInSchedule(uniqueID, uniqueTaskID);
 }
开发者ID:aidinabedi,项目名称:Hansoft-ObjectWrapper,代码行数:4,代码来源:ProductBacklogItemInSchedule.cs

示例13: GetTranslatedString

 private static string GetTranslatedString(HPMUniqueID projectId, EHPMProjectDefaultColumn column, uint iValue)
 {
     HPMUntranslatedString unTranslated = SessionManager.Session.UtilGetColumnDataItemFormatted(projectId, column, iValue);
     HPMLanguage language = SessionManager.Session.LocalizationGetDefaultLanguage();
     String translated = SessionManager.Session.LocalizationTranslateString(language, unTranslated);
     return translated;
 }
开发者ID:patrikha,项目名称:Hansoft-ObjectWrapper,代码行数:7,代码来源:HansoftEnumValue.cs

示例14: GetProductBacklogItem

 internal static ProductBacklogItem GetProductBacklogItem(HPMUniqueID uniqueID, HPMUniqueID uniqueTaskID)
 {
     return new ProductBacklogItem(uniqueID, uniqueTaskID);
 }
开发者ID:aidinabedi,项目名称:Hansoft-ObjectWrapper,代码行数:4,代码来源:ProductBacklogItem.cs

示例15: CloneBugWorkflow

 private void CloneBugWorkflow(HPMUniqueID sourceQAProjectID, HPMUniqueID targetQAProjectID)
 {
 }
开发者ID:Hansoft,项目名称:Hansoft-ObjectWrapper,代码行数:3,代码来源:Project.cs


注:本文中的HPMUniqueID类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。