Beispiel #1
0
 public RolloutComplete(Rollout rollout)
 {
     InitializeComponent();
     ListViewItem item;
     _rollout = rollout;
     CatLists cls = new CatLists(Connections.Inst.item("QED_DB").MySqlConnection);
     CatList system = cls.item("System");
     _defaultUserDomain = system.Entry("/Defaults/UserDomain").Value;
     string deptName = "";
     this.rdoUnrolled.Checked = (!_rollout.RolledBack && !_rollout.Rolled);
     this.rdoRolledBack.Checked = _rollout.RolledBack;
     _suppressRollCompletionProcess = true; this.rdoRolled.Checked = _rollout.Rolled; _suppressRollCompletionProcess = false;
     this.txtScheduledRollDate.Text = rollout.ScheduledDate.ToLongDateString();
     this.txtFinalComments.Text = rollout.FinalComments;
     this.txtRolledBy.Text = (_rollout.RolledBy == "") ? _defaultUserDomain : _rollout.RolledBy;
     if (rollout.RolledDate != DateTime.MinValue)
         this.dtpRolledDate.Value = rollout.RolledDate;
     EffortRollout er;
     foreach(Effort eff in rollout.Efforts){
         er = rollout.GetEffortRollout(eff);
         //er = eff.GetEffortRollout(rollout);
         if (er.DepartmentResponsibleForError != null){
             deptName = er.DepartmentResponsibleForError.Name;
         }
         item = new ListViewItem(new string[]{eff.ConventionalId, er.FinalComments, er.ReasonForRollBack,
                                                 er.ReasonForCodeFix, er.CodeFixedYesNo, deptName});
         item.Tag = er;
         lvwEfforts.Items.Add(item);
     }
 }
Beispiel #2
0
 public EffortData(Effort eff)
 {
     InitializeComponent();
     CatLists cls = new CatLists(Connections.Inst.item("QED_DB").MySqlConnection);
     CatList system = cls.item("System");
      _defaultUserDomain = system.Entry("/Defaults/UserDomain").Value;
     _eff = eff; this.Text = eff.ConventionalId;
     this.txtDBResx.Text = eff.DBResource;
     this.txtPM.Text = (eff.PMResource == "") ? _defaultUserDomain : eff.PMResource;
     this.txtTestedBy.Text = (eff.TestedBy == "") ? _defaultUserDomain : eff.TestedBy;
     this.txtWebResx.Text = (eff.WebResource == "") ? _defaultUserDomain : eff.WebResource;
     this.txtDBResx.Text = (eff.DBResource == "") ? _defaultUserDomain : eff.DBResource;
     this.txtMaxResx.Text = (eff.MaxResource == "") ? _defaultUserDomain : eff.MaxResource;
     this.txtUATApprovedBy.Text = (eff.UATApprovedBy == "") ? _defaultUserDomain : _eff.UATApprovedBy;
     // if (eff.IsTicket) this.txtRequester.Enabled = false;
     this.txtRequester.Text = (eff.Requester == "") ? _defaultUserDomain : _eff.Requester;
     this.chkUATApproved.Checked = eff.UATApproved;
     this.txtEnv.Text = eff.Environment;
     this.txtBranchFileHierarchy.Text = eff.BranchFileHierarchy;
 }
Beispiel #3
0
Datei: UI.cs Projekt: jhogan/qed
        public static bool ClientVerMatchesDBVer()
        {
            CatLists cls = new CatLists(Connections.Inst.item("QED_DB").MySqlConnection);
            CatList system =  cls.item("System");
            bool matches = true;
            int majorMax =0;
            int minorMax =0;
            int revMax = 0;

            int majorMin =0;
            int minorMin =0;
            int revMin = 0;

            int majorClient =0;
            int minorClient =0;
            int revClient = 0;

            string dbVersion = system.Entry("/Versioning/dbVersion").Value;
            string maxClientVer = system.Entry("/Versioning/MaxClientVersion").Value;
            string minClientVer = system.Entry("/Versioning/MinClientVersion").Value;

            // Parse Maximum Client Version Number
            majorMax = int.Parse(maxClientVer.Split('.')[0]);
            if (maxClientVer.Split('.').Length > 1) minorMax = int.Parse(maxClientVer.Split('.')[1]);
            if (maxClientVer.Split('.').Length > 2) revMax = int.Parse(maxClientVer.Split('.')[2]);

            // Parse Minimum Client Version Number
            majorMin = int.Parse(minClientVer.Split('.')[0]);
            if (minClientVer.Split('.').Length > 1) minorMin = int.Parse(minClientVer.Split('.')[1]);
            if (minClientVer.Split('.').Length > 2) revMin = int.Parse(minClientVer.Split('.')[2]);

            // Parse Actual Client Version Number
            majorClient = int.Parse(QED_CLIENT_ID.Split('.')[0]);
            if (QED_CLIENT_ID.Split('.').Length > 1) minorClient = int.Parse(QED_CLIENT_ID.Split('.')[1]);
            if (QED_CLIENT_ID.Split('.').Length > 2) revClient = int.Parse(QED_CLIENT_ID.Split('.')[2]);

            if (majorClient > majorMax || majorClient < majorMin){
                matches = false;
            }else{
                if (majorClient == majorMax){
                    if (minorClient > minorMax){
                        matches = false;
                    }
                    if (minorClient == minorMax){
                        if (revClient > revMax){
                            matches = false;
                        }
                    }

                }
                if (majorClient == majorMin){
                    if (minorClient < minorMin){
                        matches = false;
                    }
                    if (minorClient == minorMin){
                        if (revClient < revMin){
                            matches = false;
                        }
                    }
                }
            }
            return matches;
        }
Beispiel #4
0
Datei: UI.cs Projekt: jhogan/qed
        public static bool DemandClientVerMatchesDBVer(IWin32Window owner)
        {
            if (!UI.ClientVerMatchesDBVer()){
                CatLists cls = new CatLists(Connections.Inst.item("QED_DB").MySqlConnection);
                CatList system =  cls.item("System");
                string dbVersion = system.Entry("/Versioning/dbVersion").Value;
                string maxClientVer = system.Entry("/Versioning/MaxClientVersion").Value;
                string minClientVer = system.Entry("/Versioning/MinClientVersion").Value;
                string latestVerLoc =  system.Entry("/Versioning/LatestVersion").Value;
                string verMsg ="Client Version: " + QED_CLIENT_ID + "\r\n";
                verMsg += "Database version: " + dbVersion + "\r\n";
                verMsg += "Maximum client version supported: " + maxClientVer + "\r\n";
                verMsg += "Minimum client version supported: " + minClientVer;

                MessageBox.Show(owner, "This version of QED does not match the database version.\r\n"	+
                                                        "You need to get the latest version of the client at: " + latestVerLoc + "\r\n" + verMsg + "\r\n"+
                                                        "Operation will abort.",
                                                        "QED");
                return false;
            }
            return true;
        }
Beispiel #5
0
        private void rdoRolled_CheckedChanged(object sender, System.EventArgs e)
        {
            bool cancelTicketClose = false;
            string projects = ""; string from = ""; 	string subject = ""; string body = ""; 	string to = "";
            string smtp = "";	DialogResult res; string effortReport = ""; string commonEmail="";
            ArrayList distinct = new ArrayList();
            if (!_suppressRollCompletionProcess  && rdoRolled.Checked){
                CatLists cls = new CatLists(Connections.Inst.item("QED_DB").MySqlConnection);
                smtp = cls.item("System").Entry("/Email/SMTP").Value.Trim();
                CatList pubList = cls.item("Public");
                Entry emails = pubList.Entry("/System/Email/Rollout Release Emails");
                from = emails.SubEntry("From").Value.Trim();
                subject = emails.SubEntry("Subject").Value.Trim();
                body = emails.SubEntry("Body").Value.Trim();
                effortReport = "";
                to = "";
                foreach(Entry ent in emails.Categories){
                    if (_rollout.ClientId == Convert.ToInt16(ent.SubEntry("HTS Client ID").Value.Trim())){
                        to = ent.SubEntry("To").Value;
                        commonEmail = ent.SubEntry("CommonRelease").Value;
                        break;
                    }
                }
                if (UI.AskYesNoDefYes(this, "Would you like to compose and send an email to the release group") == DialogResult.Yes){
                    foreach(Effort eff in _rollout.Efforts){
                        if (eff.Rolled){
                            effortReport += "\t" + eff.ExternalId_Desc + n;
                        }
                    }
                    body = body.Replace("\\n", n);
                    body = body.Replace("@@EFFORTS",  effortReport);
                    SendMail sendMail = new SendMail(from, to, subject, body, smtp);
                    sendMail.ShowDialog(this);
                }
                if (commonEmail != ""){
                    subject = emails.SubEntry("CommonSubject").Value.Trim();
                    body = emails.SubEntry("CommonEmailBody").Value.Trim();
                    body = body.Replace("@@ROLLED_CLIENT", _rollout.Client.Name);
                    SendMail sendMail = new SendMail(from, commonEmail, subject, body, smtp, true);
                    sendMail.ShowDialog(this);
                }

                if (UI.AskYesNoDefNo(this, "Would you like to open the rolled efforts in your browser to close them?") == DialogResult.Yes){
                    foreach (Effort eff in _rollout.RolledEfforts){
                        if (!cancelTicketClose && eff.EffortType == EffortType.Ticket){
                            res = MessageBox.Show(this, "Open " + eff.ExternalId_Desc + "?", "QED", MessageBoxButtons.YesNoCancel);
                            if (res == DialogResult.Yes)
                                Process.Start(eff.URLReference);
                            else if (res == DialogResult.Cancel)
                                cancelTicketClose = true;
                        }else if (eff.EffortType == EffortType.Project){
                            projects += "\t" + eff.ExternalId_Desc + n;
                        }
                    }
                    if (projects != ""){
                        if (MessageBox.Show(this, "The below projects were rolled. Do you want to open PMO to close them?" + n + projects, "QED", MessageBoxButtons.YesNo) == DialogResult.Yes){
                            Process.Start("http://matrix/pmo/pmo_office/glb_base/pub_wf/index.cfm?view=W");
                        }
                    }
                }
            }
        }
Beispiel #6
0
        private void LoadDefaults()
        {
            CatLists cls = new CatLists(Connections.Inst.item("QED_DB").MySqlConnection);
            CatList pubList = cls.item("Public");
            Entry CVSPaths = pubList.Entry("/System/List/CVS Repositories");

            cboCVSRepos.Items.Clear();
            foreach(Entry ent in CVSPaths.Categories){
                cboCVSRepos.Items.Add(ent.SubEntry("Repos").Value);
            }

            cboSrcDir.Items.Clear();
            Entry srcDirs = pubList.Entry("/System/List/Source Directories");
            foreach(Entry ent in srcDirs.Categories){
                cboSrcDir.Items.Add(ent.SubEntry("PATH").Value);
            }

            cboCVSMod.Items.Clear();
            Entry CVSMod = pubList.Entry("/System/List/CVS Modules");
            foreach(Entry ent in CVSMod.Categories){
                cboCVSMod.Items.Add(ent.SubEntry("PATH").Value);
            }

            cboDest.Items.Clear();
            cboDest.DisplayMember = "Path";
            cboDest.DropDownStyle = ComboBoxStyle.DropDownList;

            Entry rollDestEnts = pubList.Entry("/System/List/Generic Roll Destinations");
            RolloutDestination rollDest;
            foreach(Entry ent in rollDestEnts.Categories){
                rollDest  = new RolloutDestination();
                rollDest.Path = ent.SubEntry("Destination").Value;
                rollDest.BKPath = ent.SubEntry("Backup").Value;
                if (rollDest.Path.Trim() != null && rollDest.BKPath.Trim() != "")
                    cboDest.Items.Add(rollDest);
            }

            cboScenarios.Items.Clear();
            Entry rollScenarios = pubList.Entry("/System/General Roller/Roll Scenarios");
            cboScenarios.DisplayMember = "Key";
            foreach(Entry scenarioEnt in rollScenarios.Categories){
                    cboScenarios.Items.Add(scenarioEnt);
            }

            if (txtExportRoot.Text.Trim() == "")
                txtExportRoot.Text = pubList.Entry("/System/Temp CVS Export Root/PATH").Value;
        }
Beispiel #7
0
		/* START DOCUMENTATION*/
		private void menuItem10_Click(object sender, System.EventArgs e) {
			CatLists cls = new CatLists(Connections.Inst.item("QED_DB").MySqlConnection);
			System.Diagnostics.Process.Start(cls.item("System").Entry("/Directories/Max Documentation/Location").Value);
		
		}
Beispiel #8
0
		private void mnuItemAbout_Click(object sender, System.EventArgs e) {
			CatLists cls = new CatLists(Connections.Inst.item("QED_DB").MySqlConnection);
			CatList system = cls.item("System");
			About about = new About();
			TextBox text =  about.txtAbout;
			text.Text += "Program: QED\r\n";
			text.Text += "Original Author: Jesse Hogan\r\n";
			text.Text += "Client Version: " + UI.QED_CLIENT_ID + "\r\n";
			text.Text += "Database version: " + system.Entry("/Versioning/dbVersion").Value + "\r\n";
			text.Text += "Maximum client version supported: " + system.Entry("/Versioning/MaxClientVersion").Value + "\r\n";
			text.Text += "Minimum client version supported: " + system.Entry("/Versioning/MinClientVersion").Value + "\r\n";
			about.ShowDialog(this);
		}
Beispiel #9
0
		private void Load_tvwHier() {
			CatLists cls = new CatLists(Connections.Inst.item("QED_DB").MySqlConnection);
			CatList pubList;
			if (!cls.Contains("Public") )
				pubList = cls.AddNew("Public");
			else
				pubList = cls.item("Public");
			
			if (Thread.CurrentPrincipal.IsInRole("admin"))
			{
				if (!cls.Contains("System") )
					cls.AddNew("System");
			}
			_pubList = pubList;
			_systemList = cls.item("System");
			
			this.cboCatLists.Items.Clear();
			foreach(CatList cl in cls){
					this.cboCatLists.Items.Add(cl);
			}
			if (!Thread.CurrentPrincipal.IsInRole("admin")){
				this.cboCatLists.Items.Remove(cls.item("System"));
			}
			this.cboCatLists.SelectedItem = pubList;
			this.UpdateList();
		}