Beispiel #1
0
 public int update(IConnection pConn, int pUpdateUserID)
 {
     this._UpdateBy = pUpdateUserID;
     this._UpdateTime = DateTime.Now;
     string SqlStr;
     int result=0;
     SqlStr = " UPDATE goods_groups SET " +
         " GroupName = " + DbMgr.formatDbString(_GroupName) +
         " ,IsActive = " + DbMgr.formatDbBool(_IsActive) +
         " ,TypeID = " + DbMgr.formatDbID(_TypeID) +
         " ,UpdateTime = " + DbMgr.formatDbDateTime(_UpdateTime) +
         " ,UpdateBy = " + DbMgr.formatDbID(_UpdateBy) +
         " WHERE GroupID = " +  _GroupID.ToString() ;
     result = pConn.exeNonQuery(SqlStr);
     return result;
 }
Beispiel #2
0
 public int delete(IConnection pConn)
 {
     string SqlStr;
     int result=0;
     SqlStr = " DELETE FROM goods_groups" +
         " WHERE GroupID = " +  _GroupID.ToString() ;
     result = pConn.exeNonQuery(SqlStr);
     return result;
 }
Beispiel #3
0
 public int deActive(IConnection pConn, int pUpdateUserID)
 {
     this._UpdateBy = pUpdateUserID;
     string SqlStr;
     int result=0;
     SqlStr = "UPDATE goods_groups SET IsActive = 'N' " +
         " ,UpdateTime = " + DbMgr.formatDbGetDate() +
         " ,UpdateBy = " + _UpdateBy.ToString() +
         " WHERE GroupID = " +  _GroupID.ToString() ;
     result = pConn.exeNonQuery(SqlStr);
     return result;
 }
Beispiel #4
0
 public int update(IConnection pConn, int pUpdateUserID)
 {
     this._UpdateBy = pUpdateUserID;
     this._UpdateTime = DateTime.Now;
     string SqlStr;
     int result=0;
     SqlStr = " UPDATE goods SET " +
         " GoodsCode = " + DbMgr.formatDbString(_GoodsCode) +
         " ,GoodsName = " + DbMgr.formatDbString(_GoodsName) +
         " ,GoodsDesc = " + DbMgr.formatDbString(_GoodsDesc) +
         " ,GoodsPcs = " + DbMgr.formatDbString(_GoodsPcs) +
         " ,Price = " + _Price.ToString() +
         " ,Qty = " + _Qty.ToString() +
         " ,GoodsIMG = " + DbMgr.formatDbString(_GoodsIMG) +
         " ,GroupID = " + DbMgr.formatDbID(_GroupID) +
         " ,UpdateTime = " + DbMgr.formatDbDateTime(_UpdateTime) +
         " ,UpdateBy = " + DbMgr.formatDbID(_UpdateBy) +
         " WHERE GoodsCode = " +  DbMgr.formatDbString(_OldGoodsCode) ;
     result = pConn.exeNonQuery(SqlStr);
     return result;
 }
Beispiel #5
0
 public int delete(IConnection pConn)
 {
     string SqlStr;
     int result=0;
     SqlStr = " DELETE FROM goods" +
         " WHERE GoodsCode = " +  DbMgr.formatDbString(_OldGoodsCode) ;
     result = pConn.exeNonQuery(SqlStr);
     return result;
 }
Beispiel #6
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(GoodsCode, GoodsName, GoodsDesc, GoodsPcs, Price, Qty, GoodsIMG, GroupID, CreateTime, CreateBy, UpdateTime, UpdateBy) VALUES(" +
         DbMgr.formatDbString(_GoodsCode)  +
         ", " + DbMgr.formatDbString(_GoodsName)  +
         ", " + DbMgr.formatDbString(_GoodsDesc)  +
         ", " + DbMgr.formatDbString(_GoodsPcs)  +
         ", " + DbMgr.formatDbDecimal(_Price)  +
         ", " + _Qty.ToString()  +
         ", " + DbMgr.formatDbString(_GoodsIMG)  +
         ", " + DbMgr.formatDbID(_GroupID) +
         ", " + DbMgr.formatDbDateTime(_CreateTime) +
         ", " + DbMgr.formatDbID(_CreateBy) +
         ", " + DbMgr.formatDbDateTime(_UpdateTime) +
         ", " + DbMgr.formatDbID(_UpdateBy) +
         ")";
     result = pConn.exeNonQuery(SqlStr);
     return result;
 }