Beispiel #1
0
 public int add(IConnection pConn, int pCreateUserID)
 {
     this._CreateBy = pCreateUserID;
     this._UpdateBy = pCreateUserID;
     this._CreateTime = DateTime.Now;
     this._UpdateTime = DateTime.Now;
     string SqlStr;
     int result = 0;
     SqlStr = "INSERT INTO goods_groups(GroupName, IsActive, TypeID, CreateTime, CreateBy, UpdateTime, UpdateBy) VALUES(" +
         DbMgr.formatDbString(_GroupName)  +
         ", " +  DbMgr.formatDbBool(_IsActive)  +
         ", " + DbMgr.formatDbID(_TypeID) +
         ", " + DbMgr.formatDbDateTime(_CreateTime) +
         ", " + DbMgr.formatDbID(_CreateBy) +
         ", " + DbMgr.formatDbDateTime(_UpdateTime) +
         ", " + DbMgr.formatDbID(_UpdateBy) +
         ")";
     result = pConn.exeInsertQuery(SqlStr,"goods_groups","GroupID");
     _GroupID = result;
     return result;
 }