Example #1
0
 private void btn_sendtodeveloper_Click(object sender, EventArgs e)
 {
     if (String.IsNullOrEmpty(txtcode.Text) || String.IsNullOrEmpty(txt_lineno.Text))
     {
         MessageBox.Show("Any of the field cannot be empty", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     else
     {
         Connectiondb conn  = new Connectiondb();
         string       query = "select project_id from tbl_developer where project_id='" + Tester_Panel.project_Id + "'";
         DataTable    dt    = conn.retrieve(query);
         //checking wether rows/data are selected or not
         if (dt.Rows.Count > 0)
         {
             MessageBox.Show("Project has already been sent to Developer", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
         else
         {
             string insquery = "insert into tbl_developer values('" + Tester_Panel.project_Id + "','" + Tester_Panel.project_name + "','" + Tester_Panel.project_date + "','" + Tester_Panel.project_complete + "','" + txtcode.Text + "','" + txt_lineno.Text + "','" + txt_status1.Text + "')";
             conn.manipulate(insquery);
             MessageBox.Show("Successfully sent to Developer!!", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
             string upquery = "update tbl_project set status = 'Send to Developer' where project_id = '" + Tester_Panel.project_Id + "'";
             conn.manipulate(upquery);
             this.Close();
         }
     }
 }
Example #2
0
        private void btn_submit1_Click(object sender, EventArgs e)
        {
            String test = DateTime.Now.ToString("dd/MM/yyy");

            if (Tester_Panel.count > 0)
            {
                Connectiondb conn    = new Connectiondb();
                string       upquery = "update tbl_tester set result = 'OK' where project_id = '" + Tester_Panel.project_Id + "'";
                conn.manipulate(upquery);
                MessageBox.Show("The project has been completed", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);

                string ins = "insert into tbl_project_complete values('" + Tester_Panel.project_Id + "','" + Tester_Panel.project_name + "','" + Tester_Panel.project_date + "', '" + Tester_Panel.project_complete + "','" + test.ToString() + "','" + txt_desc.Text + "')";
                conn.manipulate(ins);

                string dlt = "delete from tbl_project where project_id = '" + Tester_Panel.project_Id + "'";
                conn.manipulate(dlt);
                string dlt_ = "delete from tbl_developer where project_id = '" + Tester_Panel.project_Id + "'";
                conn.manipulate(dlt_);
                string dltt = "delete from tbl_tester where project_id = '" + Tester_Panel.project_Id + "'";
                conn.manipulate(dltt);
                this.Close();
            }
            else
            {
                MessageBox.Show("You need to select a Row", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
 private void btn_send2developer_Click(object sender, EventArgs e)
 {
     if (String.IsNullOrEmpty(txtcode.Text) || String.IsNullOrEmpty(txt_lineno1.Text))
     {
         MessageBox.Show("Any of the field cannot be empty", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     else
     {
         Connectiondb conn    = new Connectiondb();
         string       upquery = "update tbl_developer set status = 'Sent from Tester Again', code = '" + txtcode.Text + "', error_line = '" + txt_lineno1.Text + "' where project_id = '" + Tester_Panel.project_Id + "'";
         conn.manipulate(upquery);
         string upqueryt = "update tbl_tester set status = 'Sent to Developer Again', code = '" + txtcode.Text + "', error_line = '" + txt_lineno1.Text + "' where project_id = '" + Tester_Panel.project_Id + "'";
         conn.manipulate(upqueryt);
         this.Close();
         MessageBox.Show("Successfully sent to Tester", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
        private void btn_yes_Click(object sender, EventArgs e)
        {
            string       query = "delete from tbl_project where project_id = '" + Admin_M_Panel.id + "'";
            Connectiondb conn  = new Connectiondb();

            conn.manipulate(query);
            MessageBox.Show("Project " + Admin_M_Panel.name + " has been successfully deleted");
            this.Hide();
        }
Example #5
0
 private void btn_update2_Click(object sender, EventArgs e)
 {
     if (String.IsNullOrEmpty(txt_upstat1.Text))
     {
         MessageBox.Show("Please write something", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     else
     {
         Connectiondb conn  = new Connectiondb();
         string       query = "UPDATE tbl_project SET status = '" + txt_upstat1.Text + "' WHERE project_id = '" + Tester_Panel.val + "' ";
         conn.manipulate(query);
         MessageBox.Show("Status Successfully updated!!", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
         this.Hide();
     }
 }
Example #6
0
 private void btn_upcode_Click(object sender, EventArgs e)
 {
     if (String.IsNullOrEmpty(txtcode.Text))
     {
         MessageBox.Show("Please coding cannot be empty", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     else
     {
         Connectiondb conn  = new Connectiondb();
         string       query = "UPDATE tbl_developer SET code = '" + txtcode.Text + "' WHERE project_id = '" + Developer_Panel.Id + "' ";
         conn.manipulate(query);
         MessageBox.Show("Code Successfully updated!!", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
         this.Hide();
     }
 }
Example #7
0
        private void btn_submit_Click(object sender, EventArgs e)
        {
            string a_to     = txt_assignedto.Text;
            string pname    = txt_projectname.Text;
            string a_by     = txt_assignedby.Text;
            string desc     = txtdesc.Text;
            string srt_date = dtp.Value.ToShortDateString();
            string end_date = dtp2.Value.ToShortDateString();
            string code     = txtcode.Text;

            if (String.IsNullOrEmpty(a_to) || String.IsNullOrEmpty(a_by) || String.IsNullOrEmpty(desc) || String.IsNullOrEmpty(pname) || String.IsNullOrEmpty(code))
            {
                MessageBox.Show("Any of the field cannot be empty");
            }
            else
            {
                query = "insert into tbl_project(assigned_to,project_name,assigned_date,completion_date,assigned_by,description, code) values('" + a_to + "','" + pname + "','" + srt_date + "','" + end_date + "','" + a_by + "','" + desc + "','" + code + "')";
                conn.manipulate(query);
                MessageBox.Show("Registration Successfull!!", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.Close();
            }
        }
Example #8
0
        private void button1_Click(object sender, EventArgs e)
        {
            string firstname, lastname, username, password, email, usertype;

            firstname = txt_fname.Text;
            lastname  = txt_lname.Text;
            username  = txt_uname.Text;
            password  = txt_pw.Text;
            email     = txt_mail.Text;
            usertype  = cmb_type.Text;

            if (String.IsNullOrEmpty(firstname))
            {
                MessageBox.Show("First name cannot be empty!!.", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
                txt_fname.Focus();
            }
            else if (String.IsNullOrEmpty(lastname))
            {
                MessageBox.Show("Last name cannot be empty!!.", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
                txt_lname.Focus();
            }
            else if (String.IsNullOrEmpty(username))
            {
                MessageBox.Show("Username cannot be empty!!.", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
                txt_uname.Focus();
            }
            else if (String.IsNullOrEmpty(password))
            {
                MessageBox.Show("Password cannot be empty!!.", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
                txt_pw.Focus();
            }
            else if (String.IsNullOrEmpty(password))
            {
                MessageBox.Show("Usertype cannot be empty!!.", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
                cmb_type.Focus();
            }

            else
            {
                string temp;
                temp  = txt_uname.Text;
                query = query = "select Username from [Signupdata] where Username='******'";
                DataTable dt = conn.retrieve(query);
                //checking wether rows/data are selected or not
                if (dt.Rows.Count > 0)
                {
                    MessageBox.Show(temp + " cannot be used. Because it is already used", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    txt_uname.Clear();
                    txt_pw.Clear();
                }
                else
                {
                    //try catch to confirm the value is inserted
                    try
                    {
                        query = "insert into Signupdata(First_name,Last_name,Username,Password,Email,Usertype) values('" + firstname + "','" + lastname + "','" + username + "','" + password + "','" + email + "','" + usertype + "')";
                        conn.manipulate(query);
                        MessageBox.Show("Registration Successfull!!", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        Form1 login_form = new Form1();
                        login_form.Show();
                        this.Hide();
                    }
                    catch
                    {
                        MessageBox.Show("Data Cannot be inserted due to the internal application problem!! ", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                }
            }
        }