private void getDatos(VISTA.VDialog_Sucursal vdialog, bool edit) { DataRowView Rows = vdialog.cmbEmpresa.SelectedItem as DataRowView; DataRowView Rowss = vdialog.cmbDireccion.SelectedItem as DataRowView; var empresa = Rows.Row[0].ToString(); var direc = Rowss.Row[0].ToString(); vdialog.cmbEmpresa.SelectedValuePath = empresa; vdialog.cmbDireccion.SelectedValuePath = direc; if (edit == false) { this.vosucursal.IDSUCURSAL = 0; } else { this.vosucursal.IDSUCURSAL = int.Parse(vdialog.txtIdSucursal.Text); } this.vosucursal.IDEMPRESA = int.Parse(vdialog.cmbEmpresa.SelectedValuePath); this.vosucursal.NOMBRESUCURSAL = vdialog.txtNombreSucursal.Text; this.vosucursal.CODIGO = vdialog.txtCodigo.Text; this.vosucursal.DIRECCIONFISCAL = int.Parse(vdialog.cmbDireccion.SelectedValuePath); //this.vosucursal.CODIGOPOSTAL = vdialog.txtCodigoPostal.Text; //this.vosucursal.PAIS = vdialog.txtPais.Text; //this.vosucursal.MUNICIPIO = vdialog.txtMunicipio.Text; //this.vosucursal.COLONIA = vdialog.txtColonia.Text; //this.vosucursal.CALLE = vdialog.txtCalle.Text; //this.vosucursal.NEXTERIOR = vdialog.txtNExterior.Text; //this.vosucursal.NINTERIOR = vdialog.txtNInterior.Text; this.daosucursal = new MODELO.DAO_Sucursal(vosucursal); }
public C_Sucursal(VISTA.V_Sucursal vsucursal) { this.vsucursal = vsucursal; vosucursal = new MODELO.VO_Sucursal(); daosucursal = new MODELO.DAO_Sucursal(); daosucursal.abrirConexion(); Reload(); /**/ }
public void getDatosCopy(VISTA.VDialog_Eliminar vdialog, bool edit) { if (edit == false) { this.vosucursal.IDSUCURSAL = 0; } else { this.vosucursal.IDSUCURSAL = int.Parse(vdialog.txtID.Text); } this.daosucursal = new MODELO.DAO_Sucursal(vosucursal); }
public C_DialogSucursal(VISTA.VDialog_Sucursal vdl_sucursal) { this.vdl_sucursal = vdl_sucursal; daosucursal = new MODELO.DAO_Sucursal(); daosucursal.abrirConexion(); this.vdl_sucursal.cmbEmpresa.Items.Clear(); this.vdl_sucursal.cmbDireccion.Items.Clear(); var items1 = (daosucursal.consultaEmpresa() as IListSource).GetList(); var items2 = (daosucursal.consultaTipoDireccionFisccal() as IListSource).GetList(); this.vdl_sucursal.cmbEmpresa.ItemsSource = items1; this.vdl_sucursal.cmbDireccion.ItemsSource = items2; this.vdl_sucursal.cmbEmpresa.DisplayMemberPath = "vchNombre"; this.vdl_sucursal.cmbEmpresa.SelectedValuePath = "intIdClave"; this.vdl_sucursal.cmbDireccion.DisplayMemberPath = "vchMunicipo"; this.vdl_sucursal.cmbDireccion.SelectedValuePath = "intIdDireccion"; }