void ValidaCliente(String xctacte) { clienteWebBL BL = new clienteWebBL(); tb_cliente BE = new tb_cliente(); DataTable dt = new DataTable(); BE.ctacte = xctacte; dt = BL.GetAll(Session["ssEmpresaID"].ToString(), BE).Tables[0]; txt_ctacte.Text = dt.Rows[0]["ctacte"].ToString(); txt_ctactename.Text = dt.Rows[0]["ctactename"].ToString(); txt_ruc.Text = dt.Rows[0]["nmruc"].ToString(); direc_entrega.Text = dt.Rows[0]["direc"].ToString(); replegal_name.Text = dt.Rows[0]["replegalname"].ToString(); replegal_dni.Text = dt.Rows[0]["replegaldni"].ToString(); Session["xregpublico"] = dt.Rows[0]["regpublico"].ToString(); Session["xpartelectro2"] = dt.Rows[0]["partelectro"].ToString(); Session["xestcivil"] = dt.Rows[0]["estcivil"].ToString(); Session["direcnume"] = dt.Rows[0]["direcnume"].ToString(); }
void ValidaCliente(String xctacte) { clienteWebBL BL = new clienteWebBL(); tb_cliente BE = new tb_cliente(); DataTable dt = new DataTable(); BE.ctacte = xctacte; dt = BL.GetAll(Session["ssEmpresaID"].ToString(), BE).Tables[0]; //txt_ctacte.Text = dt.Rows[0]["ctacte"].ToString(); txt_ctacte.Value = dt.Rows[0]["ctacte"].ToString(); txt_ctactename.Text = dt.Rows[0]["ctactename"].ToString(); }
private void data_gridRazonSocial() { clienteWebBL BL = new clienteWebBL(); tb_cliente BE = new tb_cliente(); DataTable dt = new DataTable(); switch (cbo_filtro.SelectedValue) { case "01": BE.ctacte = txt_filter.Text.Trim().ToUpper(); break; case "02": BE.ctactename = txt_filter.Text.Trim().ToUpper(); break; default: //** break; } try { //Eliminar Columnas Actuales(Opcional): GridView1.Columns.Clear(); GridView1.Width = 535; //Objeto Columna: CommandField image; //Crear Columna: image = new CommandField(); image.ButtonType = ButtonType.Image; image.SelectImageUrl = "~/Images/go-search.png"; image.ShowSelectButton = true; image.ItemStyle.Width = 10; image.ItemStyle.Wrap = true; GridView1.Columns.Add(image); BoundField DDNNI; DDNNI = new BoundField(); DDNNI.DataField = "ctacte"; DDNNI.HeaderText = "CODIGO"; DDNNI.ItemStyle.Width = 50; GridView1.Columns.Add(DDNNI); BoundField NOMBR; NOMBR = new BoundField(); NOMBR.DataField = "ctactename"; NOMBR.HeaderText = "NOMBRES"; NOMBR.ItemStyle.Width = 250; GridView1.Columns.Add(NOMBR); dt = BL.GetAll(Session["ssEmpresaID"].ToString(), BE).Tables[0]; if (dt.Rows.Count > 0) { GridView1.DataSource = dt; GridView1.DataBind(); GridView1.Visible = true; } } catch (Exception ex) { //ClientMessage(ex.Message); Response.Redirect("ErrorPage/Frm_PaginaError_405.aspx"); } }