示例#1
0
文件: List.cs 项目: jhogan/qed
 private void Load(MySqlDataReader dr)
 {
     SetId(Convert.ToInt32(dr["Id"]));
     this._key = Convert.ToString(dr["key_"]);
     this._value = Convert.ToString(dr["value"]);
     this._leaf = Convert.ToBoolean(dr["leaf"]);
     this._listName = Convert.ToString(dr["listName"]);
     this._parId = Convert.ToInt32(dr["parId"]);
     MarkOld();
 }
示例#2
0
文件: Messages.cs 项目: jhogan/qed
 public Message(MySqlDataReader dr)
 {
     this.Load(dr);
 }
示例#3
0
文件: List.cs 项目: jhogan/qed
 public Entry(MySqlDataReader dr, CatList catList)
 {
     Setup();
     _catList = catList;
     this.Load(dr);
 }
示例#4
0
文件: Efforts.cs 项目: jhogan/qed
 public Effort(MySqlDataReader dr)
 {
     this.Load(dr);
 }
示例#5
0
文件: Efforts.cs 项目: jhogan/qed
 public void Load(MySqlDataReader dr)
 {
     Setup();
     SetId(Convert.ToInt32(dr["Id"]));
     _extId = Convert.ToInt32(dr["extId"]);
     this._effId = new EffortID(dr["type"].ToString() + _extId);
     _testedBy = Convert.ToString(dr["testedBy"]);
     _approved = Convert.ToBoolean(dr["approved"]);
     _pmResource = Convert.ToString(dr["pmResource"]);
     _webResource = Convert.ToString(dr["webResource"]);
     _dbResource = Convert.ToString(dr["dbResource"]);
     _uatApproved = Convert.ToBoolean(dr["uatApproved"]);
     _projectManager = Convert.ToString(dr["pmResource"]);
     _maxResource = Convert.ToString(dr["maxResource"]);
     _uatApprovedBy = Convert.ToString(dr["uatApprovedBy"]);
     _branchFileHierarchy = Convert.ToString(dr["branchFileHierarchy"]);
     _environment = Convert.ToString(dr["environment"]);
     if (Convert.ToChar(dr["type"]) == 'P')
         _effType = EffortType.Project;
     if (Convert.ToChar(dr["type"]) == 'T')
         _effType = EffortType.Ticket;
     this._desc = Convert.ToString(dr["desc_"]);
     _requester = Convert.ToString(dr["requestor"]);
     MarkOld();
 }
示例#6
0
文件: Rollout.cs 项目: jhogan/qed
 public void Load(MySqlDataReader dr)
 {
     Setup();
     SetId(Convert.ToInt32(dr["Id"]));
     this._clientId = Convert.ToInt32(dr["clientId"]);
     this._finalComments= Convert.ToString(dr["finalComments"]);
     this._rolledBack = Convert.ToBoolean(dr["rolledBack"]);
     this._rolledDate= Convert.ToDateTime(dr["rolledDate"]);
     this._scheduledDate = Convert.ToDateTime(dr["scheduledDate"]);
     this._rolledBy = Convert.ToString(dr["rolledBy"]);
     this.Rolled = Convert.ToBoolean(dr["rolled"]);
     MarkOld();
 }
示例#7
0
文件: Groups.cs 项目: jhogan/qed
 public void Load(MySqlDataReader dr)
 {
     Setup();
     SetId(Convert.ToInt32(dr["Id"]));
     string name = Convert.ToString(dr["Name"]);
     string[] splitName = System.Text.RegularExpressions.Regex.Split(name, " - ");
     if (splitName.Length == 1) {
         this._name = splitName[0].Trim();
         this._retired = false;
     }else{
         if (splitName[0] == "RETIRED") {
             this._retired = true;
             this._name = splitName[1].Trim();
         }else{
             this._retired = false;
             this._name = splitName[0].Trim();
         }
     }
     this._description = Convert.ToString(dr["Description"]);
     this._email = Convert.ToString(dr["Email"]);
     MarkOld();
 }
示例#8
0
文件: Defects.cs 项目: jhogan/qed
 public Defect(MySqlDataReader dr)
 {
     this.Load(dr);
 }
示例#9
0
文件: RollLog.cs 项目: jhogan/qed
 public void Load(MySqlDataReader dr)
 {
     Setup();
     SetId(Convert.ToInt32(dr["Id"]));
     if (dr.GetSchemaTable().Select("ColumnName = 'text'").Length == 1)  // Check the schema to determine if the "text" column is in it.
         this._text = Convert.ToString(dr["text"]);
     this._userEmail = Convert.ToString(dr["userEmail"]);
     this._rollClass = Convert.ToString(dr["rollClass"]);
     this._rollType = (RollType)Enum.Parse(Type.GetType("QED.Business.CodePromotion.RollType"), Convert.ToString(dr["rollType"]));
     if (dr["ts"] != DBNull.Value)
         this._dateTime = Convert.ToDateTime(dr["ts"]);
     MarkOld();
 }
示例#10
0
文件: Servers.cs 项目: jhogan/qed
 public Server(MySqlDataReader dr)
 {
     this.Load(dr);
 }
示例#11
0
文件: Defects.cs 项目: jhogan/qed
 public void Load(MySqlDataReader dr)
 {
     Setup();
     SetId(Convert.ToInt32(dr["id"]));
     this._desc = dr["desc_"].ToString();
     this._effId = Convert.ToInt32(dr["effId"]);
     this._rollId =  Convert.ToInt32(dr["rollId"]);
     this._resolver = dr["resolver"].ToString();
     this._createdBy = dr["createdBy"].ToString();
     //this._status = dr["Status"].ToString();
     this._forRoll = Convert.ToBoolean(dr["forRoll"]);
     MarkOld();
 }
示例#12
0
文件: Servers.cs 项目: jhogan/qed
 public void Load(MySqlDataReader dr)
 {
     Setup();
     SetId(Convert.ToInt32(dr["Id"]));
     this._desc = Convert.ToString(dr["desc_"]);
     this._dnsName = Convert.ToString(dr["dnsName"]);
     MarkOld();
 }
示例#13
0
		/// <summary>
		/// Executes the query, and returns the first column of the first row in the 
		/// result set returned by the query. Extra columns or rows are ignored.
		/// </summary>
		/// <returns></returns>
		public object ExecuteScalar()
		{
			// There must be a valid and open connection.
			if (connection == null || connection.State != ConnectionState.Open)
				throw new InvalidOperationException("Connection must be valid and open");

			// Data readers have to be closed first
			if (connection.Reader != null)
				throw new MySqlException("There is already an open DataReader associated with this Connection which must be closed first.");

			arraySql = SplitSql( cmdText );

			updateCount = -1;
			MySqlDataReader reader = new MySqlDataReader(this, 0);
			reader.NextResult();
			object val = null;
			if (reader.Read())
				val = reader.GetValue(0);
			reader.Close();
			return val;
		}
示例#14
0
		/// <summary>
		/// Overloaded. Sends the CommandText to the Connection and builds a MySqlDataReader.
		/// </summary>
		/// <returns></returns>
		public MySqlDataReader ExecuteReader(CommandBehavior behavior)
		{
			// There must be a valid and open connection.
			if (connection == null || connection.State != ConnectionState.Open)
				throw new InvalidOperationException("Connection must be valid and open");

			// make sure all readers on this connection are closed
			if (connection.Reader != null)
				throw new InvalidOperationException("There is already an open DataReader associated with this Connection which must be closed first.");

			string sql = cmdText;

			if (0 != (behavior & CommandBehavior.KeyInfo))
			{
			}

			if (0 != (behavior & CommandBehavior.SchemaOnly))
			{
			}

			if (0 != (behavior & CommandBehavior.SequentialAccess))
			{
			}

			if (0 != (behavior & CommandBehavior.SingleResult))
			{
			}

			if (0 != (behavior & CommandBehavior.SingleRow))
			{
				sql = String.Format("SET SQL_SELECT_LIMIT=1;{0};SET sql_select_limit=-1;", cmdText);
			}

			arraySql = SplitSql( sql );

			updateCount = -1;
			MySqlDataReader reader = new MySqlDataReader(this, behavior);

			// move to the first resultset
			reader.NextResult();
			connection.Reader = reader;
			return reader;
		}
示例#15
0
        public void Load(MySqlDataReader dr)
        {
            SetId(Convert.ToInt32(dr["Id"]));
            this._effortId = Convert.ToInt32(dr["effId"]);
            this._rolloutId = Convert.ToInt32(dr["rollId"]);
            this._rolled = Convert.ToBoolean(dr["rolled"]);
            this._text = Convert.ToString(dr["text"]);
            this._reasonForCodeFix = Convert.ToString(dr["reasonForCodeFix"]);
            this._reasonForRollBack = Convert.ToString(dr["reasonForRollBack"]);
            if (dr["wasCodeFixed"] == DBNull.Value)
                this._codeFixed = -1;
            else
                this._codeFixed = Convert.ToInt32(dr["wasCodeFixed"]);

            this._departmentResponsibleForErrorId = Convert.ToInt32(dr["departmentResponsibleForErrorId"]);
            this._finalComments= Convert.ToString(dr["finalComment"]);
            MarkOld();
        }
示例#16
0
文件: Times.cs 项目: jhogan/qed
 public void Load(MySqlDataReader dr)
 {
     Setup();
     SetId(Convert.ToInt32(dr["Id"]));
     this._effId = Convert.ToInt32(dr["effId"]);
     this._rollId = Convert.ToInt32(dr["rollId"]);
     this._minutes = Convert.ToInt32(dr["minutes"]);
     this._date = Convert.ToDateTime(dr["date"]);
     this._user = Convert.ToString(dr["user"]);
     this._text = Convert.ToString(dr["text"]);
     MarkOld();
 }
示例#17
0
 public EffortRollout(MySqlDataReader dr)
 {
     Setup();
     this.Load(dr);
 }
示例#18
0
文件: Times.cs 项目: jhogan/qed
 public Time(MySqlDataReader dr)
 {
     this.Load(dr);
 }
示例#19
0
文件: Rollout.cs 项目: jhogan/qed
 public Rollout(MySqlDataReader dr)
 {
     this.Load(dr);
 }
示例#20
0
文件: Connections.cs 项目: jhogan/qed
 public void Load(MySqlDataReader dr)
 {
     Setup();
     SetId(Convert.ToInt32(dr["Id"]));
     this._catalog = Convert.ToString(dr["catalog"]);
     this._encPasswd = Convert.ToString(dr["passwd"]);
     this._port = Convert.ToInt32(dr["port"]);
     this._protocol = (QED.Business.Protocol) Enum.Parse(typeof(QED.Business.Protocol), Convert.ToString(dr["protocol"]));
     this._serverId = Convert.ToInt32(dr["serverId"]);
     this._SSPI = Convert.ToBoolean(dr["sspi"]);
     this._systemName = Convert.ToString(dr["systemName"]);
     this._transport = (QED.Business.Transport) Enum.Parse(typeof(QED.Business.Transport), Convert.ToString(dr["transport"]));
     this._user = Convert.ToString(dr["user"]);
     MarkOld();
 }
示例#21
0
文件: Groups.cs 项目: jhogan/qed
 public Group(MySqlDataReader dr)
 {
     this.Load(dr);
 }
示例#22
0
文件: Connections.cs 项目: jhogan/qed
 public Connection(MySqlDataReader dr)
 {
     this.Load(dr);
 }
示例#23
0
文件: Efforts.cs 项目: jhogan/qed
 public Effort(MySqlDataReader dr, bool loadExternal)
 {
     this.Load(dr);
     if (loadExternal)
         this.LoadExternal();
 }
示例#24
0
文件: Clients.cs 项目: jhogan/qed
 public Client(MySqlDataReader dr)
 {
     this.Load(dr);
 }
示例#25
0
文件: Efforts.cs 项目: jhogan/qed
 public void LoadTicket(MySqlDataReader dr)
 {
     /*TODO: There are more ticket data we could get here but other table hits would be necessary */
     this._extId = Convert.ToInt32(dr["ID"]);
     this._overdue = (dr["overdue"] == DBNull.Value) ? false : Convert.ToBoolean(dr["overdue"]);
     if (dr["CreationDate"] != DBNull.Value)
         this._creationDate = Convert.ToDateTime(dr["CreationDate"]);
     if (dr["CloseDate"] != DBNull.Value)
         this._closeDate = Convert.ToDateTime(dr["CloseDate"]);
     if (dr["ClientId"] != DBNull.Value)
         this._clientId = Convert.ToInt32(dr["ClientId"]);
     if (dr["PriorityID"] != DBNull.Value)
         this._priorityID = Convert.ToInt32(dr["PriorityID"]);
 }
示例#26
0
文件: Messages.cs 项目: jhogan/qed
 public void Load(MySqlDataReader dr)
 {
     Setup();
     SetId(Convert.ToInt32(dr["Id"]));
     this._text = Convert.ToString(dr["text"]);
     this._effId = Convert.ToInt32(dr["effId"]);
     this._rollId = Convert.ToInt32(dr["rollId"]);
     this._createdBy = Convert.ToString(dr["createdBy"]);
     MarkOld();
 }