【问题标题】:Save data into sql server using custom method in lightswitch html client使用lightswitch html客户端中的自定义方法将数据保存到sql server
【发布时间】:2014-10-28 14:25:13
【问题描述】:

如何在单击按钮时保存数据(而不是使用弹出屏幕给出的保存图标)。我尝试使用如下自定义方法。但数据没有保存在 sql 数据库中。

  myapp.AddEditApplicantDeclaration.SubmitMethod_execute = funcation(scree)
   {
       msls.application.commitChanges().then(null, function fail(e) {
       alert(e.message);
       msls.application.cancelChanges();
       throw e;
   });
   };

我创建了一个按钮并编写了 _execute 方法。但它没有保存到数据库中。我在这里错过了什么吗? 它是一个简单的表,并试图将 isSummitted 列更新为“Applicant”表。

【问题讨论】:

    标签: javascript html visual-studio-lightswitch


    【解决方案1】:

    我通过简单地使用myapp.commitChanges(); 来保存数据...这可以包含在按钮的_execute 下的验证中,就像你上面所说的那样

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多