示例#1
0
文件: SqlProvider.cs 项目: radtek/dms
        public static void CreateUpdateDeleteSysMenuDetail(SysMenuDetail item, DataProviderAction action)
        {
            if (item == null)
            {
                return;
            }

            SqlConnection conn = DBUtils.GetConnection();
            SqlCommand    cmd  = DBUtils.GetCommand();

            try
            {
                cmd.Transaction = conn.BeginTransaction();

                ArrayList paras = new ArrayList();

                paras.Add(DBUtils.MakeInParam("@Auth_ID", SqlDbType.SmallInt, item.AuthID));
                paras.Add(DBUtils.MakeInParam("@M_ID", SqlDbType.SmallInt, item.MID));
                paras.Add(DBUtils.MakeInParam("@Action", SqlDbType.Int, action));

                DBUtils.ExecuteNonQuery(conn, cmd, CommandType.StoredProcedure, PublicConsts.DatabaseOwner + ".P_CreateUpdateDelete_SysMenuDetail", paras);

                cmd.Transaction.Commit();
            }
            catch
            {
                cmd.Transaction.Rollback();
                throw;
            }
            finally
            {
                DBUtils.SetDispose(conn, cmd);
            }
        }
示例#2
0
 public void Add(SysMenuDetail item)
 {
     base.List.Add(item);
 }