ASP.NET餐饮管理系统制作代码分享(3)

//menuorder.aspx protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack == false) { //Session["Username"] = "ning"; // DataGridViewBind(); //total_money(); string sql = "select * from menuView where customerName='" + Session["UserName"] + "'"; Ds = Dataoperator.getRows(sql); int i = Ds.Tables[0].Rows.Count; int tem = 0; for (int j = 0; j < i; j++) { tem = Convert.ToInt32(Ds.Tables[0].Rows[j][5].ToString()) + tem; } total_money_txt.Text = tem.ToString(); } } protected void orderbtn_Click(object sender, EventArgs e) { string sql = "select * from menuView where customerName='" + Session["UserName"] + "'"; Ds = Dataoperator.getRows(sql); int i = Ds.Tables[0].Rows.Count; string strgoodid=""; string strcustomername = ""; string strmenuname = ""; string strnumber = ""; string deldate = ""; int strpaymoney = 0; if (i > 0) { bool te = false; for (int j = 0; j < i; j++) { strgoodid = Ds.Tables[0].Rows[j][0].ToString(); strcustomername = Ds.Tables[0].Rows[j][1].ToString(); strmenuname = Ds.Tables[0].Rows[j][2].ToString(); strnumber = Ds.Tables[0].Rows[j][3].ToString(); deldate = Ds.Tables[0].Rows[j][4].ToString(); strpaymoney = Convert.ToInt32(Ds.Tables[0].Rows[j][5]); tem++; string songdate = Calendar1.SelectedDate.ToString(); string stylePay = ddlpayment.SelectedValue.ToString(); string sakmenu = remarktxtbox.Text; string sqlind = "insert into IndentMenu values('" + strgoodid + "','" + strcustomername + "','" + strmenuname + "','" + strnumber + "','" + deldate + "','" + strpaymoney + "','" + songdate + "','" + stylePay + "','" + sakmenu + "')"; te = Dataoperator.exSql(sqlind); } if (te) { MessageBox.ShowPath("menuIndent.aspx"); } else { MessageBox.Show("存储错误.."); } } else { MessageBox.Show("出错了啊!!"); } }

以上就是ASP.NET餐饮管理系统制作关键代码,代码不够完整,本文的目的只是想给大家一个启发,制作餐饮管理系统的思路,希望能真正的帮助到大家。

您可能感兴趣的文章:

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wjwxfp.html