Implement the following classes:
- Singleton class named
AlmacenDatos
with read-only properties to store the list of:Ejecutivos
- Use the singleton class in data manipulation.
public class ClassEjecutivo
{
//propiedades
public ClassSucursal SucursalDeAdscripcion;
public string Nombre;// { set; get; }
public string Apellidos;// { set; get; }
public string Domicilio; //{ set; get; }
public string Localidad; //{ set; get; }
public string Municipio; //{ set; get; }
public string Estado; // { set; get; }
public string CURP; //{ set; get; }
public string RFC; //{ set; get; }
public string Telefono1; //{ set; get; }
public string Telefono2; // { set; get; }
public string Cargo; // { set; get; }
}
and my other class is called DatosAplicacion
, which is where I store my executive class list:
public class DatosAplicacion
{
static List<ClassSucursal> listaSucursales = new List<ClassSucursal>();
public static List<ClassSucursal> Sucursales()
{
return listaSucursales;
}
public static ClassSucursal AgregarSucursal (ClassSucursal item)
{
listaSucursales.Add(item);
return item;
}