public ActionResult SaveData(FormCollection isi) { Dictionary<String, String> err = Users.SaveData(isi); if (err == null) { FormPanelResult r = new FormPanelResult(); r.Script = string.Format("UpdateGrid();"); return r; } else { /* X.Msg.Notify(new NotificationConfig { Icon = Icon.Error, Title = "Error", Html = err }).Show(); return this.Direct(); */ this.GetCmp<FormPanel>("myFormPanel").MarkInvalid(err); return this.Direct(); } }
public ActionResult SaveDataEdit(FormCollection isi) { String err = Customers.SaveDataEdit(isi); if (err == "") { FormPanelResult r = new FormPanelResult(); r.Script = string.Format("UpdateGrid();"); return r; } else { X.Msg.Notify(new NotificationConfig { Icon = Icon.Error, Title = "Error", Html = err }).Show(); return this.Direct(); } }