private void AbrirModificar(Hotel hotel) { var hotelCopy = ObjectCloner.DeepCopy(hotel); if (hotelCopy.FechaDeCreacion == DateTime.MinValue) { MessageBox.Show("El hotel seleccionado no tiene una fecha de creacion. " + "Es posible que esto suceda porque fue creado al realizar una migracion. Se utilizara la fecha de hoy por defecto", "Advertencia"); hotelCopy.FechaDeCreacion = LoginData.SystemDate; } InsertarModificar ins = new InsertarModificar(1, hotelCopy); this.Hide(); ins.ShowDialog(); this.Show(); if (ins.Result == DialogResult.OK) { RefreshData(); } }
private void button3_Click(object sender, System.EventArgs e) { InsertarModificar ins = new InsertarModificar(LoginData.IdUsuario); this.Hide(); ins.ShowDialog(); this.Show(); if (ins.Result == DialogResult.OK) { RefreshData(); } }
private void AbrirModificar(Hotel hotel) { InsertarModificar ins = new InsertarModificar(1, ObjectCloner.DeepCopy(hotel)); this.Hide(); ins.ShowDialog(); this.Show(); if (ins.Result == DialogResult.OK) { RefreshData(); } }