Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack)
            {
                DataClassesDataContext DbContext = new DataClassesDataContext();
                orders TempOrder = new orders();

                TempOrder.frompostcode  = Request["txtLoadFromAdds"];
                TempOrder.fromadds      = Request["hffromAdds"];
                TempOrder.topostcode    = Request["txtLoadToAdds"];
                TempOrder.toadds        = Request["hftoAdds"];
                TempOrder.packagetype   = Request["inlineRadioOptions"];
                TempOrder.packageamount = int.Parse(Request["packageNo"]);
                TempOrder.price         = int.Parse(Request["priceoutput"].Split('円')[0]);
                TempOrder.createdate    = DateTime.Now;

                DbContext.orders.InsertOnSubmit(TempOrder);
                DbContext.SubmitChanges();
                Response.Redirect("neworder.aspx?orderid=" + TempOrder.Id.ToString());
            }
        }
Example #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int orderid = 0;

            if (!string.IsNullOrEmpty(Request["orderid"]) && int.TryParse(Request["orderid"], out orderid))
            {
            }
            order = DbContext.orders.Where(order => order.Id == orderid).FirstOrDefault();
            if (order.state.HasValue)
            {
                if (order.state.Value == 1)
                {
                    btnSubmit.Text = "送信";
                }
                else
                {
                    btnSubmit.Text = "送信";
                }
            }
            else
            {
                btnSubmit.Text = "送信";
            }
        }
Example #3
0
 partial void Updateorders(orders instance);
Example #4
0
 partial void Deleteorders(orders instance);
Example #5
0
 partial void Insertorders(orders instance);