public int ChangeOrderBy(string id, string ordertype)
        {
            string procname = "Proc_DepartMoveUpDown";//存储过程名称

            SqlParameter[] parameters =
            {
                new SqlParameter("@Id",        SqlDbType.Int),
                new SqlParameter("@orderType", SqlDbType.Int),
                new SqlParameter("@rowcc",     SqlDbType.Int)
            };
            parameters[0].Value     = id;
            parameters[1].Value     = ordertype;
            parameters[2].Direction = ParameterDirection.Output;
            int RecordsAffected = 0;

            try
            {
                DbHelperSQL.ChangeOrderByExecute(procname, parameters);
                RecordsAffected = (int)parameters[2].Value;
            }
            catch (Exception ex)
            {
                string s = ex.Message;
            }
            return(RecordsAffected);
        }
Beispiel #2
0
        public int SchGradeUpdate(string id)
        {
            string procname = "SchGradeUp";//存储过程名称

            SqlParameter[] parameters =
            {
                new SqlParameter("@Id", SqlDbType.Int)    //,
                //new SqlParameter("@orderType", SqlDbType.Int),
                //new SqlParameter("@rowcc", SqlDbType.Int)
            };
            parameters[0].Value = id;
            //parameters[1].Value = ordertype;
            //parameters[2].Direction = ParameterDirection.Output;
            int RecordsAffected = 0;

            try
            {
                DbHelperSQL.ChangeOrderByExecute(procname, parameters);
                RecordsAffected = (int)parameters[2].Value;
            }
            catch (Exception ex)
            {
                string s = ex.Message;
            }
            return(RecordsAffected);
        }
        public int ProcAdd(string UserName, string RecUser, string FromType, string ServiceId, int ServMonth, int FeeM, string donote)
        {
            string procname = "ServForDo";

            SqlParameter[] parameters =
            {
                new SqlParameter("@UserName",  SqlDbType.VarChar,   20),
                new SqlParameter("@FromType",  SqlDbType.VarChar,   10),
                new SqlParameter("@RecUser",   SqlDbType.VarChar,   10),
                new SqlParameter("@ServiceId", SqlDbType.VarChar,   10),
                new SqlParameter("@ServMonth", SqlDbType.Int),
                new SqlParameter("@FeeM",      SqlDbType.Int),
                new SqlParameter("@DoNote",    SqlDbType.VarChar, 2000),
                new SqlParameter("@Rowid",     SqlDbType.Int),
            };
            parameters[0].Value     = UserName;
            parameters[1].Value     = FromType;
            parameters[2].Value     = RecUser;
            parameters[3].Value     = ServiceId;
            parameters[4].Value     = ServMonth;
            parameters[5].Value     = FeeM;
            parameters[6].Value     = donote;
            parameters[7].Direction = ParameterDirection.Output;
            int RecordsAffected = 0;

            try
            {
                DbHelperSQL.ChangeOrderByExecute(procname, parameters);
                RecordsAffected = (int)parameters[7].Value;
            }
            catch (Exception ex)
            {
                string s = ex.Message;
            }
            return(RecordsAffected);
        }