Esempio n. 1
0
        //button to make a order
        private void btnOrderNow_Click(object sender, EventArgs e)
        {
            ORDER flowers = new ORDER();

            string   name       = cbname.Text;
            string   email      = tbemail.Text;
            string   tele       = tbcontact.Text;
            string   flowerName = cbFlower.Text;
            int      quantity   = Convert.ToInt32(tbquantity.Text);
            DateTime odate      = dtpDate.Value;
            string   time       = cbTime.Text;
            string   branch     = cbBranch.Text;

            try
            {
                if (flowers.insertOrder(name, email, tele, flowerName, quantity, odate, time, branch))
                {
                    MessageBox.Show("Order Added Successfully", "OrderNow", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    this.Hide();
                    MaterialEmail mat = new MaterialEmail();
                    mat.ShowDialog();
                }
                else
                {
                    MessageBox.Show("Something Went Wrong", "OrderNow", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Order", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Esempio n. 2
0
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            int      ID    = Convert.ToInt32(tbID.Text);
            DateTime LDate = dtpDate.Value;


            EMPLOYEE emp = new EMPLOYEE();

            if (emp.makeLeave(ID, LDate))
            {
                MessageBox.Show("Leave made successfully", "Submit", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.Hide();
                MaterialEmail mat = new MaterialEmail();
                mat.ShowDialog();
            }
            else
            {
                MessageBox.Show("Something Went Wrong", "Submit", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Esempio n. 3
0
 public MaterialEmail()
 {
     InitializeComponent();
     m = this;
 }