Esempio n. 1
0
 public void AddManageMember()
 {
     try
     {
         bool result = blc.ManageMembers(0, txtMemberName.Text, txtMemberAddress.Text, txtConatctNumber.Text, txtEmailAddress.Text, cmbGender.Text, Convert.ToDateTime(dtpDateOfBirth.Text), Convert.ToDateTime(dtpDateOfJoin.Text), txtDesignation.Text, Assitantclass.imageConverter(pbProfilePicture), 1);
         if (result == true)
         {
             MessageBox.Show("NEW MEMBER HAS SUCCESSFULLY CREATED");
             dgvManageMember.DataSource = mcl.getAllMembers();
             Assitantclass.makeFieldsBlank(pnlMemberInformation);
             pbProfilePicture.Image = null;
         }
         else
         {
             MessageBox.Show("ERROR IN CREATING MEMBER");
             dgvManageMember.DataSource = mcl.getAllMembers();
             Assitantclass.makeFieldsBlank(pnlMemberInformation);
             pbProfilePicture.Image = null;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Esempio n. 2
0
        public void AddRegisterBug()
        {
            try
            {
                bool result = blc.manageBugs(0, Convert.ToDateTime(dtpBugIdentityDate.Text), Convert.ToInt32(cmbIdentityBy.SelectedValue.ToString()), Convert.ToInt32(cmbProjectName.SelectedValue.ToString()), txtClassLibrary.Text, txtClass.Text, txtMethod.Text, txtBlock.Text, txtLineNumber.Text, txtBugDetails.Text, Assitantclass.imageConverter(pbPictureImages), txtCode1.Rtf, 1);
                if (result == true)
                {
                    MessageBox.Show("NEW BUG RECORD HAS BEEN ADDED");
                    dgvRegisterBug.DataSource = rbc.getAllBugs();
                    Assitantclass.makeFieldsBlank(pnlManageBugInformation);
                    pbPictureImages.Image = null;
                }
                else
                {
                    MessageBox.Show("ERROR IN ADDING BUG RECORD");
                    dgvRegisterBug.DataSource = rbc.getAllBugs();
                    Assitantclass.makeFieldsBlank(pnlManageBugInformation);
                    pbPictureImages.Image = null;
                }
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Esempio n. 3
0
 public void DeleteManageMember()
 {
     try
     {
         bool result = blc.ManageMembers(memberId, txtMemberName.Text, txtMemberAddress.Text, txtConatctNumber.Text, txtEmailAddress.Text, cmbGender.Text, Convert.ToDateTime(dtpDateOfBirth.Text), Convert.ToDateTime(dtpDateOfJoin.Text), txtDesignation.Text, Assitantclass.imageConverter(pbProfilePicture), 3);
         if (result == true)
         {
             MessageBox.Show("Member successfully deleted");
             dgvManageMember.DataSource = mcl.getAllMembers();
             Assitantclass.makeFieldsBlank(pnlMemberInformation);
             pbProfilePicture.Image = null;
         }
         else
         {
             MessageBox.Show("Error");
             dgvManageMember.DataSource = mcl.getAllMembers();
             Assitantclass.makeFieldsBlank(pnlMemberInformation);
             pbProfilePicture.Image = null;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Esempio n. 4
0
 public void DeleteRegBug()
 {
     try
     {
         bool result = blc.manageBugs(bugId, Convert.ToDateTime(dtpBugIdentityDate.Text), Convert.ToInt32(cmbIdentityBy.SelectedValue.ToString()), Convert.ToInt32(cmbProjectName.SelectedValue.ToString()), txtClassLibrary.Text, txtClass.Text, txtMethod.Text, txtBlock.Text, txtLineNumber.Text, txtBugDetails.Text, Assitantclass.imageConverter(pbPictureImages), txtCode1.Rtf, 3);
         if (result == true)
         {
             MessageBox.Show("NEW BUG RECORD HAS BEEN SUCCESSFULLY DELETED");
             dgvRegisterBug.DataSource = rbc.getAllBugs();
             Assitantclass.makeFieldsBlank(pnlManageBugInformation);
             pbPictureImages.Image = null;
         }
         else
         {
             MessageBox.Show("ERROR IN ADDING BUG RECORD");
             dgvRegisterBug.DataSource = rbc.getAllBugs();
             Assitantclass.makeFieldsBlank(pnlManageBugInformation);
             pbPictureImages.Image = null;
         }
     }
     catch (System.NullReferenceException)
     {
         MessageBox.Show("Some fields cann't be null");
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }