开发者

LightSwitch Application and Doing //Something when a row value has been changed

I have a LightSwitch application (C#) and it's all working fine, but am in need of a feature and not sure how to go about it.

Let's say that there is a Status column in my Orders screen. And开发者_如何学运维 when I change a status to, say, "Confirmed" in the Status column, I would like to send an e-mail to the email address corresponding to that particular person about their order.

Is this even possible in LightSwitch applications?


If I understand you correctly this sounds like exactly what LightSwitch is intended for.

What I would do is that I would add a changed handler for Status field on the Orders table (so that's it's available in all screens).

Something like this:

public partial class Order
{
    partial void Status_Changed()
    {
      if (status == Status.Confirmed)
      {
         // Write code to send email
      }
    }
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜