示例#1
0
        public static IXMRK GetXMRKByID(int XMID)
        {
            string sql = string.Format("select XMName,LABH,to_char(LASJ,'yyyy-mm-dd') LASJ from CHXQ_XMTable where ID={0}", XMID);

            IDataBase pDataBase = HR.Utility.SysDBConfig.GetInstance().GetOleDataBase("OrclConn");
            DataTable ptable    = pDataBase.ExecuteQuery(sql).Tables[0];

            if (ptable.Rows.Count == 0)
            {
                return(null);
            }
            IXMRK pXMRK = new XMRKClass();

            (pXMRK as XMRKClass).FillByRow(ptable.Rows[0]);
            return(pXMRK);
        }
示例#2
0
        /*
         * public static IXMRK GetXMRKByTZBH(string TZBH)
         * {
         *  string sql = string.Format("select ObjectID,XMMC,XMBH,DM,BLC,to_char(CLSJ,'yyyy-mm-dd') CLSJ,"
         + "to_char(CTSJ,'yyyy-mm-dd') CTSJ,CLGS,CadPath,XMMJ,ZDMJ,TZBH,round(t.Shape.area,2) as Area  from xmyd t where TZBH='{0}'", TZBH);
         +  IDataBase pDataBase = HR.Utility.SysDBConfig.GetInstance().GetOleDataBase("SdeOrclConn");
         +  DataTable ptable = pDataBase.ExecuteQuery(sql).Tables[0];
         +  if (ptable.Rows.Count == 0) return null;
         +
         +  IXMRK pXMRK = new XMRKClass();
         +  (pXMRK as XMRKClass).FillByRow(ptable.Rows[0]);
         +  return pXMRK;
         + }*/
        public static IXMRK[] GetXMRKByXMBH(string XMBH)
        {
            string sql = string.Format("select ObjectID,XMMC,XMBH,DM,BLC,to_char(CLSJ,'yyyy-mm-dd') CLSJ,"
                                       + "to_char(CTSJ,'yyyy-mm-dd') CTSJ,CLGS,CadPath,XMMJ,ZDMJ,TZBH,round(t.Shape.area,2) as Area  from xmyd t where XMBH  like '{0}%' or XMBH='{0}'", XMBH);
            IDataBase pDataBase = HR.Utility.SysDBConfig.GetInstance().GetOleDataBase("SdeOrclConn");
            DataTable ptable    = pDataBase.ExecuteQuery(sql).Tables[0];

            if (ptable.Rows.Count == 0)
            {
                return(null);
            }

            IXMRK[] XMRKs = new IXMRK[ptable.Rows.Count];
            int     i     = 0;

            foreach (DataRow pRow in ptable.Rows)
            {
                IXMRK pXMRK = new XMRKClass();
                (pXMRK as XMRKClass).FillByRow(ptable.Rows[0]);
                XMRKs[i] = pXMRK;
                i++;
            }
            return(XMRKs);
        }
示例#3
0
        private void pXMTreeview_XMTreeViewOperEvent(object sender, XMTreeViewEventArgs e)
        {
            IXMRK pXMRK = XMRKClass.GetXMRKByID(e.XMID);

            FillByXMRK(pXMRK);
        }