コード例 #1
0
ファイル: UserMenuBLL.cs プロジェクト: mrlongth/Work_003
        public void Delete(int sintUserid, ref SqlTransaction trans)
        {
            SqlParameter[] parms =
            {
                new SqlParameter("pUserID", SqlDbType.SmallInt, 2, ParameterDirection.Input, false, 5, 0, "UserID", DataRowVersion.Current, sintUserid)
            };

            SqlServerDAL.ExecuteNonQuery(trans,
                                         CommandType.StoredProcedure,
                                         "sp_UserMenuDelete",
                                         parms);
        }
コード例 #2
0
ファイル: UserMenuBLL.cs プロジェクト: mrlongth/Work_003
        public void Update(int sintUserid, int sintMenuid, char strCanview, char strCaninsert, char strCanedit, char strCandelete, char strCanapprove, char strCanextra, string strCreatedby, ref SqlTransaction trans)
        {
            SqlParameter[] parms =
            {
                new SqlParameter("pUserID",     SqlDbType.SmallInt,  2, ParameterDirection.Input, false, 5, 0, "UserID",     DataRowVersion.Current, sintUserid),
                new SqlParameter("pMenuID",     SqlDbType.SmallInt,  2, ParameterDirection.Input, false, 5, 0, "MenuID",     DataRowVersion.Current, sintMenuid),
                new SqlParameter("pCanView",    SqlDbType.VarChar,   1, ParameterDirection.Input, false, 0, 0, "CanView",    DataRowVersion.Current, strCanview),
                new SqlParameter("pCanInsert",  SqlDbType.VarChar,   1, ParameterDirection.Input, false, 0, 0, "CanInsert",  DataRowVersion.Current, strCaninsert),
                new SqlParameter("pCanEdit",    SqlDbType.VarChar,   1, ParameterDirection.Input, false, 0, 0, "CanEdit",    DataRowVersion.Current, strCanedit),
                new SqlParameter("pCanDelete",  SqlDbType.VarChar,   1, ParameterDirection.Input, false, 0, 0, "CanDelete",  DataRowVersion.Current, strCandelete),
                new SqlParameter("pCanApprove", SqlDbType.VarChar,   1, ParameterDirection.Input, true,  0, 0, "CanApprove", DataRowVersion.Current, strCanapprove),
                new SqlParameter("pCanExtra",   SqlDbType.VarChar,   1, ParameterDirection.Input, false, 0, 0, "CanExtra",   DataRowVersion.Current, strCanextra),
                new SqlParameter("pUpdatedBy",  SqlDbType.NVarChar, 51, ParameterDirection.Input, true,  0, 0, "CreatedBy",  DataRowVersion.Current, strCreatedby)
            };

            SqlServerDAL.ExecuteNonQuery(trans,
                                         CommandType.StoredProcedure,
                                         "sp_UserMenuUpdate",
                                         parms);
        }