https://www.myziyuan.com/
- 亚亚
- math.random()过时,使用随机类。专用随机数生成类可以轻松生成范围内的值。如nextint(),nextfloat()这些经典方法。公共静态void main(String [] args){随机rnd = new wondom(system.currenttimemillis()); String []休息= {“李天餐厅”,“北京酒店”,“饥饿”,“全玉”,“楼下煎饼”} int选择= rnd.nextint(rest.length); system.out.println(休息[选择]);}
- 2021-07-17 23:33:47
- H5支付系统
- 使用全局变量来接收金额可以在另一个接口中实现
- 2021-07-17 23:32:44
- gyq
- 急求订餐系统的代码,using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Data.SqlClient; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; using MCreating.Enjoy.BizRule; using MCreating.Enjoy.DataAccess; namespace MCreating.Enjoy.Web.Order { /// <summary> /// list 的摘要说明。 /// </summary> public class list : System.Web.UI.Page { protected System.Web.UI.WebControls.ImageButton ImageButton1; protected System.Web.UI.WebControls.TextBox txtbegintime; protected System.Web.UI.WebControls.Button btnOK; protected System.Web.UI.WebControls.CheckBox cbSelect ; protected System.Web.UI.WebControls.Label lbFoodID; protected System.Web.UI.WebControls.Label lbFoodName; protected System.Web.UI.WebControls.Label lbMoey; protected System.Web.UI.WebControls.TextBox tbCount; Components.DataBaseClass db = new Components.DataBaseClass(); private DataSet ds =null; private int BizID; protected System.Web.UI.WebControls.DataList dlFoodList; private static ArrayList ar ; private void Page_Load(object sender, System.EventArgs e) { BizID=int.Parse(Page.Request.QueryString["id"].ToString()); if(!Page.IsPostBack) { BindData(); } } private void BindData() { string strsql="select * from tbl_Carte where i_BizID = "+ BizID+""; ds = db.GetDataSet(strsql); dlFoodList.DataSource=ds.Tables[0].DefaultView; dlFoodList.DataBind(); } #region Web 窗体设计器生成的代码 override protected void OnInit(EventArgs e) { // // CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。 // InitializeComponent(); base.OnInit(e); } /// <summary> /// 设计器支持所需的方法 - 不要使用代码编辑器修改 /// 此方法的内容。 /// </summary> private void InitializeComponent() { this.ImageButton1.Click += new System.Web.UI.ImageClickEventHandler(this.ImageButton1_Click); this.btnOK.Click += new System.EventHandler(this.btnOK_Click); this.Load += new System.EventHandler(this.Page_Load); } #endregion private void ImageButton1_Click(object sender, System.Web.UI.ImageClickEventArgs e) { Orders orderlist = new Orders(); ar = new ArrayList(); for(int i=0;i<dlFoodList.Items.Count;i++) { bool checkined=((CheckBox)dlFoodList.Items[i].FindControl("cbSelect")).Checked; string ID=((Label)dlFoodList.Items[i].FindControl("lbFoodID")).Text.Trim(); //int money= int.Parse(((Label) dlFoodList.Items[i].FindControl("lbMoney")).Text.Trim()); string foodname=((Label)dlFoodList.Items[i].FindControl("lbFoodName")).Text.Trim(); int count=int.Parse(((TextBox)dlFoodList.Items[i].FindControl("tbCount")).Text.Trim()); if(checkined) { orderlist.AddFood(((Label)DataList3.Items[i].FindControl("Label1")).Text .Trim (),int.Parse(lab2.Text .Trim ()),int.Parse(lab1.Text .Trim ()),ref ar); orderlist.AddFood(ID,0,count,ref ar); } } } private void btnOK_Click(object sender, System.EventArgs e) { DateTime.Parse(txtbegintime.Text.Trim()),Session["Addr"].ToString (),total,"",""); } } }
- 2021-07-17 23:32:44