public SolutionComment(bool isSendMail, String reporter, String to, String cc, String failGroup, String line, String failName, String description, int stt, List <String> mailOfProductEngineer, int RecordId)
        {
            InitializeComponent();
            repairer = reporter;
            sendMail = isSendMail;
            mail     = new Email(reporter, to, cc, failGroup, line, failName, description, 3, mailOfProductEngineer, RecordId, "", "", "", "");

            f.setId(RecordId);
        }
        private void btnRemove_Click(object sender, EventArgs e)
        {
            MasterPass masterPass = new MasterPass();

            masterPass.ShowDialog();
            if (masterPass.Result())
            {
                int          temp = rowTemp;
                BLFailRecord re   = new BLFailRecord();
                re.setId(Convert.ToInt32(gvProblem.Rows[temp].Cells[recordIdIndex].Value.ToString()));
                re.Remove(Convert.ToInt32(gvProblem.Rows[temp].Cells[recordIdIndex].Value.ToString()));
                MessageBox.Show("Đã xóa");
                LoadData();
            }
        }
        private void btnProcessing_Click(object sender, EventArgs e)
        {
            int temp = rowTemp;

            if (f.QuickGetStatus(RecordIdtemp) < cstfinished)
            {
                f.setStatus(cstprocessing);
                f.setId(RecordIdtemp);
                f.UpdateStatus(employee.getOpName(), "");

                if (cbSendMail.Checked)
                {
                    Line li = new Line();
                    li.setLineId(LineIdTemp);
                    li.Load();
                    String failName  = failNameTemp;
                    String failGroup = f.getFailGroup(failName);


                    //  MessageBox.Show(RecordIdtemp.ToString());
                    //send mail
                    //send mail
                    //  mail = new Email(RecordIdtemp,employee.getOpName(), li.getMailTo(), li.getMailCC(), failGroup, li.getLineId(), failName, "", status, li.getUpperLevelMail().Split(';').ToList());
                    Email mail = new Email(employee.getOpName(), li.getMailTo(Convert.ToInt32(gvProblem.Rows[temp].Cells[groupFailIndex].Value.ToString())), li.getMailCC(Convert.ToInt32(gvProblem.Rows[temp].Cells[groupFailIndex].Value.ToString())), failGroup, li.getLineId(), failName, "", cstprocessing, li.getUpperLevelMail().Split(';').ToList(), Convert.ToInt32(gvProblem.Rows[temp].Cells[recordIdIndex].Value.ToString()), "", "", "", "");
                    mail.Send();
                }
                checkLight();
                LoadData();
                gvProblem.ClearSelection();
                gvProblem.Rows[temp].Selected = true;
            }
            else
            {
                MessageBox.Show("Sự cố đã được xử lý");
                LoadData();
            }

            // gvProblem.Rows[rowTemp].Cells[0].Selected = true;
        }