Пример #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            if (cmbProject.Text == "")
            {
                MessageBox.Show("Please Provide Project Name");
            }
            else if (dateDate.Text == "")
            {
                MessageBox.Show("Please Select Date");
            }
            else if (cmbIdentifiedBy.Text == "")
            {
                MessageBox.Show("Please Select Member");
            }
            else if (txtClassLibrary.Text == "")
            {
                MessageBox.Show("Please Provide Class Library");
            }
            else if (txtClass.Text == "")
            {
                MessageBox.Show("Please Provide Class");
            }
            else if (txtMethod.Text == "")
            {
                MessageBox.Show("Please Provide Method");
            }
            else if (txtLineNumber.Text == "")
            {
                MessageBox.Show("Please Provide Line Number");
            }
            else if (txtBlock.Text == "")
            {
                MessageBox.Show("Please Provide Block");
            }
            else if (txtLineNumber.Text == "")
            {
                MessageBox.Show("Please Provide Description");
            }
            else if (txtBugDetails.Text == "")
            {
                MessageBox.Show("Please Provide Method");
            }
            else if (txtCode.Text == "")
            {
                MessageBox.Show("Please Provide Code");
            }
            else if (picSnap.Image == null)
            {
                MessageBox.Show("Please Upload Screenshot of Bug Occured");
            }
            else
            {
                try
                {
                    bool result = businessligicClass.manageBugs(0, Convert.ToDateTime(dateDate.Text), Convert.ToInt32(cmbIdentifiedBy.SelectedValue.ToString()), Convert.ToInt32(cmbProject.SelectedValue.ToString()), txtClassLibrary.Text, txtClass.Text, txtMethod.Text, txtBlock.Text, txtLineNumber.Text, txtBugDetails.Text, AssistantClass.imageConverter(picSnap), txtCode.Rtf, 1);
                    if (result == true)
                    {
                        MessageBox.Show("NEW BUG RECORD HAS BEEN ADDED");
                        dgvBugEntryInformation.DataSource = bugentryclass.getAllBugs();
                        AssistantClass.makeFieldsBlank(pnlBugDetails);
                        picSnap.Image = null;
                    }
                    else
                    {
                        MessageBox.Show("ERROR IN ADDING BUG RECORD");
                        dgvBugEntryInformation.DataSource = bugentryclass.getAllBugs();
                        AssistantClass.makeFieldsBlank(pnlBugDetails);
                        picSnap.Image = null;
                    }
                }

                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
        }
Пример #2
0
 private void btnDel_Click(object sender, EventArgs e)
 {
     try
     {
         bool result = businessLogicClass.manageMembers(memberId, txtFname.Text, txtAdd.Text, tctContact.Text, txtEmail.Text, cmbGender.Text, Convert.ToDateTime(dateDOB.Text), Convert.ToDateTime(dateDOJ.Text), txtDescription.Text, AssistantClass.imageConverter(picBrowse), 3);
         if (result == true)
         {
             MessageBox.Show("MEMBER HAS BEEN SUCCESSFULLY DELETED");
             dgvMemberInformation.DataSource = memberClass.getAllMembers();
             AssistantClass.makeFieldsBlank(gbMemberDetails);
             picBrowse.Image = null;
         }
         else
         {
             MessageBox.Show("ERROR IN DELETING MEMBER");
             dgvMemberInformation.DataSource = memberClass.getAllMembers();
             AssistantClass.makeFieldsBlank(gbMemberDetails);
             picBrowse.Image = null;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Пример #3
0
        private void btnDel_Click(object sender, EventArgs e)
        {
            try
            {
                bool result = businessligicClass.manageBugs(BugID, Convert.ToDateTime(dateDate.Text), Convert.ToInt32(cmbIdentifiedBy.SelectedValue.ToString()), Convert.ToInt32(cmbProject.SelectedValue.ToString()), txtClassLibrary.Text, txtClass.Text, txtMethod.Text, txtBlock.Text, txtLineNumber.Text, txtBugDetails.Text, AssistantClass.imageConverter(picSnap), txtCode.Rtf, 3);
                if (result == true)
                {
                    MessageBox.Show("EXISTING BUG RECORD HAS BEEN DELETED");
                    dgvBugEntryInformation.DataSource = bugentryclass.getAllBugs();
                    AssistantClass.makeFieldsBlank(pnlBugDetails);
                    picSnap.Image = null;
                }
                else
                {
                    MessageBox.Show("ERROR IN DELETING BUG RECORD");
                    dgvBugEntryInformation.DataSource = bugentryclass.getAllBugs();
                    AssistantClass.makeFieldsBlank(pnlBugDetails);
                    picSnap.Image = null;
                }
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Пример #4
0
        // Update Member Details
        private void btnUpdate_Click_1(object sender, EventArgs e)
        {
            if (txtFname.Text == "")
            {
                MessageBox.Show("Please Select Full Name");
            }
            else if (txtAdd.Text == "")
            {
                MessageBox.Show("Please Provide Address");
            }
            else if (tctContact.Text == "")
            {
                MessageBox.Show("Please Provide Contact Details");
            }
            else if (txtDescription.Text == "")
            {
                MessageBox.Show("Please Provide Description");
            }
            else if (txtEmail.Text == "")
            {
                MessageBox.Show("Please Provide Email Address");
            }
            else if (cmbGender.Text == "")
            {
                MessageBox.Show("Please Select Gender");
            }
            else if (dateDOB.Text == "")
            {
                MessageBox.Show("Please Provide Date of Birth");
            }
            else if (dateDOJ.Text == "")
            {
                MessageBox.Show("Please Provide DAte of Join");
            }
            else if (picBrowse.Image == null)
            {
                MessageBox.Show("Please Upload");
            }

            else
            {
                try
                {
                    bool result = businessLogicClass.manageMembers(memberId, txtFname.Text, txtAdd.Text, tctContact.Text, txtEmail.Text, cmbGender.Text, Convert.ToDateTime(dateDOB.Text), Convert.ToDateTime(dateDOJ.Text), txtDescription.Text, AssistantClass.imageConverter(picBrowse), 2);
                    if (result == true)
                    {
                        MessageBox.Show("MEMBER HAS BEEN SUCCESSFULLY UPDATED");
                        dgvMemberInformation.DataSource = memberClass.getAllMembers();
                        AssistantClass.makeFieldsBlank(gbMemberDetails);
                        picBrowse.Image = null;
                    }
                    else
                    {
                        MessageBox.Show("ERROR IN UPDATING MEMBER");
                        dgvMemberInformation.DataSource = memberClass.getAllMembers();
                        AssistantClass.makeFieldsBlank(gbMemberDetails);
                        picBrowse.Image = null;
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
        }