コード例 #1
0
 public static void databaseFileRead(ContactAsesoria blob)
 {
     {
         SaveFileDialog svg = new SaveFileDialog();
         svg.ShowDialog();
         using (var fs = new FileStream(svg.FileName + ".pdf", FileMode.Create, FileAccess.Write))
             fs.Write(blob.PDF, 0, (blob.PDF).Length);
     }
 }
コード例 #2
0
 public static void databaseFilePut(string varFilePath, ContactAsesoria File)
 {
     using (var stream = new FileStream(varFilePath, FileMode.Open, FileAccess.Read))
     {
         using (var reader = new BinaryReader(stream))
         {
             File.PDF = reader.ReadBytes((int)stream.Length);
         }
     }
 }
コード例 #3
0
 public ContactAsesoria SaveContactAsesoria(ContactAsesoria Contact)
 {
     if (Contact.Id == 0)
     {
         _dataAccessLayer.InserContactAsesoria(Contact);
     }
     //  else
     // {
     //    _dataAccessLayer.UpdateContactNMB(Contact);
     //}
     return(Contact);
 }
コード例 #4
0
 public ContactAsesoria SaveDocument(ContactAsesoria Contact)
 {
     // int flag = Contact.IdDocumento;
     // if (flag == 0)
     //{
     _dataAccessLayer.InsertDocuments(Contact);
     //}
     //else
     //{
     //   _dataAccessLayer.UpdateDocuments(Contact);
     //}
     return(Contact);
 }
コード例 #5
0
        public void SaveData()
        {
            ContactAsesoria contact = new ContactAsesoria
            {
                IdCuidador   = int.Parse(txtID.Text),
                Fecha        = dateTimePicker1.Value,
                TipoAtencion = txtTipoAtencion.Text,
                TipoCaso     = txtTipoCaso.Text,
                Seguimiento  = txtSeguimiento.Text,
                Observacion  = txtObservacion.Text,
                Evolucion    = txtEvolucion.Text,
                Estatus      = txtEstatus.Text,
            };

            _LogicLayer.InsertCitaAsesoria(contact);
        }
コード例 #6
0
        private void SaveDocument()
        {
            if (txtIdNMB.Text == "")
            {
                txtIdNMB.Text = "0";
            }
            ContactAsesoria document = new ContactAsesoria
            {
                IdCuidador    = int.Parse(txtID.Text),
                IdNMB         = int.Parse(txtIdNMB.Text),
                TipoDocumento = ComboDocumento.Text,
            };

            Metodos.databaseFilePut(filepath, document);
            _LogicLayer.SaveDocument(document);
            //}
        }
コード例 #7
0
        private void SaveContactAsesoria()
        {
            ContactAsesoria Contact = new ContactAsesoria
            {
                IdCuidador = int.Parse(txtID.Text),
                Nombre     = TxtNombre.Text,
                Apellido   = TxtApellido.Text,
                Direccion  = TxtDireccion.Text,
                Telefono   = txtTelefono.Text,
                Ocupacion  = txtOcupacion.Text,
                Cedula     = txtCedula.Text,
                Parroquia  = txtParroquia.Text,
                Municipio  = txtMunicipio.Text,
                Estado     = txtEstado.Text,
                Vinculo    = txtVinculo.Text,
                Id         = _contactAsesoria != null ? _contactAsesoria.Id : 0
            };

            _LogicLayer.SaveContactAsesoria(Contact);
        }
コード例 #8
0
 public ContactAsesoria InsertCitaAsesoria(ContactAsesoria Contact)
 {
     _dataAccessLayer.InserCitaAsesoria(Contact);
     return(Contact);
 }
コード例 #9
0
        public void LoadDocument(ContactAsesoria contact)

        {
            Metodos.databaseFileRead(contact);
        }