Example #1
0
        public ActionResult DisplayWarnings()
        {
            List <Warning> ToConfirmList = _pi.GetAllWarningOfmanager(logger.C_ID);

            WarningModel        warn;
            List <WarningModel> warnList = new List <WarningModel>();

            foreach (Warning w in ToConfirmList)
            {
                warn         = new WarningModel();
                warn.Reason  = w.Reason;
                warn.Content = w.Content;
                warn.gravity = w.gravity;
                warn.WId     = w.WId;

                CollaboratorModel Towarn = new CollaboratorModel();
                Towarn.C_Forname    = w.collab.C_Forname;
                Towarn.C_Lastname   = w.collab.C_Lastname;
                warn.collabAffected = Towarn;

                warnList.Add(warn);
            }
            WarningListModel listModel = new WarningListModel();

            listModel.list = warnList;
            var model = listModel;

            return(View("Warnings", model));
        }
Example #2
0
        public override void OnDelete(object arg)
        {
            WarningModel message = new WarningModel()
            {
                Message = "Are you sure want to delete data?"
            };

            IDialogService dialog = ObjectPool.Instance.Resolve <IDialogService>();
            bool?          result = dialog.ShowDialog <YesNo>(message);

            if (result.HasValue && result.Value)
            {
                IDbManager   dbManager = ObjectPool.Instance.Resolve <IDbManager>();
                IDataCommand db        = dbManager.GetDatabase(ApplicationSettings.Instance.Database.DefaultConnection.Name);
                foreach (Supplier item in Source)
                {
                    if (item.IsSelected)
                    {
                        try
                        {
                            db.Execute("DeleteSupplier", new
                            {
                                SupplierId = item.Id
                            });
                        }
                        catch { }
                    }
                }
                db.Close();
                CheckedHeader = false;
                OnSourceChanged(this);
            }
        }
Example #3
0
 // Update is called once per frame
 void Update()
 {
     if (errors.Count > 0)
     {
         WarningModel err = errors[0];
         errors.RemoveAt(0);
         window.active(err);
     }
 }
Example #4
0
 void Update()
 {
     if (errors.Count > 0)
     {
         WarningModel err = errors[0];
         errors.RemoveAt(0);                 // 删除索引指定的值
         window.active(err);                 // 激活警告
     }
 }
Example #5
0
 void Update()
 {
     if (errors.Count > 0)
     {
         WarningModel model = errors[0];
         window.Active(model);
         errors.RemoveAt(0);
     }
 }
Example #6
0
 public void Active(WarningModel value)
 {
     text.text = value.value;
     this.result = value.result;
     if (value.delay >0)
     {
         Invoke("Close",value.delay);
     }
     gameObject.SetActive(true);
 }
Example #7
0
 public void active(WarningModel value)
 {
     text.text   = value.value;
     this.result = value.result;
     if (value.delay > 0)
     {
         Invoke("Close", value.delay);
     }
     gameObject.SetActive(true);
 }
    WarningResult result;//回调

    public void active(WarningModel value)
    {
        GetComponent <errorPanel>().showPanel();
        text.text   = value.value;
        this.result = value.result;
        if (value.delay > 0)
        {
            Invoke("close", value.delay);
        }
        gameObject.SetActive(true);
    }
        public void TestWarningsFromDirectConverters()
        {
            fsData data;
            var    serializer = new fsSerializer();

            fsResult result = serializer.TrySerialize(new WarningModel(), out data);

            Assert.AreEqual(1, result.RawMessages.Count());
            Assert.AreEqual("Warning", result.RawMessages.First());

            WarningModel model = null;

            result = serializer.TryDeserialize(data, ref model);
            Assert.AreEqual(1, result.RawMessages.Count());
            Assert.AreEqual("Warning", result.RawMessages.First());
        }
Example #10
0
 public void active(WarningModel model)
 {
     text.text   = model.value;
     this.result = model.result;
     this.gameObject.SetActive(true);
 }
Example #11
0
 public static void addError(WarningModel errorModel)
 {
     errors.Add(errorModel);
 }
Example #12
0
 /// <summary>
 /// 弹出提示窗并显示
 /// </summary>
 /// <param name="value"></param>
 public void Active(WarningModel value)
 {
     contentText.text = value.Value;
     result = value.Result;
     gameObject.SetActive(true);
 }
Example #13
0
 public void Resolve(WarningModel model)
 {
     this.Result = this.selector.WarningTemplate;
 }
Example #14
0
    WarningResult result;       // 警告托管

    // 激活警告
    public void active(WarningModel value)
    {
        text.text   = value.value;
        this.result = value.result;
        gameObject.SetActive(true);
    }
Example #15
0
 internal void Traverse(WarningModel model, List <IssueModel> result)
 {
     result.Add(model);
 }
Example #16
0
 public void Resolve(WarningModel model)
 {
     this.issuesTraverser.Traverse(model, result);
 }