示例#1
0
 private void dgvDomicilios_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     formDomi = new DomicilioForm(this.iDUser);
     formDomi.ShowDialog();
     ReLoadDgvDomicilio(formDomi);
     formDomi.Close();
 }
示例#2
0
 private void btnAddDomicilio_Click(object sender, EventArgs e)
 {
     formDomi = new DomicilioForm();
     formDomi.ShowDialog();
     if (formDomi.ActiveControl.Text != "Cancelar")
     {
         ReLoadDgvDomicilio(formDomi);
     }
     formDomi.Close();
 }
示例#3
0
        private void ReLoadDgvDomicilio(DomicilioForm FD)
        {
            var li       = new List <Direccion>();
            var dataList = dgvDomicilios.DataSource as List <Direccion>;

            if (dgvDomicilios.DataSource != null)
            {
                foreach (var domi in dataList)
                {
                    li.Add(domi);
                }
                li.Add(FD.GetDomicilioIngresado());
            }
            else
            {
                li.Add(FD.GetDomicilioIngresado());
            }
            dgvDomicilios.DataSource = li;
            FormatDGV();
        }