您的当前位置:首页正文

insert的使用

2020-06-17 来源:东饰资讯网
 public bool AddQDWL_FoundationInformationInfo(JHSoft.Model.FoundationInformation model) { StringBuilder strSql=new StringBuilder(); StringBuilder strSql1=new StringBuilder(); StringBuilder strSql2=new StringBuilder(); if (model.Name != null) { strSql1.Append(\"Name,\"); strSql2.Append(\"'\"+model.Name+\"',\"); } if (model.Value != null) { strSql1.Append(\"Value,\"); strSql2.Append(\"'\"+model.Value+\"',\"); } if (model.Type != null) { strSql1.Append(\"Type,\"); strSql2.Append(\"'\"+model.Type+\"',\"); } if (model.OrderID != null) { strSql1.Append(\"OrderID,\"); strSql2.Append(\"\"+model.OrderID+\ } if (model.Remarks != null) { strSql1.Append(\"Remarks,\"); strSql2.Append(\"'\"+model.Remarks+\"',\"); } strSql1.Append(\"DelFlag,\"); strSql2.Append(\"'0',\"); strSql.Append(\"insert into QDWL_FoundationInformation(\"); strSql.Append(strSql1.ToString().Remove(strSql1.Length - 1)); strSql.Append(\")\"); strSql.Append(\" values (\"); strSql.Append(strSql2.ToString().Remove(strSql2.Length - 1)); strSql.Append(\")\"); int obj = oper.ExecSQLReInt(strSql.ToString()); if (obj > 0) { return true; }

}

else { return false; }

因篇幅问题不能全部显示,请点此查看更多更全内容