Exemplo n.º 1
0
        //private void RefreshTagList()
        //{
        //    using (Tag tg = new Tag(true))
        //    {
        //        tg.BindToCombo(tagCombobox);

        //        tagCombobox.SelectedIndex = -1;
        //    }
        //}

        private void RefreshEduQualificationList()
        {
            using (EduQualifications edu = new EduQualifications(true))
            {
                edu.BindToCombo(eduQuaCombo);

                eduQuaCombo.SelectedIndex = -1;
            }
        }
Exemplo n.º 2
0
        private void deleteBtn_Click(object sender, EventArgs e)
        {
            using (EduQualifications edu = new EduQualifications(true))
            {
                edu.ID = occuID;

                if (MessageView.ShowQuestionMsg("Delete Details of '" + nameTextBoxX.Text + "'") == DialogResult.OK)
                {
                    edu.Delete();
                    clear();
                    MessageView.ShowMsg("Sucessfully Deleted");
                }
            }
        }
Exemplo n.º 3
0
        private void addbtn_Click(object sender, EventArgs e)
        {
            try
            {
                if (ValidateBeforeAdd())
                {
                    using (EduQualifications edu = new EduQualifications(true))
                    {
                        edu.Name = nameTextBoxX.Text;

                        if (occuID == 0)
                        {
                            if (edu.Add() == 1)
                            {
                                MessageView.ShowMsg("Sucessfully Added");

                                //errorProvider1.SetError(idTxt, string.Empty);
                                //errorProvider1.SetError(nameTxt, string.Empty);

                                clear();
                            }
                        }
                        else
                        {
                            edu.ID = occuID;

                            if (MessageView.ShowQuestionMsg("Update EduQualifications") == DialogResult.OK)
                            {
                                if (edu.Update() == 1)
                                {
                                    MessageView.ShowMsg("Sucessfully Updated");

                                    //errorProvider1.SetError(idTxt, string.Empty);
                                    //errorProvider1.SetError(nameTxt, string.Empty);

                                    clear();
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageView.ShowErrorMsg(ex.Message);
            }
        }
Exemplo n.º 4
0
        private void findButton_Click(object sender, EventArgs e)
        {
            try
            {
                using (EduQualifications edu = new EduQualifications(true))
                {
                    edu.Name = nameTextBoxX.Text;

                    DataTable ds     = edu.SelectFind();
                    frmSearch frmSub = new frmSearch(ds, this.Text, 1);
                    frmSub.Width = 800;
                    HandleSearch(frmSub);
                }
            }
            catch (Exception ex)
            {
                MessageView.ExceptionError(ex);
            }
        }