/// <summary> /// Método que carga los lugares donde se pueden registrar las ventas. /// </summary> /// <creo>Juan Alberto Hernández Negrete</creo> /// <fecha_creo>2014 05 21 13:33 Hrs.</fecha_creo> /// <modifico></modifico> /// <fecha_modifico></fecha_modifico> /// <causa_modificacion></causa_modificacion> private DataSet Consultar_DsReporte() { Cls_Rpt_Ventas_Negocio Obj_Rpt_Ventas = new Cls_Rpt_Ventas_Negocio();//Variable que utilizaremos para realizar peticiones a la clase de datos. DataSet Ds_Reporte = new DataSet(); String Leyenda_Encabezado = ""; try { //Establecemos los filtros para realizar la búsqueda. if (KDtp_Fecha_Inicio.Checked) { Obj_Rpt_Ventas.P_Fecha_Inicio = new DateTime(KDtp_Fecha_Inicio.Value.Year , KDtp_Fecha_Inicio.Value.Month , KDtp_Fecha_Inicio.Value.Day, 0, 0, 0); Leyenda_Encabezado += "Periodo: Del " + Obj_Rpt_Ventas.P_Fecha_Inicio.ToString("dd") + " de " + Cls_Metodos_Generales.Convertir_Mes_Numerico_A_Equivalente_Texto(Convert.ToInt32(Obj_Rpt_Ventas.P_Fecha_Inicio.ToString("MM"))) + " de " + Obj_Rpt_Ventas.P_Fecha_Inicio.ToString("yyyy"); } if (KDtp_Fecha_Termino.Checked) { Obj_Rpt_Ventas.P_Fecha_Termino = new DateTime(KDtp_Fecha_Termino.Value.Year , KDtp_Fecha_Termino.Value.Month , KDtp_Fecha_Termino.Value.Day, 23, 59, 59); Leyenda_Encabezado += " al " + Obj_Rpt_Ventas.P_Fecha_Termino.ToString("dd") + " de " + Cls_Metodos_Generales.Convertir_Mes_Numerico_A_Equivalente_Texto(Convert.ToInt32(Obj_Rpt_Ventas.P_Fecha_Termino.ToString("MM"))) + " de " + Obj_Rpt_Ventas.P_Fecha_Termino.ToString("yyyy"); } // producto //if (KCmb_Tarifa_Productos.SelectedValue is object) //{ // if (!string.IsNullOrEmpty(KCmb_Tarifa_Productos.SelectedValue.ToString())) // Obj_Rpt_Ventas.P_Producto_ID = KCmb_Tarifa_Productos.SelectedValue.ToString(); //} // turno if (KCmb_Turnos.SelectedValue is object) { if (!string.IsNullOrEmpty(KCmb_Turnos.SelectedValue.ToString())) { Obj_Rpt_Ventas.P_Turno_ID = KCmb_Turnos.SelectedValue.ToString(); Leyenda_Encabezado += ", Turno: " + KCmb_Turnos.Text; } } // caja if (KCmb_Caja.SelectedValue is object) { if (!string.IsNullOrEmpty(KCmb_Caja.SelectedValue.ToString())) { Obj_Rpt_Ventas.P_Caja_ID = KCmb_Caja.SelectedValue.ToString(); Leyenda_Encabezado += ", No. caja: " + KCmb_Caja.Text; } } // lugar de la venta if (KCmb_Lugar_Venta.SelectedValue is object) { if (!string.IsNullOrEmpty(KCmb_Lugar_Venta.SelectedValue.ToString())) { Obj_Rpt_Ventas.P_Tipo_Movimiento = KCmb_Lugar_Venta.Text; Leyenda_Encabezado += ", Lugar de la venta: "; if (KCmb_Lugar_Venta.Text.ToString() == "No Caja") { Leyenda_Encabezado += " Numero de caja"; } else { Leyenda_Encabezado += "" + KCmb_Lugar_Venta.Text.ToString(); } } } // filtro para el numero de venta if (!String.IsNullOrEmpty(Txt_No_Venta.Text)) { Obj_Rpt_Ventas.P_No_Venta = Txt_No_Venta.Text; Leyenda_Encabezado += ", No. de la venta: " + Txt_No_Venta.Text; } Obj_Rpt_Ventas.P_Tipo = Leyenda_Encabezado; // generacion de la consulta Ds_Reporte = Obj_Rpt_Ventas.Rpt_Folios_Cancelados(); } catch (Exception Ex) { throw new Exception("Error: (Consultar_DsReporte). Descripción: " + Ex.Message); } return(Ds_Reporte); }