传递参数ID是总是空的
来源:互联网 发布:沙宣发型设计软件 编辑:程序博客网 时间:2024/04/30 14:23
public partial class RefuseOrdersEdit : BaseAdmin
{
protected SmartShop.Entity.RefuseOrders obj_refuseorder = new SmartShop.Entity.RefuseOrders();
protected SmartShop.Entity.Orders obj_order = new SmartShop.Entity.Orders();
protected new int ID;
protected int OrdersTypeID;
protected string url;
protected DataTable dt_backorderdetail = new DataTable();
protected DataTable dt_refusedetail;
protected string endscript;
protected decimal payableprice; //已付金额
protected StringBuilder Str_endscript_orderdetail, Str_endscript_stock, Str_endscript_finance;
protected int productmodifing;//是否在修改产品 1 是 0否
protected void Page_Load(object sender, EventArgs e)
{
ID = GetQueryForInt("ID", 0);
OrdersTypeID = GetQueryForInt("OrdersTypeID", 0);
productmodifing = GetQueryForInt("productmodifing", 0);
url = "RefuseOrdersEdit.aspx?ID=" + ID + "&OrdersTypeID" + OrdersTypeID;
url = Server.UrlEncode(url);
if (!IsPostBack)
{
if (ID == 0)
{
Response.Redirect("message.aspx?msg='参数id不能为空!'&url=RefuseOrdersDetail.aspx?OrdersTypeID=" + OrdersTypeID);
}
else
{
obj_refuseorder = SmartShop.BusLogic.RefuseOrdersLogic.GetEntity(ID);
obj_order = SmartShop.BusLogic.OrdersLogic.GetEntity(obj_refuseorder.OrderID);
dt_backorderdetail = SmartShop.BusLogic.RefuseOrdersDetailLogic.GetDataTableByRefuseOrdersID(ID);
}
obj_order = SmartShop.BusLogic.OrdersLogic.GetEntity(obj_refuseorder.OrderID);
}
RefuseOrdersDetail.aspx添加功能部分代码:
int backorderid = SmartShop.BusLogic.RefuseOrdersLogic.Add(obj_backorder);
bool result = SmartShop.BusLogic.RefuseOrdersDetailLogic.Add(backorderid, ShoppingCookiesStr);
if (result)
{
// 修改订单状态
SmartShop.BusLogic.OrdersLogic.PiliangStatusTo(OrderID.ToString(), 12);
SmartShop.ClassLibrary.JCookie.RemoveCookie("ShoppingCookiesStr");
Response.Redirect("message.aspx?msg='添加成功!'&url=RefuseOrdersEdit.aspx?=ID " + backorderid);
}
else
{
Response.Redirect("message.aspx?msg='添加失败!'&url=RefuseOrdersDetail.aspx");
}
/// <summary>
/// 获取int类型的Url传值
/// </summary>
/// <param name="param">参数名称</param>
/// <param name="defaultValue">默认值,当但没有得到传值时的默认返回值</param>
protected int GetQueryForInt(string param, int defaultValue)
{
try
{
if (Request.QueryString[param] != null && Request.QueryString[param] != "")
return int.Parse(Request.QueryString[param].ToString());
else
return defaultValue;
}
catch
{
return 0;
}
}
问题是:当添加成功时,提示添加成功,然后跳转到RefuseOrdersEdit .aspx页面,跳转是总是提示id为空。、
- 传递参数ID是总是空的
- 关于传递参数是出现id[]问题
- XFIRE 客户端 传递参数是对象 传递参数的对象所在包路径必须和服务端包路径一样。不然就出现传递过去对象值为空。
- 指针参数是如何传递内存的?
- java 参数是如何传递的
- 指针参数是如何传递内存的?
- 指针参数是如何传递内存的?
- 指针参数是如何传递内存的
- 指针参数是如何传递内存的
- 指针参数是如何传递内存的?
- java是如何传递参数的?
- 指针参数是如何传递内存的
- Java函数参数是值传递的
- 指针参数是如何传递内存的
- 指针参数是如何传递内存的?
- 指针参数是如何传递内存的?
- 指针参数是如何传递内存的
- Java函数参数是值传递的
- 生动的金融课! --- 老美如何玩货币与债券
- 让uBoot通过tftp的方式加载Linux内核文件
- View.setBackgroundColor函数(待完善和测试)
- Json 的处理和相应的处理插件
- Android内存管理
- 传递参数ID是总是空的
- HTML5 - Chrome中canvas标签显示图片空白问题
- 6.087 Practical Programming in C, lec10
- boost thread usage
- 如何分析源码
- 禁止鼠标右键(1)
- java中Enum(枚举)的使用
- 禁止鼠标右键(2)
- Bootloader