Exemple #1
0
    public void SetValue(string no, VideoPatrolLogInfo info, GameObject detailLogPanel, GameObject showPicturePanel)
    {
        this.info     = info;
        No.text       = info.id;
        Person.text   = info.person;
        Date.text     = info.startDate;
        PlanName.text = info.planName;
        if (info.exception == "正常")
        {
            Exception.value = true;
        }
        else
        {
            Exception.value = false;
        }

//		DetailLogPanel = detailLogPanel;
        ShowPicturePanel = showPicturePanel;
//		UIEventListener.Get (gameObject).onClick = ShowDetailLogPanel;
//		UIEventListener.Get (ViewPicture).onClick = OpenDirectory;
//		if(int.Parse(no) % 2 == 0)
//		{
//			Background2.SetActive(true);
//		}
//		else
//		{
//			Background1.SetActive(true);
//		}
    }
Exemple #2
0
    private void CreatrVideoItem(VideoPatrolLogInfo info, int i)
    {
        GameObject go = Instantiate(VideoPatrolItemPrefab) as GameObject;

        VideoPatrolLogGrid.AddChild(go.transform);
        go.transform.localScale = new Vector3(1, 1, 1);
        go.GetComponent <VideoPatrolLogItem>().SetValue("" + (i + 1), info, null, ShowPictruePanel);    //VideoPatrolDetailLogPanel,ShowPictruePanel);
    }
    /// <summary>
    /// 检索指定条件的数据
    /// </summary>
    /// <param name="dateFrom">开始日期</param>
    /// <param name="dateTo">结束日期</param>
    /// <param name="person">执行人</param>
    public void Select001(string dateFrom, string dateTo, string select)
    {
        Result = new List <VideoPatrolLogInfo> ();
        string sql = "select ID,PERSON,STARTDATE,PLANNAME,EXCEPTION from CYGJ_VIDEO_PATROL_LOG where ";

        string where1 = "STARTDATE >= '" + dateFrom + "'";
        string where2 = "STARTDATE <= '" + dateTo + " 23:59:59'";
        string where3 = "PERSON LIKE '%" + select + "%'" + " or ID LIKE '%" + select + "%'" + " or PLANNAME LIKE '%" + select + "%'";
        string where4 = "PLANNAME <> " + "' '";

        if (dateFrom.Trim() != "" || dateTo.Trim() != "" || select.Trim() != "")
        {
            if (dateFrom.Trim() != "")
            {
                sql += where1 + " and ";
            }
            if (dateTo.Trim() != "")
            {
                sql += where2 + " and ";
            }
            if (select.Trim() != "")
            {
                sql += where3 + " and ";
            }

            sql += where4 + " order by STARTDATE asc";
        }
        else
        {
            sql += where4 + " order by STARTDATE desc";
        }

        DataSet ds = OdbcDataManager.Instance.odbcOra.ReturnDataSet(sql, "CYGJ_VIDEO_PATROL_LOG");

        if (ds.Tables.Count > 0)
        {
            DataTable dt = ds.Tables[0];
            foreach (DataRow dr in dt.Rows)
            {
                VideoPatrolLogInfo info = new VideoPatrolLogInfo();
                info.id        = dr["ID"].ToString();
                info.person    = dr["PERSON"].ToString();
                info.startDate = dr["STARTDATE"].ToString();
                info.planName  = dr["PLANNAME"].ToString();
                info.exception = dr["EXCEPTION"].ToString();

                Result.Add(info);
            }
        }

        Logger.Instance.WriteLog("检索指定条件的视频巡逻方案执行日志。检索件数:" + Result.Count);
    }
Exemple #4
0
    public void SetValue(VideoPatrolLogInfo PatrolLogInfo)
    {
        Logger.Instance.WriteLog("加载视频巡航日志");
        Person.text   = PatrolLogInfo.person;
        PlanName.text = PatrolLogInfo.planName;

        DetailLogGrid.transform.DestroyChildren();

        VideoPatrolDetailLogDao vpdlDao = new VideoPatrolDetailLogDao();

        vpdlDao.Select001(PatrolLogInfo.id);
        VideoPatrolDetailLogInfo info;
        GameObject go;

        for (int i = 0; i < vpdlDao.Result.Count; i++)
        {
            info = vpdlDao.Result[i];
            go   = Instantiate(VideoPatrolDetailLogItemPrefab) as GameObject;
            DetailLogGrid.AddChild(go.transform);
            go.transform.localScale = new Vector3(1, 1, 1);
            go.GetComponent <VideoPatrolDetailLogItem>().SetValue((i + 1) + "", info);
        }
    }