Exemplo n.º 1
0
        public bool Read()
        {
            try
            {
                DALC.CLIENTE_EMPRESA c1 = CommonBC.Modelo.CLIENTE_EMPRESA.First(c => c.RUT == Rut);

                Rut           = string.Empty;
                IdGiro        = 0;
                IdComuna      = 0;
                Nombre        = string.Empty;
                Telefono      = string.Empty;
                Direccion     = string.Empty;
                Correo        = string.Empty;
                ClienteMoroso = 0;

                return(true);
            }
            catch (Exception ex)
            {
                return(false);
            }
        }
Exemplo n.º 2
0
 public bool Create()
 {
     try
     {
         DALC.CLIENTE_EMPRESA info = new DALC.CLIENTE_EMPRESA()
         {
             RUT            = Rut,
             ID_GIRO        = IdGiro,
             CLIENTE_MOROSO = ClienteMoroso,
             CORREO         = Correo,
             DIRECCION      = Direccion,
             ID_COMUNA      = IdComuna,
             NOMBRE         = Nombre,
             TELEFONO       = Telefono
         };
         CommonBC.Modelo.CLIENTE_EMPRESA.Add(info);
         CommonBC.Modelo.SaveChanges();
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }