コード例 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         IfCargaMasivaGProductos.Attributes["src"] = "CargaMasivaLevantamiento.aspx";
         try
         {
             llenaConsultaplanningAASS();
             cargaruscarBRecogerPor();
             //comboDistribuidora();
         }
         catch (Exception ex)
         {
             string error   = "";
             string mensaje = "";
             error   = Convert.ToString(ex.Message);
             mensaje = ConfigurationManager.AppSettings["ErrorConection"];
             if (error == mensaje)
             {
                 Lucky.CFG.Exceptions.Exceptions exs = new Lucky.CFG.Exceptions.Exceptions(ex);
                 string errMessage = "";
                 errMessage = mensaje;
                 errMessage = new Lucky.CFG.Util.Functions().preparaMsgError(ex.Message);
                 this.Response.Redirect("../../../err_mensaje.aspx?msg=" + errMessage, true);
             }
             else
             {
                 this.Session.Abandon();
                 Response.Redirect("~/err_mensaje_seccion.aspx", true);
             }
         }
     }
 }
コード例 #2
0
        protected void btnGuardarReport_Click(object sender, EventArgs e)
        {
            try
            {
                if (ddlCanal.Text == "0" || ddlCampana.Text == "0" ||
                    ddlNodeComercial.Text == "0" || ddlPuntoVenta.Text == "0" || ddlCategoria.Text == "0")
                {
                    return;
                }

                Lucky.Business.Common.Application.OPE_Reporte_SOD oOPE_Reporte_SOD = new Lucky.Business.Common.Application.OPE_Reporte_SOD();


                DataTable dt    = null;
                DataTable dtl   = null;
                Conexion  Ocoon = new Conexion();
                Conexion  con   = new Conexion(2);
                dt = Ocoon.ejecutarDataTable("UP_WEB_SEARCH_USER", "", Convert.ToInt32(this.Session["personid"].ToString()));
                string idperfil = dt.Rows[0]["Perfil_id"].ToString();

                dtl = con.ejecutarDataTable("STP_JVM_LISTAR_CANALES", ddlCanal.SelectedValue);
                string tipocanal = dtl.Rows[0]["CAN_TIPO"].ToString();


                Lucky.Entity.Common.Application.EOPE_Reporte_SOD oEOPE_Reporte_SOD = oOPE_Reporte_SOD.RegistrarReporteSOD(Convert.ToInt32(this.Session["personid"].ToString()),
                                                                                                                          idperfil, ddlCampana.SelectedValue, this.Session["companyid"].ToString(),
                                                                                                                          ddlPuntoVenta.SelectedValue, ddlCategoria.SelectedValue, DateTime.Now.ToShortDateString(), "0", "0", "0", txtObservacion.Text);



                oOPE_Reporte_SOD.RegistrarReporteStock_Detalle(Convert.ToInt32(oEOPE_Reporte_SOD.ID_REG_SOD), ddlMarca.SelectedValue, txtPrimaria.Text, txtSecundaria.Text, "");

                LimpiarControles();
                lblmensaje.Visible   = true;
                lblmensaje.Text      = "Fue registrado con exito el reporte de SOD";
                lblmensaje.ForeColor = System.Drawing.Color.Blue;
            }

            catch (Exception ex)
            {
                string error   = "";
                string mensaje = "";
                error = Convert.ToString(ex.Message);
                // mensaje = ConfigurationManager.AppSettings["ErrorConection"];
                if (error == mensaje)
                {
                    Lucky.CFG.Exceptions.Exceptions exs = new Lucky.CFG.Exceptions.Exceptions(ex);
                    string errMessage = "";
                    errMessage = mensaje;
                    errMessage = new Lucky.CFG.Util.Functions().preparaMsgError(ex.Message);
                    this.Response.Redirect("../../../err_mensaje.aspx?msg=" + errMessage, true);
                }
                else
                {
                    this.Session.Abandon();
                    Response.Redirect("~/err_mensaje_seccion.aspx", true);
                }
            }
        }
コード例 #3
0
        protected void BtnActuUsuInfo_Click(object sender, EventArgs e)
        {
            try
            {
                for (int i = 0; i <= GvLPublicaciones.Rows.Count - 1; i++)
                {
                    if (((DropDownList)GvLPublicaciones.Rows[i].Cells[0].FindControl("cmbsku")).Text == "0" || ((DropDownList)GvLPublicaciones.Rows[i].Cells[1].FindControl("cmbFamilia")).Text == "0")
                    {
                    }
                    else
                    {
                        EOPE_REPORTE_PUBLICACION oeLevanPublicaciones = oreporPublicacion.Actualizar_levaPublicacion(Convert.ToInt32(((Label)GvLPublicaciones.Rows[i].Cells[0].FindControl("lblcodregistro")).Text), Convert.ToInt32(((DropDownList)GvLPublicaciones.Rows[i].Cells[8].FindControl("cmbCadena")).Text), ((DropDownList)GvLPublicaciones.Rows[i].Cells[2].FindControl("cmbFamilia")).Text, ((DropDownList)GvLPublicaciones.Rows[i].Cells[1].FindControl("cmbsku")).Text,
                                                                                                                     Convert.ToInt32(((DropDownList)GvLPublicaciones.Rows[i].Cells[9].FindControl("cmbTipo")).Text), Convert.ToDateTime(((TextBox)GvLPublicaciones.Rows[i].Cells[6].FindControl("txt_Inicio_Actividad")).Text), Convert.ToDateTime(((TextBox)GvLPublicaciones.Rows[i].Cells[7].FindControl("txt_Fin_Actividad")).Text), DateTime.Now, Convert.ToString(this.Session["sUser"]), DateTime.Now, true, ((TextBox)GvLPublicaciones.Rows[i].Cells[3].FindControl("TxtPP")).Text,
                                                                                                                     Convert.ToDecimal(((TextBox)GvLPublicaciones.Rows[i].Cells[4].FindControl("TxtPVP")).Text), Convert.ToDecimal(((TextBox)GvLPublicaciones.Rows[i].Cells[5].FindControl("TxtOferta")).Text));
                    }
                }


                SavelimpiarcontrolesLP();
                saveActivarbotonesLP();
                desactivarControleLP();
                Alertas.CssClass  = "MensajesCorrecto";
                LblFaltantes.Text = "Registros de Levantamiento de Publicaciones  fueron Actualizados con Exito";
                MensajeAlerta();
            }
            catch (Exception ex)
            {
                string error   = "";
                string mensaje = "";
                error   = Convert.ToString(ex.Message);
                mensaje = ConfigurationManager.AppSettings["ErrorConection"];
                if (error == mensaje)
                {
                    Lucky.CFG.Exceptions.Exceptions exs = new Lucky.CFG.Exceptions.Exceptions(ex);
                    string errMessage = "";
                    errMessage = mensaje;
                    errMessage = new Lucky.CFG.Util.Functions().preparaMsgError(ex.Message);
                    this.Response.Redirect("../../../err_mensaje.aspx?msg=" + errMessage, true);
                }
                else
                {
                    this.Session.Abandon();
                    Response.Redirect("~/err_mensaje_seccion.aspx", true);
                }
            }
        }
コード例 #4
0
        protected void BtnGuardarUsuInfo_Click(object sender, EventArgs e)
        {
            //bool continuar = false;
            LblFaltantes.Text = "";
            if (cmbplanning.Text == "0" || txt_fechaActual.Text == "")
            {
                if (cmbplanning.Text == "0" || cmbplanning.Text == "")
                {
                    LblFaltantes.Text = ". " + "seleccione Campaña";
                }

                Alertas.CssClass  = "MensajesError";
                LblFaltantes.Text = "Debe ingresar información ";
                MensajeAlerta();
                return;
            }



            try
            {
                for (int i = 0; i <= GvLPublicaciones.Rows.Count - 1; i++)
                {
                    if (((DropDownList)GvLPublicaciones.Rows[i].Cells[1].FindControl("cmbMarca")).Text == "0")
                    {
                    }
                    else
                    {
                        EOPE_REPORTE_MATERIAL_POP oeLevanPublicaciones = orepormaterialPOP.RegistrarINFOLevantaMaterialPOP(Convert.ToInt32(this.Session["personid"]), cmbplanning.Text, Convert.ToInt32(this.Session["companyid"]), ((DropDownList)GvLPublicaciones.Rows[i].Cells[6].FindControl("cmbCadena")).Text, Convert.ToInt32(((DropDownList)GvLPublicaciones.Rows[i].Cells[1].FindControl("cmbMarca")).Text), Convert.ToInt32(((DropDownList)GvLPublicaciones.Rows[i].Cells[3].FindControl("cmbtipoPOP")).Text),
                                                                                                                           ((DropDownList)GvLPublicaciones.Rows[i].Cells[2].FindControl("cmbPromocion")).Text, Convert.ToDateTime(((TextBox)GvLPublicaciones.Rows[i].Cells[3].FindControl("txt_Inicio_Actividad")).Text), Convert.ToDateTime(((TextBox)GvLPublicaciones.Rows[i].Cells[4].FindControl("txt_Fin_Actividad")).Text), DateTime.Now, Convert.ToDateTime(txt_fechaActual.Text), Convert.ToString(this.Session["sUser"]), DateTime.Now, Convert.ToString(this.Session["sUser"]), DateTime.Now, true);
                    }
                }

                //SavelimpiarcontrolesLP();
                saveActivarbotonesLP();
                desactivarControleLP();
                Alertas.CssClass  = "MensajesCorrecto";
                LblFaltantes.Text = "Registros de Levantamiento de Material POP  fueron creados  con Exito";
                MensajeAlerta();
            }
            catch (Exception ex)
            {
                string error   = "";
                string mensaje = "";
                error   = Convert.ToString(ex.Message);
                mensaje = ConfigurationManager.AppSettings["ErrorConection"];
                if (error == mensaje)
                {
                    Lucky.CFG.Exceptions.Exceptions exs = new Lucky.CFG.Exceptions.Exceptions(ex);
                    string errMessage = "";
                    errMessage = mensaje;
                    errMessage = new Lucky.CFG.Util.Functions().preparaMsgError(ex.Message);
                    this.Response.Redirect("../../../err_mensaje.aspx?msg=" + errMessage, true);
                }
                else
                {
                    this.Session.Abandon();
                    Response.Redirect("~/err_mensaje_seccion.aspx", true);
                }
            }
        }