/// <summary>
/// 增加一条记录事务处理
/// </summary>
public DictionaryEntry TAdd(Model.CSA.CSA_FEE_LIST model)
{
DictionaryEntry deTrans = new DictionaryEntry();
StringBuilder strSql = new StringBuilder();
strSql.Append("insert into CSA_FEE_LIST(");
strSql.Append("VOYAGEID,FEEID,FEE,REMARKS)");
strSql.Append(" values (");
strSql.Append(":VOYAGEID,:FEEID,:FEE,:REMARKS)");
OracleParameter[] parameters = {
new OracleParameter(":VOYAGEID", OracleType.Number),
new OracleParameter(":FEEID", OracleType.Number),
new OracleParameter(":FEE", OracleType.Number),
new OracleParameter(":REMARKS", OracleType.VarChar)
};
parameters[0].Value = model.VOYAGEID;
parameters[1].Value = model.FEEID;
parameters[2].Value = model.FEE;
parameters[3].Value = model.REMARKS;
deTrans.Key = strSql.ToString()+"--"+Guid.NewGuid().ToString();
deTrans.Value = parameters;
return deTrans;
}
int voyageID;
voyageID = Convert.ToInt32(StringHelp.StringRequest(Request["VoyageID"]));
CSA_FEE_LISTBLL cfBll = new CSA_FEE_LISTBLL();
CSA_FEE_LIST cf = new CSA_FEE_LIST();
Hashtable htTrans = new Hashtable();
#region 添加费用
//系解缆费
cf.VOYAGEID = voyageID;
cf.FEE = Convert.ToDouble(this.tbxMUCharge.Text);
cf.FEEID = 1;
htTrans.Add(cfBll.TAdd(cf).Key, cfBll.TAdd(cf).Value);
//停泊费
cf.VOYAGEID = voyageID;
cf.FEE = Convert.ToDouble(this.tbxBerthingCharge.Text);
cf.FEEID = 2;
//处理事务
DbHelperSQL.ExecuteSqlTran(htTrans);