• DictionaryEntry>Hashtable说明


     /// <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);

  • 相关阅读:
    Vue开源项目库汇总【壮灬哥出品,必为精品】
    nginx配置
    找出判断数据是否有相同的值
    CSS设置文字不能被选中
    js怎么删数组固定的值
    IO流中File文件最常用和直接的用法
    JComboBox实现当前所选项功能和JFrame窗口释放资源的dispose()方法
    java中经常使用的Swing组件总结
    JTextArea利用JScrollpane增加文本域滚轮(滚动条)
    JFrame关闭程序就退出的设置
  • 原文地址:https://www.cnblogs.com/leischen/p/2293931.html
Copyright © 2020-2023  润新知