ASP。NET代码求翻译~
看不懂。麻烦大神翻译下。医生登陆系统进行开药,选择相应的药品为病人进行开药,其加入购药车关键代码如下:protectedvoidlbAddInCart_Click(obj...
看不懂。麻烦大神翻译下。
医生登陆系统进行开药,选择相应的药品为病人进行开药,其加入购药车关键代码如下:
protected void lbAddInCart_Click(object sender, EventArgs e)
{ String id = Request.QueryString["id"];
Medicine sp = new MedicineBLL().Load(" where id=" + id);
Shopcart.Add(sp);
Response.Redirect("shopcart.aspx"); }
购药车Shopcart类抽象的几个关键方法如下所示:
public class Shopcart
{ /// <summary>
/// </summary>
/// <param name="sp"></param>
/// <returns></returns>
public static Boolean Add(Medicine sp);
public static DataTable GetShangpin();public static void Clear();
public static double GetTotalAmount();
public static Boolean Remove(String spid) 展开
医生登陆系统进行开药,选择相应的药品为病人进行开药,其加入购药车关键代码如下:
protected void lbAddInCart_Click(object sender, EventArgs e)
{ String id = Request.QueryString["id"];
Medicine sp = new MedicineBLL().Load(" where id=" + id);
Shopcart.Add(sp);
Response.Redirect("shopcart.aspx"); }
购药车Shopcart类抽象的几个关键方法如下所示:
public class Shopcart
{ /// <summary>
/// </summary>
/// <param name="sp"></param>
/// <returns></returns>
public static Boolean Add(Medicine sp);
public static DataTable GetShangpin();public static void Clear();
public static double GetTotalAmount();
public static Boolean Remove(String spid) 展开
1个回答
展开全部
protected void lbAddInCart_Click(object sender, EventArgs e) //点击事件
{ String id = Request.QueryString["id"]; //获取参数
Medicine sp = new MedicineBLL().Load(" where id=" + id); //实例化对象并调用Load方法
Shopcart.Add(sp); //给调用hopcart中的 public static Boolean Add(Medicine sp); 方法
Response.Redirect("shopcart.aspx"); //重新定向到页面shopcart.aspx
}
//抽象方法下面的只是方法名所以没有什么好翻译的了
public class Shopcart
{ /// <summary>
/// </summary>
/// <param name="sp"></param>
/// <returns></returns>
public static Boolean Add(Medicine sp);
public static DataTable GetShangpin();public static void Clear();
public static double GetTotalAmount();
public static Boolean Remove(String spid)
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询