Esempio n. 1
0
        public virtual Object Get()
        {
            string    sql     = RootLibrary.GetScriptGet(this);
            DataTable dtTable = Provider.ExecuteToDataTable(sql);

            if (dtTable.Rows.Count > 0)
            {
                return(RootLibrary.GetObjectValue(dtTable.Rows[0], this));
            }
            return(null);
        }
Esempio n. 2
0
        public static WebPage GetByPage(string page)
        {
            string    sql     = @"select * from QLCV_WebPage where Page='" + page + "' and Type='" + NumCode.UPWEB + "'";
            DataTable dtTable = ServerProvider.ExecuteToDataTable(sql);

            if (dtTable.Rows.Count > 0)
            {
                WebPage cus = new WebPage();
                return((WebPage)RootLibrary.GetObjectValue(dtTable.Rows[0], cus));
            }
            return(null);
        }
Esempio n. 3
0
        public static WebPage Get(long ID)
        {
            string    sql     = @"select * from QLCV_WebPage where ID=" + ID;
            DataTable dtTable = ServerProvider.ExecuteToDataTable(sql);

            if (dtTable.Rows.Count > 0)
            {
                WebPage cus = new WebPage();
                return((WebPage)RootLibrary.GetObjectValue(dtTable.Rows[0], cus));
            }
            return(null);
        }
Esempio n. 4
0
        public virtual Object[] GetAll()
        {
            string    sql     = RootLibrary.GetScriptGetAll(this);
            DataTable dtTable = Provider.ExecuteToDataTable(sql);

            Object[] objects = new Object[dtTable.Rows.Count];
            for (int i = 0; i < dtTable.Rows.Count; i++)
            {
                objects[i] = RootLibrary.GetObjectValue(dtTable.Rows[i], this);
            }
            return(objects);
        }
Esempio n. 5
0
        public virtual Object[] GetByField(String Field, Object Value)
        {
            String[] Fields = new String[1];
            Fields[0] = Field;
            Object[] Values = new Object[1];
            Values[0] = Value;
            string    sql     = RootLibrary.GetScriptGetByField(this, Fields, Values);
            DataTable dtTable = Provider.ExecuteToDataTable(sql);

            Object[] objects = new Object[dtTable.Rows.Count];
            for (int i = 0; i < dtTable.Rows.Count; i++)
            {
                objects[i] = RootLibrary.GetObjectValue(dtTable.Rows[i], this);
            }
            return(objects);
        }