Exemple #1
0
        private void Btndelete_Click(object sender, EventArgs e)
        {
            detailorder detailOrder = new detailorder();

            detailOrder = db.detailorders.Single(id => id.detailid == detailId);
            db.detailorders.DeleteOnSubmit(detailOrder);
            db.SubmitChanges();

            loadTable();
            txtqty.Enabled = true;
        }
Exemple #2
0
        private void BtnAdd_Click(object sender, EventArgs e)
        {
            detailorder detailOrder = new detailorder();

            detailOrder.orderid = orderId;
            detailOrder.menuid  = Convert.ToInt32(menuId);
            detailOrder.price   = calc(Convert.ToInt32(txtqty.Value));
            detailOrder.qty     = Convert.ToInt32(txtqty.Value);
            detailOrder.status  = "ordered";
            db.detailorders.InsertOnSubmit(detailOrder);

            db.SubmitChanges();
            loadTable();
            btnOrder.Enabled  = true;
            btndelete.Enabled = true;
        }
Exemple #3
0
        private void combo_SelectedIndexChanged(object sender, EventArgs e)
        {
            string       oldProgress = combo.Text;
            DialogResult comboRes    = MessageBox.Show("Simpan Prosses", "yakin?", MessageBoxButtons.YesNo);

            if (comboRes == DialogResult.Yes)
            {
                detailorder detailOrder = new detailorder();
                detailOrder        = db.detailorders.Single(id => id.detailid == detaiID);
                detailOrder.status = combo.Text;
                db.SubmitChanges();
                progress = combo.Text;
            }
            else
            {
                combo.Text = progress;
            }
        }
Exemple #4
0
 partial void Deletedetailorder(detailorder instance);
Exemple #5
0
 partial void Updatedetailorder(detailorder instance);
Exemple #6
0
 partial void Insertdetailorder(detailorder instance);