当前位置: 首页>>代码示例>>C#>>正文


C# Issue.raise方法代码示例

本文整理汇总了C#中Issue.raise方法的典型用法代码示例。如果您正苦于以下问题:C# Issue.raise方法的具体用法?C# Issue.raise怎么用?C# Issue.raise使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Issue的用法示例。


在下文中一共展示了Issue.raise方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: andonManager_andonAlertEvent


//.........这里部分代码省略.........
                    }
                    

                    logMsg += lines.getLineName(e.DeviceID) + ":";


                    if (e.DeviceID == whID)
                    {
                        logMsg += departmentTable.Rows[lg.Department - 1]["description"] + "-";
                        logMsg += "PART #" + lg.Data;
                        recordId = dataAccess.findIssueRecord(e.DeviceID, lg.Station, lg.Department, lg.Data);
                    }

                    else
                    {
                        String stationName = lines.getStationName(e.DeviceID, lg.Station);
                        if (stationName == string.Empty)
                            stationName = "Station #" + lg.Station.ToString();

                        logMsg += stationName + ":";
                        logMsg += departmentTable.Rows[lg.Department - 1]["description"] + "-";

                        if (lg.Department == 3)
                        {
                            logMsg += "PART #" + lg.Data;
                            recordId = dataAccess.findIssueRecord(e.DeviceID, lg.Station, lg.Department, lg.Data);
                        }
                        else
                        {
                            String className = lines.getClassName(e.DeviceID, lg.Station, lg.Department, Convert.ToInt32(lg.Data));

                            if (className == String.Empty)
                                lg.Data = "Class Code #" + Convert.ToInt32(lg.Data);
                            else lg.Data = className;
                            recordId = dataAccess.findIssueRecord(e.DeviceID, lg.Station, lg.Department, lg.Data);

                            logMsg += "--" + lg.Data;

                        }


                    }
                  
                    
                    


                    if (recordId == -1)     //new issue
                    {

                        recordId =
                            dataAccess.insertIssueRecord(e.DeviceID, lg.Station, lg.Department, lg.Data, logMsg);

                        Issue issue = new Issue(e.DeviceID,lg.Station,lg.Department,logMsg +"-at "+DateTime.Now.ToShortTimeString(),timeout);
                        issue.issueEscalationEvent+=new EventHandler<issueEscalateEventArgs>(issue_issueEscalationEvent);

                        Issues.Add(recordId,issue);

                        issue.raise();

                        logMsg += "--Issue Raised" + "----at: " + DateTime.Now.ToString() + Environment.NewLine;

                        

                        
                    }
                    else
                    {
                        if (dataAccess.getIssueStatus(recordId) == "raised")
                        {
                            dataAccess.updateIssueStatus(recordId, "acknowledged");
                            logMsg += "--Issue Acknowledged" + "----at: " + DateTime.Now.ToString(); 
                        }
                        else if (dataAccess.getIssueStatus(recordId) == "acknowledged")
                        {

                            dataAccess.updateIssueStatus(recordId);

                            if (Issues.ContainsKey(recordId))
                            {
                                Issues[recordId].resolve();
                                Issues.Remove(recordId);
                            }

                            logMsg += "--Issue Resolved" + "----at: " + DateTime.Now.ToString() ;
                        }
                        else return;
                    }
                    dataAccess.updateIssueMarquee();
                    tbMsg.Dispatcher.BeginInvoke(DispatcherPriority.Background,
                                            new Action(() => { tbMsg.Text += logMsg + Environment.NewLine; }));

                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + Environment.NewLine + ex.StackTrace, "Error", MessageBoxButton.OK);
            }

        }
开发者ID:jjyothilinga,项目名称:AndonTerminal,代码行数:101,代码来源:StartPage.xaml.cs


注:本文中的Issue.raise方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。