private void changeFunc()
        {
            this.txtStatus.ForeColor = Color.Blue;
            this.txtStatus.Text      = "修改信息:正在修改...";
            Application.DoEvents();
            RegexInfo myLoginInfo = new RegexInfo();

            if (this.txtChangeTo.Text != "")
            {
                if (myLoginInfo.isMailAddress(this.txtChangeTo.Text))
                {
                    ManageDB myManageDB = new ManageDB();
                    myManageDB.UpdateDB("用户管理", "email", this.txtChangeTo);
                    TimeDelay myTimeDelay = new TimeDelay();
                    this.btnOK.Enabled     = false;
                    this.btnCancel.Enabled = false;
                    myTimeDelay.closingCurrentWindowDelay(3, this.txtStatus, this, "修改信息:修改成功!", "");
                }
                else
                {
                    this.txtStatus.ForeColor = Color.Red;
                    this.txtStatus.Text      = "修改信息:修改失败!邮箱地址不合法!";
                }
            }
            else
            {
                this.txtStatus.ForeColor = Color.Red;
                this.txtStatus.Text      = "修改信息:修改失败,所有项不能为空!";
            }
        }
示例#2
0
        private void changeFunc()
        {
            this.txtStatus.ForeColor = Color.Blue;
            this.txtStatus.Text      = "修改信息:正在修改...";
            Application.DoEvents();
            RegexInfo myLoginInfo = new RegexInfo();

            if (this.txtPasswd.Text != "" && this.txtChangeTo.Text != "")
            {
                if (this.txtPasswd.Text == this.txtChangeTo.Text)
                {
                    if (myLoginInfo.isPasswdSecurity(this.txtChangeTo.Text))
                    {
                        ManageDB myManageDB = new ManageDB();
                        myManageDB.UpdateDB("用户管理", "[passWord]", this.txtChangeTo);
                        TimeDelay myTimeDelay = new TimeDelay();
                        this.btnOK.Enabled     = false;
                        this.btnCancel.Enabled = false;
                        myTimeDelay.restartDelay(3, this.txtStatus, "修改信息:修改成功!", "请重新登录!");
                    }
                    else
                    {
                        this.txtStatus.ForeColor = Color.Red;
                        this.txtStatus.Text      = "修改信息:修改失败!密码为含数字、字母6位以上字符!";
                    }
                }
                else
                {
                    this.txtStatus.ForeColor = Color.Red;
                    this.txtStatus.Text      = "修改信息:修改失败,密码输入不一致!";
                }
            }
            else
            {
                this.txtStatus.ForeColor = Color.Red;
                this.txtStatus.Text      = "修改信息:修改失败,所有项不能为空!";
            }
        }
示例#3
0
 private void tsbSave_Click(object sender, EventArgs e)
 {
     try
     {
         myManageDB.UpdateDB("CaseManager", "ceProject", this.tb_Project.Text, "ceCaseNO", tcNO);
         myManageDB.UpdateDB("CaseManager", "ceStruct", this.cb_Struct.Text, "ceCaseNO", tcNO);
         myManageDB.UpdateDB("CaseManager", "ceSuiteNO", this.tb_SuiteNO.Text, "ceCaseNO", tcNO);
         myManageDB.UpdateDB("CaseManager", "ceSuiteName", this.tb_SuiteName.Text, "ceCaseNO", tcNO);
         myManageDB.UpdateDB("CaseManager", "ceCaseNO", this.tb_CaseNO.Text, "ceCaseNO", tcNO);
         myManageDB.UpdateDB("CaseManager", "ceCaseName", this.tb_CaseName.Text, "ceCaseNO", tcNO);
         myManageDB.UpdateDB("CaseManager", "ceReqNO", this.tb_ReqNO.Text, "ceCaseNO", tcNO);
         myManageDB.UpdateDB("CaseManager", "ceCaseLevel", this.cb_CaseLevel.Text, "ceCaseNO", tcNO);
         myManageDB.UpdateDB("CaseManager", "ceFatherModule", this.tb_FatherModule.Text, "ceCaseNO", tcNO);
         myManageDB.UpdateDB("CaseManager", "ceSubModule", this.tb_SubModule.Text, "ceCaseNO", tcNO);
         myManageDB.UpdateDB("CaseManager", "ceAuthor", this.tb_Author.Text, "ceCaseNO", tcNO);
         myManageDB.UpdateDB("CaseManager", "ceEditDate", this.tb_EditDate.Text, "ceCaseNO", tcNO);
         myManageDB.UpdateDB("CaseManager", "ceModifier", this.tb_Modifier.Text, "ceCaseNO", tcNO);
         myManageDB.UpdateDB("CaseManager", "ceModifyDate", this.dtpModifyDate.Text, "ceCaseNO", tcNO);
         myManageDB.UpdateDB("CaseManager", "ceTester", this.cb_Tester.Text, "ceCaseNO", tcNO);
         myManageDB.UpdateDB("CaseManager", "ceTestDate", this.dtpTestDate.Text, "ceCaseNO", tcNO);
         myManageDB.UpdateDB("CaseManager", "cePrecondition", this.rtb_Precondition.Text, "ceCaseNO", tcNO);
         myManageDB.UpdateDB("CaseManager", "ceSteps", this.rtb_Steps.Text, "ceCaseNO", tcNO);
         myManageDB.UpdateDB("CaseManager", "ceSamples", this.rtb_Samples.Text, "ceCaseNO", tcNO);
         myManageDB.UpdateDB("CaseManager", "ceExcept", this.rtb_Except.Text, "ceCaseNO", tcNO);
         myManageDB.UpdateDB("CaseManager", "ceActually", this.cb_Actually.Text, "ceCaseNO", tcNO);
         myManageDB.UpdateDB("CaseManager", "ceIfAuto", this.cb_IfAuto.Text, "ceCaseNO", tcNO);
         this.Visible = false;
         this.Close();
     }
     catch (Exception exception)
     {
         MessageBox.Show(exception.Message, "异常消息提示:", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
示例#4
0
        private void tsbSave_Click(object sender, EventArgs e)
        {
            try
            {
                myManageDB.UpdateDB("ProjectManager", "proName", this.tb_ProjectName.Text, "proNO", proNO);
                myManageDB.UpdateDB("ProjectManager", "proShortName", this.tb_ShortName.Text, "proNO", proNO);
                myManageDB.UpdateDB("ProjectManager", "proNO", this.tb_ProjectNO.Text, "proNO", proNO);
                myManageDB.UpdateDB("ProjectManager", "proType", this.cb_Type.Text, "proNO", proNO);
                myManageDB.UpdateDB("ProjectManager", "proPriority", this.cb_Priority.Text, "proNO", proNO);
                myManageDB.UpdateDB("ProjectManager", "proDepartment", this.tb_Department.Text, "proNO", proNO);
                myManageDB.UpdateDB("ProjectManager", "proManager", this.tb_Manager.Text, "proNO", proNO);
                myManageDB.UpdateDB("ProjectManager", "proAssistant", this.tb_Assistant.Text, "proNO", proNO);
                myManageDB.UpdateDB("ProjectManager", "proSetUpTime", this.dtp_SetUpTime.Text, "proNO", proNO);
                myManageDB.UpdateDB("ProjectManager", "proClosedTime", this.dtp_ClosedTime.Text, "proNO", proNO);
                myManageDB.UpdateDB("ProjectManager", "proCustomer", this.tb_Customer.Text, "proNO", proNO);
                myManageDB.UpdateDB("ProjectManager", "proDevelopmentSite", this.tb_DevelopmentSite.Text, "proNO", proNO);
                myManageDB.UpdateDB("ProjectManager", "proAuthor", this.tb_Author.Text, "proNO", proNO);
                myManageDB.UpdateDB("ProjectManager", "proBuildTime", this.dtp_BuildTime.Text, "proNO", proNO);
                myManageDB.UpdateDB("ProjectManager", "proModifier", this.tb_Modifier.Text, "proNO", proNO);
                myManageDB.UpdateDB("ProjectManager", "proModifyTime", this.dtp_ModifyTime.Text, "proNO", proNO);
                myManageDB.UpdateDB("ProjectManager", "proDescribe", this.rtb_Describe.Text, "proNO", proNO);

                this.Visible = false;
                this.Close();
            }
            catch (Exception exception)
            {
                MessageBox.Show(exception.Message, "异常消息提示:", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void addDataToDB()
        {
            ManageDB myManageDB = new ManageDB();

            myManageDB.UpdateDB("insert into 用户管理(userName,[passWord],FullName,email,administrator) values ('" + UserRegister.userName + "','" + UserRegister.passwd + "','" + UserRegister.fullName + "','" + UserRegister.emailAddress + "','False')");
        }
示例#6
0
        private void btnLaunch_Click(object sender, EventArgs e)
        {
            if (myManageDB.checkItem("revFullName", "用例评审", ManageDB.userFullName, "revEmail", ManageDB.userEmailAddress))
            {
                MessageBox.Show("您已经发起了评审流程!", "消息提示:", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                myManageDB.InsertInto("insert into 用例评审(revFullName,revEmail) values('" + ManageDB.userFullName + "'," + "'" + ManageDB.userEmailAddress + "')");
                string   FilesPath      = this.tbFilePath.Text;
                string[] excelFilesPath = FilesPath.Split(';');
                foreach (string str in excelFilesPath)
                {
                    if (str != "")
                    {
                        try
                        {
                            if (!Directory.Exists(testCasesPool()))
                            {
                                Directory.CreateDirectory(testCasesPool());
                            }
                            File.Copy(str, testCasesPool() + Path.GetFileName(str), true);
                            caseNameToReviewList.Add(Path.GetFileName(str) + "\r\n");
                            caseNameToReview = caseNameToReviewList.ToArray();
                            mailBody         = Path.GetFileName(str) + "\r\n" + mailBody;
                        }
                        catch (Exception exception)
                        {
                            MessageBox.Show(exception.Message, "异常消息提示:", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        }
                    }
                }
                if ((cbIfAuto.Text != null) || (cbIfAuto.Text != ""))
                {
                    this.cbIfCover.Enabled = true;
                    string mailAddressStr = null;
                    try
                    {
                        mailAddressStr = Regex.Match(cbIfAuto.Text.ToString(), @"(?<=\()[\s\S]*@sit.com.cn(?=\))").Value;
                    }
                    catch (ArgumentException exception)
                    {
                        MessageBox.Show(exception.Message, "异常消息提示:", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                    autoReviewerList.Add(mailAddressStr);
                    autoReviewer = autoReviewerList.ToArray();
                }

                if (autoReviewer != null)
                {
                    sendMail("测试用例自动化评审流程", autoReviewer);
                }
                if (ifCoverReviewer != null)
                {
                    sendMail("测试用例测试点覆盖评审流程", ifCoverReviewer);
                }
                foreach (string autoReviewTo in autoReviewer)
                {
                    myManageDB.UpdateDB("用户管理", "autoReviewTo", "True", "email", autoReviewTo);
                }
                foreach (string coverReviewTo in ifCoverReviewer)
                {
                    myManageDB.UpdateDB("用户管理", "coverReviewTo", "True", "email", coverReviewTo);
                }
                myManageDB.UpdateDB("用户管理", "reviewFrom", "True", "email", ManageDB.userEmailAddress);
            }
        }