首页上一页 1 下一页尾页 1 条记录 1/1页
我的问题是以下代码是VS2005自动生成的,还是程序员手打的,如果是自动生成的,是如何生成的?
发表在C#图书答疑
2009-02-04
是否精华
是
否
版块置顶:
是
否
//调用DataBase类中的MakeInParam方法为SqlParameter参数数组赋值
SqlParameter[] prams ={
data.MakeInParam("@UserId",SqlDbType.VarChar,20,UserId),
data.MakeInParam("@UserName",SqlDbType.VarChar,100,UserName),
data.MakeInParam("@UserPassword",SqlDbType.VarChar,50,UserPassword),
data.MakeInParam("@UserRole",SqlDbType.VarChar,50,UserRole),
data.MakeInParam("@UserPoint",SqlDbType.Int,4,UserPoint),
data.MakeInParam("@UserName1",SqlDbType.VarChar,100,UserName1),
data.MakeInParam("@UserSex",SqlDbType.Char,4,UserSex),
data.MakeInParam("@UserAge",SqlDbType.Int,4,UserAge),
data.MakeInParam("@UserIdCard",SqlDbType.VarChar,50,UserIdCard),
data.MakeInParam("@UserCountry",SqlDbType.VarChar,50,UserCountry),
data.MakeInParam("@UserProvince",SqlDbType.VarChar,50,UserProvince),
data.MakeInParam("@UserCity",SqlDbType.VarChar,50,UserCity),
data.MakeInParam("@UserComName",SqlDbType.VarChar,50,UserComName),
data.MakeInParam("@UserJob",SqlDbType.VarChar,50,UserJob),
data.MakeInParam("@UserComAdd",SqlDbType.VarChar,50,UserComAdd),
data.MakeInParam("@UserPostcode",SqlDbType.VarChar,50,UserPostcode),
data.MakeInParam("@UserFax",SqlDbType.VarChar,50,UserFax),
data.MakeInParam("@UserTelephone",SqlDbType.VarChar,50,UserTelephone),
data.MakeInParam("@UserMobile",SqlDbType.VarChar,50,UserMobile),
data.MakeInParam("@UserEmail",SqlDbType.VarChar,50,UserEmail),
data.MakeInParam("@UserMsn",SqlDbType.VarChar,50,UserMsn),
data.MakeInParam("@UserRegisterTime",SqlDbType.DateTime,8,UserRegisterTime),
data.MakeInParam("@UserRemark",SqlDbType.VarChar,100,UserRemark),
};
//调用DataBase类中的RunProc方法执行insert语句,并返回执行结果
return(data.RunPro("INSERT INTO tb_User(UserId,UserName,UserPassword,UserRole,UserPoint,UserName1,UserSex,UserAge,UserIdCard,UserCountry,UserProvince,UserCity,UserComName,UserJob,UserComAdd,UserPostcode,UserFax,UserTelephone,UserMobile,UserEmail,UserMsn,UserRegisterTime,UserRemark)"
+"VALUES(@UserId,@UserName,@UserPassword,@UserRole,@UserPoint,@UserName1,@UserSex,@UserAge,@UserIdCard,@UserCountry,@UserProvince,@UserCity,@UserComName,@UserJob,@UserComAdd,@UserPostcode,@UserFax,@UserTelephone,@UserMobile,@UserEmail,@UserMsn,@UserRegisterTime,@UserRemark)",prams));
}
SqlParameter[] prams ={
data.MakeInParam("@UserId",SqlDbType.VarChar,20,UserId),
data.MakeInParam("@UserName",SqlDbType.VarChar,100,UserName),
data.MakeInParam("@UserPassword",SqlDbType.VarChar,50,UserPassword),
data.MakeInParam("@UserRole",SqlDbType.VarChar,50,UserRole),
data.MakeInParam("@UserPoint",SqlDbType.Int,4,UserPoint),
data.MakeInParam("@UserName1",SqlDbType.VarChar,100,UserName1),
data.MakeInParam("@UserSex",SqlDbType.Char,4,UserSex),
data.MakeInParam("@UserAge",SqlDbType.Int,4,UserAge),
data.MakeInParam("@UserIdCard",SqlDbType.VarChar,50,UserIdCard),
data.MakeInParam("@UserCountry",SqlDbType.VarChar,50,UserCountry),
data.MakeInParam("@UserProvince",SqlDbType.VarChar,50,UserProvince),
data.MakeInParam("@UserCity",SqlDbType.VarChar,50,UserCity),
data.MakeInParam("@UserComName",SqlDbType.VarChar,50,UserComName),
data.MakeInParam("@UserJob",SqlDbType.VarChar,50,UserJob),
data.MakeInParam("@UserComAdd",SqlDbType.VarChar,50,UserComAdd),
data.MakeInParam("@UserPostcode",SqlDbType.VarChar,50,UserPostcode),
data.MakeInParam("@UserFax",SqlDbType.VarChar,50,UserFax),
data.MakeInParam("@UserTelephone",SqlDbType.VarChar,50,UserTelephone),
data.MakeInParam("@UserMobile",SqlDbType.VarChar,50,UserMobile),
data.MakeInParam("@UserEmail",SqlDbType.VarChar,50,UserEmail),
data.MakeInParam("@UserMsn",SqlDbType.VarChar,50,UserMsn),
data.MakeInParam("@UserRegisterTime",SqlDbType.DateTime,8,UserRegisterTime),
data.MakeInParam("@UserRemark",SqlDbType.VarChar,100,UserRemark),
};
//调用DataBase类中的RunProc方法执行insert语句,并返回执行结果
return(data.RunPro("INSERT INTO tb_User(UserId,UserName,UserPassword,UserRole,UserPoint,UserName1,UserSex,UserAge,UserIdCard,UserCountry,UserProvince,UserCity,UserComName,UserJob,UserComAdd,UserPostcode,UserFax,UserTelephone,UserMobile,UserEmail,UserMsn,UserRegisterTime,UserRemark)"
+"VALUES(@UserId,@UserName,@UserPassword,@UserRole,@UserPoint,@UserName1,@UserSex,@UserAge,@UserIdCard,@UserCountry,@UserProvince,@UserCity,@UserComName,@UserJob,@UserComAdd,@UserPostcode,@UserFax,@UserTelephone,@UserMobile,@UserEmail,@UserMsn,@UserRegisterTime,@UserRemark)",prams));
}