Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/csharp-4.0/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 4.0 在c的内部版本中发出通知声音#_C# 4.0 - Fatal编程技术网

C# 4.0 在c的内部版本中发出通知声音#

C# 4.0 在c的内部版本中发出通知声音#,c#-4.0,C# 4.0,我用剑道创建了一个通知,当通知发出时,我保存了system.media.systemsounds.hand.play() 当我的项目运行时,当我发布我的项目并在构建版本中运行时,它工作正常。是否不发出通知 我该怎么办 public JsonResult DemoNotification() { List<DemoNotification> res = new List<DemoNotification>();

我用剑道创建了一个通知,当通知发出时,我保存了
system.media.systemsounds.hand.play()

当我的项目运行时,当我发布我的项目并在构建版本中运行时,它工作正常。是否不发出通知

我该怎么办

        public JsonResult DemoNotification()
        {
          List<DemoNotification> res = new List<DemoNotification>();
          DataTable dt = Functions.GetTbl(cmd);
            if (dt.Rows.Count > 0)
             {
               for(int i=0;i<dt.Rows.Count;i++){
                    DemoNotification obj = new DemoNotification();
                    obj.CompanyName = dt.Rows[i]["CompanyName"].ToString();
                    obj.DemoDate =Convert.ToDateTime(dt.Rows[i]"DemoDate"]);
                    res.Add(obj);
                    System.Media.SystemSounds.Hand.Play();
                }

            }
            return Json(res);
        }
     function load() {
                $.ajax({
                    url: root("CRM/DemoNotification"),
                    type: "POST",

                }).done(function (data) {
                    for (var i = 1; i <= data.length; i++) {
                        notification.ShowDemoSuccess("Demo for <b>" + data[i - 1].CompanyName.toString() + "</b> on", Date(data[i - 1].DemoDate));
                    }


                });
            }
publicjsonresult DemoNotification()
{
List res=新列表();
DataTable dt=Functions.GetTbl(cmd);
如果(dt.Rows.Count>0)
{
对于(int i=0;i