public void RegistrarMotivoColgateBodega_Mov(E_Registro_MotivoFase oE_Registro_MotivoFase) { try { //using (System.Transactions.TransactionScope tx = new System.Transactions.TransactionScope()) //{ oD_Registrar_Motivo.RegistrarMotivoColgateBodega_Mov(oE_Registro_MotivoFase); //tx.Complete(); //} } catch (Exception ex) { log.Error("[BL_Registrar_Motivo] [RegistrarMotivoColgateBodega_Mov_Failed]:", ex); throw new Exception(); } }
public void RegistrarMotivoColgateBodega_Mov(E_Registro_MotivoFase oE_Registro_MotivoFase) { try { #region Registrar MotivoFase en Intermedia oCoon = new Conexion(3); string id_MotivoFase = oCoon.ejecutarretornodeOUTPUT("SP_MOV_GES_OPE_REGISTRAR_MOTIVOFASE", 8, oE_Registro_MotivoFase.Cod_Persona, oE_Registro_MotivoFase.Cod_Equipo, oE_Registro_MotivoFase.Cod_Compania, oE_Registro_MotivoFase.Cod_PtoVenta, oE_Registro_MotivoFase.Latitud ?? null, oE_Registro_MotivoFase.Longitud ?? null, oE_Registro_MotivoFase.Origen ?? null, oE_Registro_MotivoFase.Fase ?? null, 0); #endregion if (!id_MotivoFase.Equals("0")) { #region Eliminar Detalle MotivoFase en Intermedia oCoon = new Conexion(3); oCoon.ejecutarDataSet("SP_MOV_GES_OPE_ELIMINAR_MOTIVOFASE_DETALLE", id_MotivoFase); #endregion #region Eliminar Detalle MotivoFase en Xplora oCoon = new Conexion(1); oCoon.ejecutarDataSet("SP_XPL_GES_OPE_ELIMINAR_MOTIVOFASE_DETALLE", id_MotivoFase); #endregion foreach (E_MotivoFase oE_MotivoFase in oE_Registro_MotivoFase.listaMotivo) { RegistrarMotivoFaseColgateBodega_Mov(oE_MotivoFase, id_MotivoFase); } } #region Actualizar MotivoFase en Xplora oCoon = new Conexion(1); oCoon.ejecutarDataTable("SP_XPL_GES_OPE_ACTUALIZAR_MOTIVOFASE", oE_Registro_MotivoFase.Cod_Persona, oE_Registro_MotivoFase.Cod_Equipo, oE_Registro_MotivoFase.Cod_Compania, oE_Registro_MotivoFase.Cod_PtoVenta, oE_Registro_MotivoFase.Latitud ?? null, oE_Registro_MotivoFase.Longitud ?? null, oE_Registro_MotivoFase.Origen ?? null, oE_Registro_MotivoFase.Fase ?? null); #endregion } catch (Exception ex) { throw ex; } }
/// <summary> /// Descripcion :Asignar al Mercaderista la Ruta. /// Fecha :06/05/2012 PSA /// </summary> /// <param name="oE_Reporte"></param> /// <param name="Cod_POSPlanning"></param> private int Registrar_PDV_Planning_Oper(E_Reporte_RegistroPDV_Mov oE_Reporte, string Id_MPOSPlanning, string ClientPDV_Code) { int correcto = 1; try { D_Reporte_Presencia oD_Reporte_Presencia = new D_Reporte_Presencia(); D_Registrar_Motivo oD_Registrar_Motivo = new D_Registrar_Motivo(); #region Registrar Ruta en Xplora oCoon = new Conexion(1); oCoon.ejecutarDataTable("SP_XPL_GES_CAM_INSERTARPDVPLANNING_OPER" , Id_MPOSPlanning , oE_Reporte.Cod_Equipo , oE_Reporte.Cod_Persona , oE_Reporte.Fecha_Registro //Fecha_Inicio del Relevo , null // Cod Frecuencia , false // Estado , oE_Reporte.Creado_Por , oE_Reporte.Fecha_Registro , ClientPDV_Code); #endregion #region Registrar Ruta en Intermedia -- Comentado Psa 23/10/2012 //oCoon = new Conexion(3); //oCoon.ejecutarDataSet("SP_MOV_GES_CAM_REGISTRAR_RUTA" // , oE_Reporte.Cod_Equipo // , ClientPDV_Code ?? null // , oE_Reporte.Cod_Persona ?? null // , oE_Reporte.Fecha_Registro ?? null //Fecha Inicio Ruta // , null //Fecha Fin Ruta // , 1 //Estado // ); #endregion #region Registrar Ruta con Fase en Xplora - >>>>>Warning<<<<<<<< #endregion #region Registrar Ruta con Fase en Intermedia -- Comentado Psa 23/10/2012 oCoon = new Conexion(3); oCoon.ejecutarDataSet("SP_MOV_GES_CAM_REGISTRAR_RUTA_FASE" , ClientPDV_Code , oE_Reporte.Cod_Equipo , "NI" //Fase NI ); #endregion #region Registrar Presencia en BD Intermedia con Fase E_Reporte_Presencia_Mov oE_Reporte_Presencia_Mov = new E_Reporte_Presencia_Mov(); oE_Reporte_Presencia_Mov.Cod_Equipo = oE_Reporte.Cod_Equipo; oE_Reporte_Presencia_Mov.Cod_Compania = int.Parse(oE_Reporte.Cod_Compania); oE_Reporte_Presencia_Mov.Cod_PtoVenta = ClientPDV_Code; oE_Reporte_Presencia_Mov.Cod_Persona = int.Parse(oE_Reporte.Cod_Persona); oE_Reporte_Presencia_Mov.FechaRegistro = oE_Reporte.Fecha_Registro; oE_Reporte_Presencia_Mov.Latitud = oE_Reporte.Latitud; oE_Reporte_Presencia_Mov.Longitud = oE_Reporte.Longitud; oE_Reporte_Presencia_Mov.Origen = oE_Reporte.Origen; oE_Reporte_Presencia_Mov.Fase = "NI"; oE_Reporte_Presencia_Mov.Nuevo = "1"; oD_Reporte_Presencia.Registrar_Presencia_Mov_Cabecera(oE_Reporte_Presencia_Mov, 0); #endregion #region Regisrar Motivos - No Implementación o No Mantenimiento en BD Intermedia E_MotivoFase oE_MotivoFase = new E_MotivoFase(); oE_MotivoFase.CodMotivo = 93;//Motivo de No Implementación, 93 - Por Implementar. E_Registro_MotivoFase oE_Registro_MotivoFase = new E_Registro_MotivoFase(); oE_Registro_MotivoFase.Cod_Persona = int.Parse(oE_Reporte.Cod_Persona); oE_Registro_MotivoFase.Cod_PtoVenta = ClientPDV_Code; oE_Registro_MotivoFase.Cod_Equipo = oE_Reporte.Cod_Equipo; oE_Registro_MotivoFase.Cod_Compania = int.Parse(oE_Reporte.Cod_Compania); oE_Registro_MotivoFase.FechaRegistro = oE_Reporte.Fecha_Registro; oE_Registro_MotivoFase.Origen = oE_Reporte.Origen; oE_Registro_MotivoFase.Latitud = oE_Reporte.Latitud; oE_Registro_MotivoFase.Longitud = oE_Reporte.Longitud; oE_Registro_MotivoFase.Fase = "NI"; oE_Registro_MotivoFase.Nuevo = "1"; oE_Registro_MotivoFase.listaMotivo.Add(oE_MotivoFase); oD_Registrar_Motivo.RegistrarMotivoColgateBodega_Mov(oE_Registro_MotivoFase); #endregion } catch (Exception ex) { correcto = 0; throw ex; } return(correcto); }