예제 #1
0
        private void SAVEButton_Click(object sender, EventArgs e)
        {
            Helper aHelper = new Helper();

            aHelper.HelperNo  = helperNoTextBox.Text;
            aHelper.Name      = helperNameTextBox.Text;
            aHelper.ContactNo = contactNoTextBox.Text;

            HelperBL helperBLOBj = new HelperBL();
            bool     result      = helperBLOBj.SaveNewHelperBL(aHelper);

            if (result)
            {
                MessageBox.Show("Successfully added new Driver information.", "Done", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);

                this.PopulateGridView();
                IntitialButtonMood();
                CleanTextBar();
            }

            else
            {
                DialogResult dialog = MessageBox.Show("Please fill all the text.", "ERROR", MessageBoxButtons.OKCancel, MessageBoxIcon.Error);

                if (dialog == DialogResult.Cancel)
                {
                    this.Close();
                }
            }
        }
예제 #2
0
        private void deleteButton_Click(object sender, EventArgs e)
        {
            Helper aHelper = new Helper();

            aHelper.HelperNo  = helperNoTextBox.Text;
            aHelper.Name      = helperNameTextBox.Text;
            aHelper.ContactNo = contactNoTextBox.Text;

            HelperBL helperBLOBj = new HelperBL();
            bool     result      = helperBLOBj.DeleteHelperBL(aHelper);

            if (result)
            {
                MessageBox.Show("Successfully Deleted.", "Done", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);

                this.PopulateGridView();
                IntitialButtonMood();
                CleanTextBar();
            }

            else
            {
                MessageBox.Show("Something went wrong!", "Aleart", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
예제 #3
0
        private void PopulateGridView()
        {
            DataTable dt          = new DataTable();
            HelperBL  helperBLOBj = new HelperBL();

            dt = helperBLOBj.GetExistingdDriverBL();
            helperDataGridView.DataSource = dt;
        }
예제 #4
0
 public List <DTO.MatchingHelper> GetAllMatchingHelper(int id)
 {
     return(HelperBL.GetAllMatching(id));
 }
예제 #5
0
 public Helper RegisterMatchmaker([FromBody] Helper helper)
 {
     return(HelperBL.RegisterHelper(helper));
 }