Exemplo n.º 1
0
        public void AddClient(clsClient client)
        {
            DataRow myrow = clsGlobal.tbClients.NewRow();

            myrow["ClientID"] = client.Id;
            myrow["Nom"]      = client.Name;
            myrow["Phone"]    = client.Phone;
            myrow["Email"]    = client.Email;
            myrow["Type"]     = client.Type;
            myrow["AgentID"]  = client.AgentId;
            clsGlobal.tbClients.Rows.Add(myrow);
        }
Exemplo n.º 2
0
 public void EditClient(clsClient client)
 {
     foreach (DataRow myrow in clsGlobal.tbClients.Rows)
     {
         if (myrow["ClientID"].ToString() == client.Id.ToString())
         {
             myrow["Nom"]     = client.Name;
             myrow["Phone"]   = client.Phone;
             myrow["Email"]   = client.Email;
             myrow["Type"]    = client.Type;
             myrow["AgentID"] = client.AgentId;
         }
     }
 }