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)); }
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); } }
// Update is called once per frame void Update() { if (errors.Count > 0) { WarningModel err = errors[0]; errors.RemoveAt(0); window.active(err); } }
void Update() { if (errors.Count > 0) { WarningModel err = errors[0]; errors.RemoveAt(0); // 删除索引指定的值 window.active(err); // 激活警告 } }
void Update() { if (errors.Count > 0) { WarningModel model = errors[0]; window.Active(model); errors.RemoveAt(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); }
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()); }
public void active(WarningModel model) { text.text = model.value; this.result = model.result; this.gameObject.SetActive(true); }
public static void addError(WarningModel errorModel) { errors.Add(errorModel); }
/// <summary> /// 弹出提示窗并显示 /// </summary> /// <param name="value"></param> public void Active(WarningModel value) { contentText.text = value.Value; result = value.Result; gameObject.SetActive(true); }
public void Resolve(WarningModel model) { this.Result = this.selector.WarningTemplate; }
WarningResult result; // 警告托管 // 激活警告 public void active(WarningModel value) { text.text = value.value; this.result = value.result; gameObject.SetActive(true); }
internal void Traverse(WarningModel model, List <IssueModel> result) { result.Add(model); }
public void Resolve(WarningModel model) { this.issuesTraverser.Traverse(model, result); }