Beispiel #1
0
        public void it_returns_full_build_field_2()
        {
            var                            tempBuildConfig                = m_client.BuildConfigs.All().First();
            ItemsField                     itemsField                     = ItemsField.WithFields(item: true);
            BuildsField                    buildsField                    = BuildsField.WithFields();
            RelatedField                   relatedField                   = RelatedField.WithFields(builds: buildsField);
            RelatedIssuesField             relatedIssuesField             = RelatedIssuesField.WithFields(href: true);
            ArtifactDependenciesField      artifactDependenciesField      = ArtifactDependenciesField.WithFields();
            BuildArtifactDependenciesField buildArtifactDependenciesField = BuildArtifactDependenciesField.WithFields();
            BuildSnapshotDependenciesField buildSnapshotDependenciesField = BuildSnapshotDependenciesField.WithFields();
            DatasField                     datasField                     = DatasField.WithFields();
            StatisticsField                statisticsField                = StatisticsField.WithFields();
            EntriesField                   entriesField                   = EntriesField.WithFields();
            PropertiesField                propertiesField                = PropertiesField.WithFields();
            ArtifactsField                 artifactsField                 = ArtifactsField.WithFields(href: true);
            ProblemOccurrencesField        problemOccurrences             = ProblemOccurrencesField.WithFields();
            TestOccurrencesField           testOccurrencesField           = TestOccurrencesField.WithFields();
            AgentField                     agentField                     = AgentField.WithFields(id: true);
            CompatibleAgentsField          compatibleAgentsField          = CompatibleAgentsField.WithFields(agent: agentField, href: true);
            BuildField                     buildField1                    = BuildField.WithFields(id: true);
            BuildChangeField               buildChangeField               = BuildChangeField.WithFields(nextBuild: buildField1, prevBuild: buildField1);
            BuildChangesField              buildChangesField              = BuildChangesField.WithFields(buildChange: buildChangeField);
            RevisionField                  revisionField                  = RevisionField.WithFields(version: true);
            RevisionsField                 revisionsField                 = RevisionsField.WithFields();
            LastChangesField               lastChangesField               = LastChangesField.WithFields();
            ChangesField                   changesField                   = ChangesField.WithFields();
            TriggeredField                 triggeredField                 = TriggeredField.WithFields(type: true);
            ProgressInfoField              progressInfoField              = ProgressInfoField.WithFields(currentStageText: true);
            TagsField                      tagsField             = TagsField.WithFields();
            UserField                      userField             = UserField.WithFields(id: true);
            CommentField                   commentField          = CommentField.WithFields(text: true);
            BuildTypeField                 buildTypeField        = BuildTypeField.WithFields(id: true);
            BuildTypeWrapperField          buildTypeWrapperField = BuildTypeWrapperField.WithFields(buildType: buildTypeField);
            LinkField                      linkField             = LinkField.WithFields(type: true);
            LinksField                     linksField            = LinksField.WithFields(link: linkField);
            var                            buildField            = BuildField.WithFields(links: linksField, buildType: buildTypeField, comment: commentField,
                                                                                         tags: tagsField, pinInfo: commentField, user: userField, running_info: progressInfoField,
                                                                                         canceledInfo: commentField, triggered: triggeredField, lastChanges: lastChangesField, changes: changesField,
                                                                                         revisions: revisionsField, versionedSettingsRevision: revisionField,
                                                                                         artifactDependencyChanges: buildChangesField, agent: agentField, compatibleAgents: compatibleAgentsField,
                                                                                         testOccurrences: testOccurrencesField, problemOccurrences: problemOccurrences, artifacts: artifactsField,
                                                                                         properties: propertiesField, resultingProperties: propertiesField, attributes: entriesField,
                                                                                         statistics: statisticsField, metadata: datasField, snapshotDependencies: buildSnapshotDependenciesField,
                                                                                         artifactDependencies: buildArtifactDependenciesField, customArtifactDependencies: artifactDependenciesField,
                                                                                         statusChangeComment: commentField, relatedIssues: relatedIssuesField, replacementIds: itemsField,
                                                                                         related: relatedField);

            var tempBuild = m_client.Builds.LastBuildByBuildConfigId(tempBuildConfig.Id);
            var build     = m_client.Builds.GetFields(buildField.ToString()).ById(tempBuild.Id);

            Assert.IsNotNull(build);
        }
        public void PlaceCommentField(CommentField commentfield)
        {
            int index = 0;

            for (int y = 17; y < 30; y++)
            {
                for (int x = 28; x < 68; x++)
                {
                    char characterString = commentfield.ToString()[index];
                    _printTable[y][x] = characterString.ToString();
                    index++;
                }
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (CommentField != null)
            {
                CommentField.Dispose();
                CommentField = null;
            }

            if (ConfirmButton != null)
            {
                ConfirmButton.Dispose();
                ConfirmButton = null;
            }

            if (InventoryIDLabel != null)
            {
                InventoryIDLabel.Dispose();
                InventoryIDLabel = null;
            }

            if (RejectButton != null)
            {
                RejectButton.Dispose();
                RejectButton = null;
            }

            if (StateCommentLabel != null)
            {
                StateCommentLabel.Dispose();
                StateCommentLabel = null;
            }

            if (StateIcon != null)
            {
                StateIcon.Dispose();
                StateIcon = null;
            }

            if (StateTimeStartLabel != null)
            {
                StateTimeStartLabel.Dispose();
                StateTimeStartLabel = null;
            }

            if (StateUserLabel != null)
            {
                StateUserLabel.Dispose();
                StateUserLabel = null;
            }
        }
		public CommentIndexAttribute(CommentField[] fields)
		{
			_fields = fields.Cast<Enum>().ToList();
		}
Beispiel #5
0
 public void CommentTextField(string value)
 {
     CommentField.EnterText(value);
 }
        public void ShowCmdWindow(string cmd, int lscId, string projId)
        {
            try {
                WLscsComboBox.Disabled  = false;
                ProjectIdField.Disabled = false;
                ProjectIdField.Clear();
                ProjNameField.Clear();
                StartTimeField.Clear();
                EndTimeField.Clear();
                ResponsibleField.Clear();
                PhoneField.Clear();
                CompanyField.Clear();
                CommentField.Clear();
                EnabledCheckbox.Checked = true;
                TipsStatusBar.ClearStatus();

                switch (cmd)
                {
                case "Add":
                    ProjectWindow.Title = "新增工程";
                    ProjectWindow.Icon  = Icon.TagBlueAdd;
                    WLscsComboBox.GetStore().DataBind();
                    ProjectIdField.Text    = Guid.NewGuid().ToString("D").ToUpper();
                    StartTimeField.Text    = WebUtility.GetDateString(DateTime.Today);
                    EndTimeField.Text      = WebUtility.GetDateString(DateTime.Today.AddMonths(1).AddSeconds(-1));
                    OperationWindowHF.Text = "Add";
                    ProjectWindow.Show();
                    break;

                case "Edit":
                    ProjectWindow.Title     = "编辑工程";
                    ProjectWindow.Icon      = Icon.TagBlueEdit;
                    WLscsComboBox.Disabled  = true;
                    ProjectIdField.Disabled = true;
                    OperationWindowHF.Text  = "Edit";

                    var lsc = new BLsc().GetLsc(lscId);
                    if (lsc == null)
                    {
                        WebUtility.ShowMessage(EnmErrType.Warning, "无法获取Lsc信息");
                        return;
                    }

                    var connectionString = WebUtility.CreateLscConnectionString(lsc);
                    var project          = new BAppointment().GetProject(lsc.LscID, lsc.LscName, projId, connectionString);
                    if (project == null)
                    {
                        WebUtility.ShowMessage(EnmErrType.Warning, "无法获取工程信息");
                        return;
                    }

                    WLscsComboBox.SetValueAndFireSelect(lsc.LscID);
                    ProjectIdField.Text     = project.ProjectId;
                    ProjNameField.Text      = project.ProjectName;
                    StartTimeField.Text     = WebUtility.GetDateString(project.BeginTime);
                    EndTimeField.Text       = WebUtility.GetDateString(project.EndTime);
                    ResponsibleField.Text   = project.Responsible;
                    PhoneField.Text         = project.ContactPhone;
                    CompanyField.Text       = project.Company;
                    CommentField.Text       = project.Comment;
                    EnabledCheckbox.Checked = project.Enabled;
                    ProjectWindow.Show();
                    break;

                case "Del":
                    X.Msg.Confirm("确认对话框", "您确定要删除吗?", new MessageBoxButtonsConfig {
                        Yes = new MessageBoxButtonConfig {
                            Handler = String.Format(@"
                                X.ProjectManager.Delete({0},'{1}',{{
                                success: function(result) {{
                                    MainGridPagingToolbar.doRefresh();
                                }},
                                eventMask: {{
                                    showMask: true,
                                    target: 'customtarget',
                                    msg: '正在删除中...',
                                    customTarget: MainGridPanel.body.up('div')
                                }}}});", lscId, projId),
                            Text    = "确定"
                        },
                        No = new MessageBoxButtonConfig {
                            Text = "取消"
                        }
                    }).Show();
                    break;

                default:
                    break;
                }
            } catch (Exception err) {
                WebUtility.WriteLog(EnmSysLogLevel.Error, EnmSysLogType.Exception, err.ToString(), Page.User.Identity.Name);
                WebUtility.ShowMessage(EnmErrType.Error, err.Message);
            }
        }