private void BindGrid(int currentPage) { try { SisPackController.AdministrarGrillas.Configurar(dtgClientes, "CotizacionClienteID", this.CantidadOpciones); DsCotizacionesClientes ds = new DsCotizacionesClientes(); if (Session["DsCotizacionClientes"] == null) { ICotizacionCliente cotizacion = CotizacionClienteFactory.GetCotizacionCliente(); ds = cotizacion.GetCotizacionesClientes(this.txtCodigo.Text, this.txtRazonSocial.Text); } else { ds = (DsCotizacionesClientes)Session["DsCotizacionClientes"]; foreach (DataGridItem item in dtgClientes.Items) { DsCotizacionesClientes.DatosRow dr = (DsCotizacionesClientes.DatosRow)ds.Datos.Rows[item.DataSetIndex]; CheckBox chk = (CheckBox)item.FindControl("chk"); dr.Seleccionada = chk.Checked; } } Session["DsCotizacionClientes"] = ds; dtgClientes.CurrentPageIndex = currentPage; dtgClientes.DataSource = ds; dtgClientes.DataBind(); } catch (Exception ex) { ((ErrorWeb)this.phErrores.Controls[0]).setMensaje(ex.Message); } }
public DsCotizacionesClientes GetCotizacionesDataSet() { DsCotizacionesClientes ds = new DsCotizacionesClientes(); SqlParameter pVendedorID = new SqlParameter("@VendedorID", Utiles.BaseDatos.IntToSql(this.VendedorID)); Config.Conexion.LlenarTypeDataSet(ds.Datos, System.Data.CommandType.StoredProcedure, "CotizacionesClienteSEL", pVendedorID); return(ds); }
/*public DsUnidadVentaTEntregaProductoServicio GetUVentaServTEntregaModOrigenCotizadasByClienteIDDataSet(int agenciaID) * { * DsUnidadVentaTEntregaProductoServicio ds = new DsUnidadVentaTEntregaProductoServicio(); * SqlParameter spClienteID = new SqlParameter("@ClienteID",this.clienteID); * SqlParameter spAgenciaID = new SqlParameter("@AgenciaID", agenciaID); * Config.Conexion.LlenarTypeDataSet(ds.Datos,System.Data.CommandType.StoredProcedure, "UVentaProdServTEntregaModEntregaOrigenByClienteAgenciaSEL",spClienteID); * return ds; * }*/ public DsCotizacionesClientes GetCotizacionesClientes(string codigo, string razonSocial) { DsCotizacionesClientes ds = new DsCotizacionesClientes(); SqlParameter pCodigo = new SqlParameter("@Codigo", Utiles.BaseDatos.StrToSql(codigo)); SqlParameter pRazonSocial = new SqlParameter("@RazonSocial", Utiles.BaseDatos.StrToSql(razonSocial)); Config.Conexion.LlenarTypeDataSet(ds.Datos, System.Data.CommandType.StoredProcedure, "CotizacionClienteDatosConfSEL", pCodigo, pRazonSocial); return(ds); }
private Hashtable DeterminarTildados() { Hashtable hCotizacionCliente = new Hashtable(); DsCotizacionesClientes ds = (DsCotizacionesClientes)this.dtgClientes.DataSource; foreach (DsCotizacionesClientes.DatosRow dr in ds.Datos) { if (dr.Seleccionada) { hCotizacionCliente.Add(dr.CotizacionClienteID, dr.CotizacionClienteID); } } return(hCotizacionCliente); }
public bool ConsultarVigencia() { DsCotizacionesClientes ds = this.GetCotizacionesClientesConsultaDataSet(); if (ds == null) { return(false); } DsCotizacionesClientes.DatosRow[] dr = (DsCotizacionesClientes.DatosRow[])ds.Datos.Select("VendedorID=" + this.VendedorID + "AND ClienteID=" + this.ClienteID, "FechaInicioVigencia"); if (dr.Length == 0) { return(false); } this.CotizacionClienteID = dr[dr.Length - 1].CotizacionClienteID; return(true); }