public void Add(LZDBFamilyMember model)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("insert into LZDB_JTCYXX(");
strSql.Append("XH,JTBH,XM,XB,YSQRGX,ZJLX,ZJHM,HYZK,JYZT,GZDW,SR,SFFTSR,SFFTMJ,YWJYST,STMC,GSZCH,HJH,XZZ,BZ,LLR,LRSJ,HJQRSJ,POXM,DIVORCEDATE,HJDZ)");
strSql.Append(" values (");
strSql.Append("SEQ_FAMILYMEMBER.NEXTVAL,:JTBH,:XM,:XB,:YSQRGX,:ZJLX,:ZJHM,:HYZK,:JYZT,:GZDW,:SR,:SFFTSR,:SFFTMJ,:YWJYST,:STMC,:GSZCH,:HJH,:XZZ,:BZ,:LLR,:LRSJ,:HJQRSJ,:POXM,:DIVORCEDATE,:HJDZ)");
strSql.Append(" RETURNING XH INTO :ID");
OracleParameter idParameter = new OracleParameter("ID", OracleType.Number);
idParameter.Direction = ParameterDirection.Output;
OracleParameter[] parameters =
{
new OracleParameter(":JTBH", OracleType.Number, 20),
new OracleParameter(":XM", OracleType.VarChar, 50),
new OracleParameter(":XB", OracleType.VarChar, 3),
new OracleParameter(":YSQRGX", OracleType.VarChar, 15),
new OracleParameter(":ZJLX", OracleType.VarChar, 20),
new OracleParameter(":ZJHM", OracleType.VarChar, 30),
new OracleParameter(":HYZK", OracleType.VarChar, 20),
new OracleParameter(":JYZT", OracleType.VarChar, 15),
new OracleParameter(":GZDW", OracleType.VarChar, 150),
new OracleParameter(":SR", OracleType.Number, 7),
new OracleParameter(":SFFTSR", OracleType.Number, 1),
new OracleParameter(":SFFTMJ", OracleType.Number, 1),
new OracleParameter(":YWJYST", OracleType.Number, 1),
new OracleParameter(":STMC", OracleType.VarChar, 150),
new OracleParameter(":GSZCH", OracleType.VarChar, 80),
new OracleParameter(":HJH", OracleType.VarChar, 80),
new OracleParameter(":XZZ", OracleType.Number, 15),
new OracleParameter(":BZ", OracleType.VarChar, 150),
new OracleParameter(":LLR", OracleType.VarChar, 50),
new OracleParameter(":LRSJ", OracleType.DateTime),
new OracleParameter(":HJQRSJ", OracleType.DateTime),
new OracleParameter(":POXM", OracleType.VarChar, 80),
new OracleParameter(":DIVORCEDATE", OracleType.DateTime),
new OracleParameter(":HJDZ", OracleType.Number),
idParameter
};
// parameters[0].Value = model.ID;
parameters[0].Value = model.JTBH;
parameters[1].Value = model.Name;
parameters[2].Value = model.SexIndex;
parameters[3].Value = model.RelationOfIndex;
parameters[4].Value = model.CardTypeIndex;
parameters[5].Value = model.CardNo;
parameters[6].Value = model.MaritalStatusIndex;
parameters[7].Value = model.JYZT;
parameters[8].Value = model.GZDW;
parameters[9].Value = model.SR;
parameters[10].Value = model.SFFTSR;
parameters[11].Value = model.SFFTMJ;
parameters[12].Value = model.YWJYST;
parameters[13].Value = model.STMC;
parameters[14].Value = model.GSZCH;
parameters[15].Value = model.HJH;
parameters[16].Value = model.XZZ;
parameters[17].Value = model.BZ;
parameters[18].Value = model.LLR;
parameters[19].Value = model.LRSJ;
parameters[20].Value = model.HJQRSJ;
parameters[21].Value = model.POXM;
parameters[22].Value = model.DivorceDate;
parameters[23].Value = model.HJDZIndex;
DataSourceUtil.ExcuteNoQueryEx(this.DataSource, CommandType.Text, strSql.ToString(), parameters);
model.ID = idParameter.Value.ToLocInt();
model.ObjectState = HT.BizModels.BaseObject.ObjectStateType.Unchanged;
}