/// <summary> /// 增加一条数据 /// </summary> public void AddChangeBillDataAttachment(ChangeBillDataAttachment ChangeBillDataAttachment, CommonInterface pcomm) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into ChangeBillDataAttachment("); strSql.Append("ChangeBillDataAttachmentGuID,ChangeBillGuID,FileGuID,FileSourceName,FileContent)"); strSql.Append(" values ("); strSql.Append("@ChangeBillDataAttachmentGuid,@ChangeBillGuID,@FileGuID,@FileSourceName,@FileContent)"); SqlParameter[] parameters = { new SqlParameter("@ChangeBillDataAttachmentGuID", SqlDbType.NVarChar, 50), new SqlParameter("@ChangeBillGuID", SqlDbType.NVarChar, 50), new SqlParameter("@FileGuID", SqlDbType.NVarChar, 50), new SqlParameter("@FileSourceName", SqlDbType.NVarChar, 100), new SqlParameter("@FileContent", SqlDbType.Image) }; parameters[0].Value = ChangeBillDataAttachment.ChangeBillDataAttachmentGuID; parameters[1].Value = ChangeBillDataAttachment.ChangeBillGuID; parameters[2].Value = ChangeBillDataAttachment.FileGuID; parameters[3].Value = ChangeBillDataAttachment.FileSourceName; parameters[4].Value = ChangeBillDataAttachment.FileContent; pcomm.ExecuteNonQueryBySqlParameters(strSql.ToString(), parameters); }