private void btsave_Click(object sender, EventArgs e)
 {
     try
     {
         DialogResult dl = MessageBox.Show("Do you want to add new Supplier", "System", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
         if (dl == DialogResult.Yes)
         {
             if (txtid.Text == "" || txtname.Text == "")
             {
                 ms.Check_DataEmpty();
                 txtname.Focus();
                 return;
             }
             cntrl.insert_supplier(txtid.Text.Trim(), txtname.Text.Trim(), txtaddr.Text.Trim(), txttel.Text.Trim());
             SengkeoHotel.cntrl_order.Form_OrderProducts or = new Form_OrderProducts();
             Form_OrderProducts.Supaddr  = txtaddr.Text;
             Form_OrderProducts.supptel  = txttel.Text;
             Form_OrderProducts.suppname = txtname.Text;
             txtid.Text = cntrl.create_id().ToString();
             MessageBox.Show("Save new Supplier Success", "", MessageBoxButtons.OK, MessageBoxIcon.Information);
             this.Close();
         }
         else
         {
             return;
         }
     }
     catch { }
 }
Exemple #2
0
        private void ສງຊToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SengkeoHotel.cntrl_order.Form_OrderProducts f = new cntrl_order.Form_OrderProducts();
            f.MdiParent = this;
            f.Text      = "" + childFormNumber++;
            f.Show();

            //FormOrder ll = new FormOrder();
            //ll.StartPosition = FormStartPosition.CenterScreen;
            //ll.ShowDialog();
        }