示例#1
0
 public int Save(ProductSpec saveTemp) 
 {
     saveTemp.Replace4MySQL();
     StringBuilder stb = new StringBuilder("insert into product_spec (`spec_type`,`spec_name`,`spec_sort`,`spec_status`,`spec_id`,`spec_image`,`product_id`)");
     stb.AppendFormat(" values({0},'{1}',{2},{3},{4},'{5}',{6})", saveTemp.spec_type, saveTemp.spec_name, saveTemp.spec_sort, saveTemp.spec_status, saveTemp.spec_id, saveTemp.spec_image, saveTemp.product_id);
     return _dbAccess.execCommand(stb.ToString());
 }
示例#2
0
 public int UpdateSingle(ProductSpec uSpec)
 {
     uSpec.Replace4MySQL();
     StringBuilder stb = new StringBuilder("update product_spec");
     stb.AppendFormat(" set spec_image='{0}'", uSpec.spec_image);
     stb.AppendFormat(" where spec_id = {0};", uSpec.spec_id);
     return _dbAccess.execCommand(stb.ToString());
 }
示例#3
0
 public string Update(ProductSpec uSpec)
 {
     uSpec.Replace4MySQL();
     StringBuilder stb = new StringBuilder("update product_spec");
     stb.AppendFormat(" set spec_name='{0}',spec_sort={1},spec_status={2},spec_image='{3}'", uSpec.spec_name, uSpec.spec_sort, uSpec.spec_status, uSpec.spec_image);
     stb.AppendFormat(" where spec_id = {0};", uSpec.spec_id);
     return stb.ToString();
 }