/// <summary> /// inserta levantamiento de material pop /// 02/05/2011 Magaly jiménez /// </summary> /// <param name="iPerson_id"></param> /// <param name="sid_Plannig"></param> /// <param name="icompany_id"></param> /// <param name="sClientPDV_code"></param> /// <param name="iId_brand"></param> /// <param name="iid_MPointOfPurchase"></param> /// <param name="sid_Tipo_Prom"></param> /// <param name="tfec_ini_act"></param> /// <param name="tfec_fin_act"></param> /// <param name="tFec_Reg_Cel"></param> /// <param name="tFec_Reg_BD"></param> /// <param name="sCreateBy"></param> /// <param name="tDateBy"></param> /// <param name="sModiBy"></param> /// <param name="tDateModiBy"></param> /// <param name="bValidado"></param> /// <returns></returns> public EOPE_REPORTE_MATERIAL_POP RegistrarLevantamientoMaterialPOP(int iPerson_id, string sid_Plannig, int icompany_id, string sClientPDV_code, int iId_brand, int iid_MPointOfPurchase, string sid_Tipo_Prom, DateTime tfec_ini_act, DateTime tfec_fin_act, DateTime tFec_Reg_Cel, DateTime tFec_Reg_BD, string sCreateBy, DateTime tDateBy, string sModiBy, DateTime tDateModiBy, bool bValidado) { DataTable dt = oConn.ejecutarDataTable("UP_WEBXPLORA_OPE_REGISTEMATERIALPOP", iPerson_id, sid_Plannig, icompany_id, sClientPDV_code, iId_brand, iid_MPointOfPurchase, sid_Tipo_Prom, tfec_ini_act, tfec_fin_act, tFec_Reg_Cel, tFec_Reg_BD, sCreateBy, tDateBy, sModiBy, tDateModiBy, bValidado); EOPE_REPORTE_MATERIAL_POP oeEOPE_Levantamienmaterialpop = new EOPE_REPORTE_MATERIAL_POP(); oeEOPE_Levantamienmaterialpop.Person_id = iPerson_id; oeEOPE_Levantamienmaterialpop.id_Plannig = sid_Plannig; oeEOPE_Levantamienmaterialpop.company_id = icompany_id; oeEOPE_Levantamienmaterialpop.ClientPDV_code = sClientPDV_code; oeEOPE_Levantamienmaterialpop.Id_brand = iId_brand; oeEOPE_Levantamienmaterialpop.id_MPointOfPurchase = iid_MPointOfPurchase; oeEOPE_Levantamienmaterialpop.id_Tipo_Prom = sid_Tipo_Prom; oeEOPE_Levantamienmaterialpop.fec_ini_act = tfec_ini_act; oeEOPE_Levantamienmaterialpop.fec_fin_act = tfec_fin_act; oeEOPE_Levantamienmaterialpop.Fec_Reg_Cel = tFec_Reg_Cel; oeEOPE_Levantamienmaterialpop.Fec_Reg_BD = tFec_Reg_BD; oeEOPE_Levantamienmaterialpop.CreateBy = sCreateBy; oeEOPE_Levantamienmaterialpop.DateBy = tDateBy; oeEOPE_Levantamienmaterialpop.ModiBy = sModiBy; oeEOPE_Levantamienmaterialpop.DateModiBy = tDateModiBy; oeEOPE_Levantamienmaterialpop.Validado = bValidado; return(oeEOPE_Levantamienmaterialpop); }
/// <summary> /// consulta id de levantamiento de material POP /// 11/05/2011 Magaly jiménez /// </summary> /// <param name="sName_Brand"></param> /// <param name="spdv_Name"></param> /// <param name="snombre"></param> /// <param name="sPOP_name"></param> /// <returns></returns> public DataSet ObteneridsLevantamientoMaterialPOP(string sName_Brand, string spdv_Name, string snombre, string sPOP_name) { EOPE_REPORTE_MATERIAL_POP oeidslevantamietoMPOP = new EOPE_REPORTE_MATERIAL_POP(); DOPE_REPORTE_MATERIAL_POP oeidslevantamiento1P = new DOPE_REPORTE_MATERIAL_POP(); DataSet dsidsLevantamientoP = oeidslevantamiento1P.ObteneridsLevantamientoMaterialPOP(sName_Brand, spdv_Name, snombre, sPOP_name); oeidslevantamiento1P = null; return(dsidsLevantamientoP); }
/// <summary> /// Actualizar levantamiento de material pop /// 02/05/2011 Magaly jiménez /// </summary> /// <param name="iid_rpteMatPOP"></param> /// <param name="sClientPDV_code"></param> /// <param name="iId_brand"></param> /// <param name="iid_MPointOfPurchase"></param> /// <param name="sid_Tipo_Prom"></param> /// <param name="tfec_ini_act"></param> /// <param name="tfec_fin_act"></param> /// <param name="tFec_Reg_Cel"></param> /// <param name="sModiBy"></param> /// <param name="tDateModiBy"></param> /// <param name="bValidado"></param> /// <returns></returns> public EOPE_REPORTE_MATERIAL_POP Actualizar_levaMaterialPOP(int iid_rpteMatPOP, string sClientPDV_code, int iId_brand, int iid_MPointOfPurchase, string sid_Tipo_Prom, DateTime tfec_ini_act, DateTime tfec_fin_act, DateTime tFec_Reg_Cel, string sModiBy, DateTime tDateModiBy, bool bValidado) { DOPE_REPORTE_MATERIAL_POP odapLEPPI = new DOPE_REPORTE_MATERIAL_POP(); EOPE_REPORTE_MATERIAL_POP oeaAPLevMaterialPOP = odapLEPPI.Actualizar_LevaMaterialPOP(iid_rpteMatPOP, sClientPDV_code, iId_brand, iid_MPointOfPurchase, sid_Tipo_Prom, tfec_ini_act, tfec_fin_act, tFec_Reg_Cel, sModiBy, tDateModiBy, bValidado); odapLEPPI = null; return(oeaAPLevMaterialPOP); }
/// <summary> /// Consulta levantamiento de material pop /// 02/05/2011 Magaly jiménez /// </summary> /// <param name="sid_Plannig"></param> /// <returns></returns> public DataSet ConsultarGrillaLevaMaterialPOP(string sid_Plannig, DateTime tFec_Reg_BD) { DOPE_REPORTE_MATERIAL_POP odlp = new DOPE_REPORTE_MATERIAL_POP(); EOPE_REPORTE_MATERIAL_POP oelevapublicacion = new EOPE_REPORTE_MATERIAL_POP(); DataSet dtLevantaMaterialPOP = odlp.ConsultarGrillalevaMaterialPOP(sid_Plannig, tFec_Reg_BD); odlp = null; return(dtLevantaMaterialPOP); }
/// <summary> /// inserta levantamiento de material pop /// 02/05/2011 Magaly jiménez /// </summary> /// <param name="iPerson_id"></param> /// <param name="sid_Plannig"></param> /// <param name="icompany_id"></param> /// <param name="sClientPDV_code"></param> /// <param name="iId_brand"></param> /// <param name="iid_MPointOfPurchase"></param> /// <param name="sid_Tipo_Prom"></param> /// <param name="tfec_ini_act"></param> /// <param name="tfec_fin_act"></param> /// <param name="tFec_Reg_Cel"></param> /// <param name="tFec_Reg_BD"></param> /// <param name="sCreateBy"></param> /// <param name="tDateBy"></param> /// <param name="sModiBy"></param> /// <param name="tDateModiBy"></param> /// <param name="bValidado"></param> /// <returns></returns> public EOPE_REPORTE_MATERIAL_POP RegistrarINFOLevantaMaterialPOP(int iPerson_id, string sid_Plannig, int icompany_id, string sClientPDV_code, int iId_brand, int iid_MPointOfPurchase, string sid_Tipo_Prom, DateTime tfec_ini_act, DateTime tfec_fin_act, DateTime tFec_Reg_Cel, DateTime tFec_Reg_BD, string sCreateBy, DateTime tDateBy, string sModiBy, DateTime tDateModiBy, bool bValidado) { DOPE_REPORTE_MATERIAL_POP odrOPE_levaneMaterialPOP = new DOPE_REPORTE_MATERIAL_POP(); EOPE_REPORTE_MATERIAL_POP oeOPE_levaneMaterialPOP = odrOPE_levaneMaterialPOP.RegistrarLevantamientoMaterialPOP(iPerson_id, sid_Plannig, icompany_id, sClientPDV_code, iId_brand, iid_MPointOfPurchase, sid_Tipo_Prom, tfec_ini_act, tfec_fin_act, tFec_Reg_Cel, tFec_Reg_BD, sCreateBy, tDateBy, sModiBy, tDateModiBy, bValidado); odrOPE_levaneMaterialPOP = null; return(oeOPE_levaneMaterialPOP); }
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[1].FindControl("cmbMarca")).Text == "0") { } else { EOPE_REPORTE_MATERIAL_POP oeLevanPublicaciones = orepormaterialPOP.Actualizar_levaMaterialPOP(Convert.ToInt32(((Label)GvLPublicaciones.Rows[i].Cells[0].FindControl("lblcodregistro")).Text), ((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[4].FindControl("txt_Inicio_Actividad")).Text), Convert.ToDateTime(((TextBox)GvLPublicaciones.Rows[i].Cells[5].FindControl("txt_Fin_Actividad")).Text), 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 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); } } }
/// <summary> /// Actualizar levantamiento de material pop /// 02/05/2011 Magaly jiménez /// </summary> /// <param name="iid_rpteMatPOP"></param> /// <param name="sClientPDV_code"></param> /// <param name="iId_brand"></param> /// <param name="iid_MPointOfPurchase"></param> /// <param name="sid_Tipo_Prom"></param> /// <param name="tfec_ini_act"></param> /// <param name="tfec_fin_act"></param> /// <param name="tFec_Reg_Cel"></param> /// <param name="sModiBy"></param> /// <param name="tDateModiBy"></param> /// <param name="bValidado"></param> /// <returns></returns> public EOPE_REPORTE_MATERIAL_POP Actualizar_LevaMaterialPOP(int iid_rpteMatPOP, string sClientPDV_code, int iId_brand, int iid_MPointOfPurchase, string sid_Tipo_Prom, DateTime tfec_ini_act, DateTime tfec_fin_act, DateTime tFec_Reg_Cel, string sModiBy, DateTime tDateModiBy, bool bValidado) { DataTable dt = oConn.ejecutarDataTable("UP_WEBXPLORA_OPE_ACTUALIZARLENVANTAMIENTOMATERIALPOP", iid_rpteMatPOP, sClientPDV_code, iId_brand, iid_MPointOfPurchase, sid_Tipo_Prom, tfec_ini_act, tfec_fin_act, tFec_Reg_Cel, sModiBy, tDateModiBy, bValidado); EOPE_REPORTE_MATERIAL_POP oealp = new EOPE_REPORTE_MATERIAL_POP(); oealp.id_rpteMatPOP = iid_rpteMatPOP; oealp.ClientPDV_code = sClientPDV_code; oealp.Id_brand = iId_brand; oealp.id_MPointOfPurchase = iid_MPointOfPurchase; oealp.id_Tipo_Prom = sid_Tipo_Prom; oealp.fec_ini_act = tfec_ini_act; oealp.fec_fin_act = tfec_fin_act; oealp.Fec_Reg_Cel = tFec_Reg_Cel; oealp.ModiBy = sModiBy; oealp.DateModiBy = tDateModiBy; oealp.Validado = bValidado; return(oealp); }
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); } } }