예제 #1
0
파일: Form1.cs 프로젝트: japhet98/FMS
 private void btnProfile_Click(object sender, EventArgs e)
 {
     if (authentication == "ceo")
     {
         var ceo = new frmRegisterCeo(Ceo);
         ceo.ShowDialog();
     }
     else if (authentication == "secretary")
     {
         var sec = new frmRegisterSecretary(Sec);
         sec.ShowDialog();
     }
 }
예제 #2
0
        private void AddItem(string table)
        {
            if (table == "customer")
            {
                var cust = new frmRegisterCustomer();
                cust.ShowDialog();
                populateDataGridView();
            }
            else if (table == "secretary")
            {
                var sec = new frmRegisterSecretary();
                sec.ShowDialog();
            }
            else if (table == "ceo")
            {
                var ceo = new frmRegisterCeo();
                ceo.ShowDialog();
            }

            else if (table == "fishtype")
            {
                var type = new frmCreateFishCannoeType("Fish Type");
                type.ShowDialog();
            }
            else if (table == "cannoetype")
            {
                var type = new frmCreateFishCannoeType("Cannoe Type");
                type.ShowDialog();
            }
            else if (table == "deptors")
            {
                var pay = new frmMakeCustomerPayment();
                pay.ShowDialog();
            }
            else if (table == "order")
            {
                var selectedRows = adgvResult.SelectedRows[0].Cells;
                var customerId   = selectedRows[1].Value.ToString();
                var order        = new frmCustomerOrder(customerId);
                order.ShowDialog();
            }
        }