Beispiel #1
0
 public void AddNewInspectorTaskWeatherWarning(ASectionObj obj)
 {
     //List<Zone> _pLists = new List<Zone>();
     //if (obj.WeatherWarning.Equals("red"))
     //{
     //    _pLists = ZoneLab.getInstance().GetShouldInspectList(obj.ID, 3);
     //    AddNewTask(_pLists, obj.ID);
     //}
 }
        public _RFLog[] GetTrackBreakRecords(out int N, ASectionObj obj)
        {
            _RFLog[] log      = new _RFLog[64];
            long     stopTime = 0;
            long     t;

            System.Data.DataSet ds = new System.Data.DataSet();
            string sql             = string.Format("select * from section_log_rain where tm2 == 0 and secid ='{0}' order by log_time", obj.ID);

            N = 0;
            if (m_sqliteManager.QueryBySql(sql, ds) > 0)
            {
                System.Data.DataTable dt = ds.Tables[0];
                foreach (System.Data.DataRow dr in dt.Rows)
                {
                    t = long.Parse(dr[3].ToString());
                    if (t > 0)
                    {
                        foreach (AVirtualSection av in obj.VirtualSectionList)
                        {
                            if (dr[2].ToString().Equals(av.SiteID))
                            {
                                stopTime = av.SiteObj.getStopTime(t);
                            }
                        }

                        if (Time.DateTime2DbTime(System.DateTime.Now) - stopTime < 24 * 3600)
                        {
                            log[N].uuid       = dr[0].ToString();
                            log[N].section_id = dr[1].ToString();
                            log[N].site_id    = dr[2].ToString();
                            log[N].logtime    = long.Parse(dr[3].ToString());
                            log[N].tm1        = long.Parse(dr[4].ToString());
                            log[N].tm2        = long.Parse(dr[5].ToString());
                            log[N].note       = dr[6].ToString();
                            log[N].lift_time  = dr[7].ToString();
                            log[N].lift_value = dr[8].ToString();
                            log[N].level      = dr[9].ToString();
                            N++;
                        }
                    }
                }
            }
            return(log);
        }
Beispiel #3
0
 public frmRegDlg(ASectionObj obj)
 {
     m_pSectonObj = obj;
     InitializeComponent();
 }
Beispiel #4
0
 public CVirtualSection(string path, ASectionObj obj)
 {
     m_pSectionObj = obj;
     m_pJsonPath   = path;
     ReadJson();
 }