首页 新闻 会员 周边 捐助

关于MProc参数如何赋值问题

0
[待解决问题]

想找原代码改成CQY方法

                    connection.Open();
                    dbTransaction = connection.BeginTransaction();
                    try
                    {
                        for (int i = 0; i < sqls.Length; i++)
                        {
                            StringBuilder builder = (StringBuilder)sqls[i];
                            if (builder != null)
                            {
                                SqlParam[] paramArray = (SqlParam[])param[i];
                                DbCommand sqlStringCommand = this.db.GetSqlStringCommand(builder.ToString());
                                //Insert Into sys_important_Logs(SyslogsId,OperationType) Values (@SyslogsId,@OperationType)
                                DbCommon.AddInParameter(db, sqlStringCommand, paramArray);
                                this.db.ExecuteNonQuery(sqlStringCommand, dbTransaction);
                            }
                        }
                        dbTransaction.Commit();

 

请问如何改

                            using (MProc proc = new MProc("Insert Into sys_important_Logs(SyslogsId,OperationType) Values (@SyslogsId,@OperationType)"))
                            {
                               ??参数如何赋值
                                proc.ExeNonQuery();

                            }

 

zjs33的主页 zjs33 | 菜鸟二级 | 园豆:202
提问于:2016-08-18 15:13
< >
分享
所有回答(1)
0

proc.Set("SyslogsId",value,DBType.Int32).Set("OperationType",value,DbType.String)

路过秋天 | 园豆:4787 (老鸟四级) | 2016-08-18 15:15
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册