Esempio n. 1
0
        public async Task <ActionResult> Save(CheckCategoryViewModel model)
        {
            using (CheckCategoryServiceClient client = new CheckCategoryServiceClient())
            {
                CheckCategory obj = new CheckCategory()
                {
                    Key         = model.Name.ToUpper(),
                    Status      = model.Status,
                    Description = model.Description,
                    Editor      = User.Identity.Name,
                    EditTime    = DateTime.Now,
                    CreateTime  = DateTime.Now,
                    Creator     = User.Identity.Name
                };
                MethodReturnResult rst = await client.AddAsync(obj);

                if (rst.Code == 0)
                {
                    rst.Message = string.Format(QAMResources.StringResource.CheckCategory_Save_Success
                                                , model.Name);
                }
                return(Json(rst));
            }
        }
Esempio n. 2
0
 public CheckMetadata(CheckCategory category, string description)
 {
     Category    = category;
     Description = description;
 }
Esempio n. 3
0
        public ReplicationCheck(string title, CheckId checkId, LocalizedString description, CheckCategory category, IEventManager eventManager, string momEventSource, string serverName, uint?ignoreTransientErrorsThreshold)
        {
            this.m_Title           = title;
            this.m_checkId         = checkId;
            this.m_Description     = description;
            this.m_Category        = category;
            this.m_ServerName      = serverName;
            this.m_EventManager    = eventManager;
            this.m_checkResultInfo = new ReplicationCheckResultInfo(this);
            uint?num = ignoreTransientErrorsThreshold;

            this.m_ignoreTransientErrorsThreshold = ((num != null) ? new uint?(num.GetValueOrDefault()) : new uint?(0U));
        }
Esempio n. 4
0
 public ReplicationCheck(string title, CheckId checkId, LocalizedString description, CheckCategory category, IEventManager eventManager, string momEventSource, string serverName) : this(title, checkId, description, category, eventManager, momEventSource, serverName, null)
 {
 }
Esempio n. 5
0
 public DagMemberCheck(string serverName, string title, CheckId checkId, LocalizedString description, CheckCategory checkCategory, IEventManager eventManager, string momeventsource, uint?ignoreTransientErrorsThreshold, IADDatabaseAvailabilityGroup dag, bool fClusterLevelCheck) : base(title, checkId, description, checkCategory, eventManager, momeventsource, serverName, ignoreTransientErrorsThreshold)
 {
     this.m_dag = dag;
     this.m_fClusterLevelCheck = fClusterLevelCheck;
 }
Esempio n. 6
0
 public DagMemberCheck(string serverName, string title, CheckId checkId, LocalizedString description, CheckCategory checkCategory, IEventManager eventManager, string momeventsource, IADDatabaseAvailabilityGroup dag, bool fClusterLevelCheck) : this(serverName, title, checkId, description, checkCategory, eventManager, momeventsource, null, dag, fClusterLevelCheck)
 {
 }