Beispiel #1
0
    private string GetTableID(string tableName, H3.IEngine engine)
    {
        if (Tableids.ContainsKey(tableName))
        {
            return(Tableids[tableName]);
        }
        if (engine == null)
        {
            return("");
        }
        string    sql   = string.Format("select tableID from " + RegisterTable + "  where tableName ='{0}'", tableName); //从RegisterTable取TableID
        DataTable dt    = engine.Query.QueryTable(sql, null);
        int       Count = dt.Rows.Count;

        if (Count > 0)
        {
            var r = (string)dt.Rows[0][0];
            Tableids.Add(tableName, r);
            return(r);
        }
        else
        {
            return("");
        }
    }
Beispiel #2
0
 public Schema(H3.IEngine Engine, string tableName)
 {
     this.Engine    = Engine;
     this.tableName = tableName;
     this.tableID   = GetTableID(tableName, Engine);
     this.IsLongID  = false;
     Init();
 }
Beispiel #3
0
    public Schema(H3.IEngine Engine, string tableID, bool IsLongID)
    {
        this.Engine   = Engine;
        this.tableID  = tableID;
        this.IsLongID = IsLongID;
        var shortID = IsLongID ? tableID.Substring(appID.Length) : tableID;

        this.tableName = GetTableName(shortID);
        Init();
    }
Beispiel #4
0
    public Schema(H3.IEngine Engine, H3.DataModel.BizObject bizObject)
    {
        this.Engine   = Engine;
        CurrentRow    = bizObject;
        this.tableID  = (string)bizObject.Schema.SchemaCode;
        this.IsLongID = true;
        TableSchema   = bizObject.Schema;
        var shortID = IsLongID ? tableID.Substring(appID.Length) : tableID;

        this.tableName = GetTableName(shortID);
        Init(false);
    }
Beispiel #5
0
    public Schema(H3.IEngine Engine, H3.DataModel.BizObject bizObject, H3.SmartForm.ListViewPostValue postData)
    {
        this.Engine            = Engine;
        CurrentRow             = bizObject;
        this.tableID           = bizObject.Schema.SchemaCode;
        this.IsLongID          = true;
        TableSchema            = bizObject.Schema;
        this.CurrentPostValue2 = postData;
        var shortID = IsLongID ? tableID.Substring(appID.Length) : tableID;

        this.tableName = GetTableName(shortID);
        Init(false);
    }
Beispiel #6
0
 public Dispatch(H3.IEngine Engine, string ID)
 {
     this.Engine = Engine;
     this.ID     = ID;
     inti();
 }
Beispiel #7
0
 public Dispatch(H3.IEngine Engine)
 {
     this.Engine = Engine;
 }