Пример #1
0
        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();
            }
        }
Пример #2
0
        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();
            }
        }