value(:字段)中的冒号是啥意思。。或者这么写的作用是》??
private Boolean SaveBaseInfo(){
OracleDB db = new OracleDB();
string cmd = "SELECT * FROM LFSMELTBASEINFO WHERE JLCLH = '" + baseInfo.CLH + "'";
DBTable dt = db.Select(cmd);
int num = dt.RowCount;
if (num == 0)
{
cmd = "INSERT INTO LFSMELTBASEINFO (" +
"JLCLH, LH, CLH, GZ, BZLX," +
"ZH, GBH, GBCS, LGCS, BC, BZ, " +
"DZGSZL, DZSJ, CZSJ, YLKSSJ, YLJSSJ," +
"CGGSZL, DHL, CYL, CDL, TDSJ, YLSJ, " +
"CYSJ, DZWD, CZWD, CGYH, YLTJ, SYJH, " +
"JSTJ, QTGD, APP, GENO,GKNO,"+
"OPERATOR,YINGSHI,DIANSHI,FANTU,SHIHUI,"+
"MAIHUZHA_CODE,WEIGHT_MAIHUZHA,BAOWENJI_CODE,WEIGHT_BOWENJI,CEWENTOU,"+
"OUTOU,QUYANGQI,POWER_A,POWER_B,POWER_C,"+
"LUGAI_YALI,LUGAI_LIULIANG,OXYGEN_VALUE_FOR_ARRIVAL,ZHAHOU,XLOOP,"+
"AY1, AY2) VALUES(" +
":JLCLH, :LH, :CLH, :GZ, :BZLX," +
":ZH, :GBH, :GBCS, :LGCS, :BC, :BZ," +
":DZGSZL, :DZSJ, :CZSJ, :YLKSSJ, :YLJSSJ," +
":CGGSZL, :DHL, :CYL, :CDL, :TDSJ, :YLSJ," +
":CYSJ, :DZWD, :CZWD, :CGYH, :YLTJ, :SYJH," +
":JSTJ, :QTGD, :APP, :GENO,:GKNO," +
":OPERATOR,:YINGSHI,:DIANSHI,:FANTU,:SHIHUI," +
":MAIHUZHA_CODE,:WEIGHT_MAIHUZHA,:BAOWENJI_CODE,:WEIGHT_BOWENJI,:CEWENTOU," +
":OUTOU,:QUYANGQI,:POWER_A,:POWER_B,:POWER_C," +
":LUGAI_YALI,:LUGAI_LIULIANG,:OXYGEN_VALUE_FOR_ARRIVAL,:ZHAHOU,:XLOOP," +
":AY1, :AY2)";
}
else
{
cmd = "UPDATE LFSMELTBASEINFO SET " +
"CLH = :CLH, LH = :LH, GZ = :GZ, BZLX = :BZLX, " +
"ZH = :ZH, GBH = :GBH, GBCS = :GBCS, LGCS = :LGCS, BC = :BC, BZ = :BZ," +
"DZGSZL = :DZGSZL, DZSJ = :DZSJ, CZSJ = :CZSJ, YLKSSJ = :YLKSSJ, YLJSSJ = :YLJSSJ, " +
"CGGSZL = :CGGSZL, DHL = :DHL, CYL = :CYL, CDL = :CDL, TDSJ = :TDSJ, YLSJ = :YLSJ, " +
"CYSJ = :CYSJ, DZWD = :DZWD, CZWD = :CZWD, CGYH = :CGYH, YLTJ = :YLTJ, SYJH = :SYJH, " +
"JSTJ = :JSTJ, QTGD = :QTGD, APP = :APP,GENO = :GENO,GKNO = :GKNO," +
"OPERATOR = :OPERATOR,YINGSHI = :YINGSHI,DIANSHI = :DIANSHI,FANTU = :FANTU,SHIHUI = :SHIHUI," +
"MAIHUZHA_CODE = :MAIHUZHA_CODE,WEIGHT_MAIHUZHA = :WEIGHT_MAIHUZHA,BAOWENJI_CODE = :BAOWENJI_CODE,WEIGHT_BOWENJI = :WEIGHT_BOWENJI,CEWENTOU = :CEWENTOU," +
"OUTOU = :OUTOU,QUYANGQI = :QUYANGQI,POWER_A = :POWER_A,POWER_B = :POWER_B,POWER_C = :POWER_C," +
"LUGAI_YALI = :LUGAI_YALI,LUGAI_LIULIANG = :LUGAI_LIULIANG,OXYGEN_VALUE_FOR_ARRIVAL = :OXYGEN_VALUE_FOR_ARRIVAL,ZHAHOU = :ZHAHOU,XLOOP = :XLOOP, AY1 = :AY1, AY2 = :AY2 WHERE JLCLH = :JLCLH";
}
if (baseInfo.CLH == null) baseInfo.CLH = baseInfo.LH + DateTime.Now.ToString("HHmmss");
num = db.ExecNonQuery(cmd,
"JLCLH", System.Data.OracleClient.OracleType.VarChar, baseInfo.CLH,
"LH", System.Data.OracleClient.OracleType.VarChar, baseInfo.LH,
"CLH", System.Data.OracleClient.OracleType.VarChar, baseInfo.JLH,
"GZ", System.Data.OracleClient.OracleType.VarChar, baseInfo.GZ,
"BZLX", System.Data.OracleClient.OracleType.VarChar, baseInfo.BZ,
"ZH", System.Data.OracleClient.OracleType.VarChar, (VechNum + 1).ToString(),
"GBH", System.Data.OracleClient.OracleType.VarChar, deviceInfo.GBH,
"GBCS", System.Data.OracleClient.OracleType.Int32, deviceInfo.GBCS,
"LGCS", System.Data.OracleClient.OracleType.Int32, deviceInfo.LGCS,
"BC", System.Data.OracleClient.OracleType.VarChar, (int)others.BB,
"BZ", System.Data.OracleClient.OracleType.VarChar, (int)others.BC,
"DZGSZL", System.Data.OracleClient.OracleType.Float, inInfo.JZZL,
"DZSJ", System.Data.OracleClient.OracleType.DateTime, inInfo.JZSJ,
"CZSJ", System.Data.OracleClient.OracleType.DateTime, outInfo.CZSJ,
"YLKSSJ", System.Data.OracleClient.OracleType.DateTime, inInfo.JZSJ.AddSeconds(conInfo.SDKSSJ),
"YLJSSJ", System.Data.OracleClient.OracleType.DateTime, inInfo.JZSJ.AddSeconds(conInfo.SDKSSJ + conInfo.TDSJ),
"CGGSZL", System.Data.OracleClient.OracleType.Float, outInfo.CZZL,
"DHL", System.Data.OracleClient.OracleType.Float, conInfo.DH,
"CYL", System.Data.OracleClient.OracleType.Float, conInfo.YH,
"CDL", System.Data.OracleClient.OracleType.Float, 0,
"TDSJ", System.Data.OracleClient.OracleType.Int32, conInfo.TDSJ,
"YLSJ", System.Data.OracleClient.OracleType.Int32, conInfo.YLSJ,
"CYSJ", System.Data.OracleClient.OracleType.Int32, conInfo.YLSJ,
"DZWD", System.Data.OracleClient.OracleType.Int32, inInfo.JZWD,
"CZWD", System.Data.OracleClient.OracleType.Int32, outInfo.CZWD,
"CGYH", System.Data.OracleClient.OracleType.VarChar, outInfo.CGYH,
"YLTJ", System.Data.OracleClient.OracleType.VarChar, others.YLTJ,
"SYJH", System.Data.OracleClient.OracleType.VarChar, others.SYJH,
"JSTJ", System.Data.OracleClient.OracleType.VarChar, others.JSTJ,
"QTGD", System.Data.OracleClient.OracleType.VarChar, others.QTGD,
"APP", System.Data.OracleClient.OracleType.VarChar, others.BZH,
"GENO", System.Data.OracleClient.OracleType.VarChar, jgInfo.GE,
"GKNO", System.Data.OracleClient.OracleType.VarChar, jgInfo.GK,
"OPERATOR", System.Data.OracleClient.OracleType.VarChar, jgInfo2.OPER,
"YINGSHI", System.Data.OracleClient.OracleType.Int32, jgInfo2.YS,
"DIANSHI", System.Data.OracleClient.OracleType.Int32, jgInfo2.DS,
"FANTU", System.Data.OracleClient.OracleType.Int32, jgInfo2.FT,
"SHIHUI", System.Data.OracleClient.OracleType.Int32, jgInfo2.SH,
"MAIHUZHA_CODE", System.Data.OracleClient.OracleType.VarChar, jgInfo2.MHZLX,
"WEIGHT_MAIHUZHA", System.Data.OracleClient.OracleType.Int32, jgInfo2.MHZ,
"BAOWENJI_CODE", System.Data.OracleClient.OracleType.VarChar, jgInfo2.BWJLX,
"WEIGHT_BOWENJI", System.Data.OracleClient.OracleType.Int32, jgInfo2.BWJ,
"CEWENTOU", System.Data.OracleClient.OracleType.Int32, jgInfo2.CWT,
"OUTOU", System.Data.OracleClient.OracleType.Int32, jgInfo2.TO,
"QUYANGQI", System.Data.OracleClient.OracleType.Int32, jgInfo2.QYQ,
"POWER_A", System.Data.OracleClient.OracleType.VarChar, (jgInfo.A_ELE ? "1" : "0"),
"POWER_B", System.Data.OracleClient.OracleType.VarChar, (jgInfo.B_ELE ? "1" : "0"),
"POWER_C", System.Data.OracleClient.OracleType.VarChar, (jgInfo.C_ELE ? "1" : "0"),
"LUGAI_YALI", System.Data.OracleClient.OracleType.Int32, (int)jgInfo.CoverPress,
"LUGAI_LIULIANG", System.Data.OracleClient.OracleType.Int32, (int)jgInfo.CoverFlow,
"OXYGEN_VALUE_FOR_ARRIVAL", System.Data.OracleClient.OracleType.Float, jgInfo.InO2,
"ZHAHOU", System.Data.OracleClient.OracleType.Float, jgInfo.SlagHeight,
"XLOOP", System.Data.OracleClient.OracleType.VarChar, jgInfo.XLOOP.ToString(),
"AY1", System.Data.OracleClient.OracleType.VarChar, null,
"AY2", System.Data.OracleClient.OracleType.VarChar, null
);
return num > 0;
}