Example #1
0
        private void btnFind_Click(object sender, EventArgs e)
        {
            GlobalClass.GlobalEmployeeId = "";
            GlobalClass.GlobalServiceId  = "";
            GlobalClass.GlobalInvItemId  = "";

            if (cboSearchCriteria.Text == "")
            {
                MessageBox.Show("Please select which criteria will be used");
                cboSearchCriteria.Focus();
            }
            else
            {
                if (cboSearchCriteria.Text == "Service")
                {
                    GlobalClass.GlobalServiceId = "";
                    txtSearch.Text = "";

                    frmServiceList frm_Services = new frmServiceList();
                    frm_Services.ShowDialog();

                    if (!String.IsNullOrEmpty(GlobalClass.GlobalServiceId))
                    {
                        func_Retrieve_Service_Details();
                        btnPrint.Focus();
                    }
                }

                else if (cboSearchCriteria.Text == "Item Description")
                {
                    GlobalClass.GlobalInvItemId = "";
                    txtSearch.Text = "";

                    frmInventoryListforUpdating frm_Inventories = new frmInventoryListforUpdating();
                    frm_Inventories.ShowDialog();

                    if (!String.IsNullOrEmpty(GlobalClass.GlobalInvItemId))
                    {
                        func_Retrieve_Item_Desc();
                        btnPrint.Focus();
                    }
                }
                else if (cboSearchCriteria.Text == "End User")
                {
                    GlobalClass.GlobalEmployeeId = "";
                    txtSearch.Text = "";

                    frmEmployeesList frm_EmployeesList = new frmEmployeesList();
                    frm_EmployeesList.ShowDialog();

                    if (!String.IsNullOrEmpty(GlobalClass.GlobalEmployeeId))
                    {
                        func_Retrieve_Employee_Details();
                        btnPrint.Focus();
                    }
                }
            }
        }
Example #2
0
        private void btnSearch_Click(object sender, EventArgs e)
        {
            frmServiceList frm_ServiceList = new frmServiceList();

            frm_ServiceList.ShowDialog();

            if (!String.IsNullOrEmpty(GlobalClass.GlobalServiceId))
            {
                func_Retrieve_Service_Details();
            }
        }