예제 #1
0
파일: Listado.cs 프로젝트: marrtins/gdd2018
        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();
            }
        }
예제 #2
0
        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();
            }
        }
예제 #3
0
        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();
            }
        }