예제 #1
0
 public void DeleteAgent(clsAgent agent)
 {
     foreach (DataRow myrow in clsGlobal.tbAgents.Rows)
     {
         if (myrow["AgentID"].ToString() == agent.Id.ToString())
         {
             myrow.Delete();
         }
     }
 }
예제 #2
0
        public void AddAgent(clsAgent agent)
        {
            DataRow myRow = clsGlobal.tbAgents.NewRow();

            myRow["AgentID"]      = agent.Id;
            myRow["Nom"]          = agent.Name;
            myRow["Email"]        = agent.Email;
            myRow["Cellulaire"]   = agent.Phone;
            myRow["NAS"]          = agent.Ssn;
            myRow["DateEmbauche"] = agent.Hire_date;
            myRow["Password"]     = agent.Password;
            clsGlobal.tbAgents.Rows.Add(myRow);
        }
예제 #3
0
 public void EditAgent(clsAgent agent)
 {
     foreach (DataRow myrow in clsGlobal.tbAgents.Rows)
     {
         if (myrow["AgentID"].ToString() == agent.Id.ToString())
         {
             myrow["Nom"]          = agent.Name;
             myrow["Email"]        = agent.Email;
             myrow["Cellulaire"]   = agent.Phone;
             myrow["NAS"]          = agent.Ssn;
             myrow["DateEmbauche"] = agent.Hire_date;
             myrow["Password"]     = agent.Password;
         }
     }
 }