///******************************************************************************* ///NOMBRE DE LA FUNCIÓN: Btn_Transferir_Click ///DESCRIPCIÓN : Evento click del botón transferir ///PARAMENTROS : ///CREO : Miguel Angel Bedolla Moreno ///FECHA_CREO : 21/Feb/2013 01:01 p.m. ///MODIFICO : ///FECHA_MODIFICO: ///CAUSA_MODIFICACIÓN: ///******************************************************************************* private void Btn_Transferir_Click(object sender, EventArgs e) { if (Btn_Transferir.Text == "Modificar") { if (Txt_Contenedor_Id.Text.Trim() != "") { String Contenedor_Id = Txt_Contenedor_Id.Text; String Contenedor = Txt_Contenedor.Text; String Ubicacion_Actual = Txt_Ubicacion_Anterior.Text; Cls_Metodos_Generales.Habilita_Deshabilita_Controles(Fra_Datos_Generales, true); Cls_Metodos_Generales.Limpia_Controles(Fra_Datos_Generales); Txt_Contenedor_Id.Text = Contenedor_Id; Txt_Contenedor.Text = Contenedor; Txt_Ubicacion_Anterior.Text = Ubicacion_Actual; Habilitar_Controles("Transferir"); Txt_Contenedor.Enabled = false; Txt_Ubicacion_Anterior.Enabled = false; //Cmb_Ubicacion.Focus(); } } else { if (Validar_Componentes()) { String P_Ubicacion_Anterior_Id = ""; Cls_Ope_Embarques_Negocio P_Movimiento = new Cls_Ope_Embarques_Negocio(); P_Movimiento.P_Contenedor_Id = Txt_Contenedor_Id.Text; P_Movimiento.P_Observaciones = Txt_Observaciones.Text.ToUpper(); if (Cmb_Ubicacion_Fg.Visible) { P_Movimiento.P_Ubicacion_Id = Cmb_Ubicacion_Fg.SelectedValue.ToString(); } else if (Cmb_Ubicacion_Wip.Visible) { P_Movimiento.P_Ubicacion_Id = Cmb_Ubicacion_Wip.SelectedValue.ToString(); } else if (Cmb_Ubicacion_Wipfg.Visible) { P_Movimiento.P_Ubicacion_Id = Cmb_Ubicacion_Wipfg.SelectedValue.ToString(); } Cls_Cat_Contenedores_Negocio P_Contenedor = new Cls_Cat_Contenedores_Negocio(); P_Contenedor.P_Contenedor_Id = Txt_Contenedor_Id.Text; P_Ubicacion_Anterior_Id = P_Contenedor.Consultar_Contenedores().Rows[0][Cat_Contenedores.Campo_Ubicacion_Id].ToString(); if (P_Movimiento.Alta_Transferencia_Contenedor()) { //Enviar_Correo(P_Ubicacion_Anterior_Id); Cls_Metodos_Generales.Habilita_Deshabilita_Controles(Fra_Datos_Generales, false); Cls_Metodos_Generales.Limpia_Controles(Fra_Datos_Generales); Habilitar_Controles("Inicial"); Txt_Contenedor.Enabled = true; Limpiar_Grid(); Llenar_Combo_Fg(); Llenar_Combo_Wip(); Llenar_Combo_Wip_Fg(); MessageBox.Show("Transferencia del contenedor exitosa", "Trasferencia de contenedores", MessageBoxButtons.OK, MessageBoxIcon.Asterisk, MessageBoxDefaultButton.Button1); Txt_Contenedor.Enabled = true; Txt_Contenedor.Focus(); } } } }