private void busca_persona_para(double rut) { Persona mpersona = new PersonaBC().getpersonabyrut(rut); if (mpersona.Rut == Convert.ToDouble(0)) { this.txt_dv_para.Focus(); return; } this.ib_compra_para.Attributes.Add("OnClick", "javascript:window.showModalDialog('../administracion/mPersonaModal.aspx?id_persona=" + mpersona.Rut.ToString() + "','#1','dialogHeight: 350px; dialogWidth: 900px;dialogTop: 190px; dialogLeft: 220px; edge: Raised; center: Yes;help: No; resizable: No; status: No;');"); this.ib_compra_para.Visible = true; this.txt_rut_para.Enabled = false; this.txt_dv_para.Enabled = false; this.txt_nombre_para.Text = mpersona.Nombre; this.txt_paterno_para.Text = mpersona.Apellido_paterno; this.txt_materno_para.Text = mpersona.Apellido_materno; this.txt_dv_para.Text = mpersona.Dv; this.txt_direccion_para.Text = mpersona.Direccion; this.txt_numero_para.Text = mpersona.Numero; this.txt_depto_para.Text = mpersona.Depto; this.txt_telefono_para.Text = mpersona.Telefono; this.dl_pais_para.SelectedValue = mpersona.Comuna.Ciudad.Region.Pais.Codigo; FuncionGlobal.comboregion(this.dl_region_para, mpersona.Comuna.Ciudad.Region.Pais.Codigo); this.dl_region_para.SelectedValue = Convert.ToString(mpersona.Comuna.Ciudad.Region.Id_region); FuncionGlobal.combociudad(this.dl_ciudad_para, Convert.ToInt16(mpersona.Comuna.Ciudad.Region.Id_region)); this.dl_ciudad_para.SelectedValue = Convert.ToString(mpersona.Comuna.Ciudad.Id_Ciudad); FuncionGlobal.combocomuna(this.dl_comuna_para, Convert.ToInt16(mpersona.Comuna.Ciudad.Id_Ciudad)); this.dl_comuna_para.SelectedValue = Convert.ToString(mpersona.Comuna.Id_Comuna); }
private void busca_persona(double rut) { Persona mpersona = new PersonaBC().getpersonabyrut(rut); if ( mpersona== null) { this.txt_dv.Focus(); return; } this.ib_direccion.Visible = true; this.ib_personeria.Visible = true; this.ib_ficha.Visible = true; this.txt_rut.Enabled = false; this.txt_dv.Enabled = false; this.txt_nombre.Text = mpersona.Nombre; this.txt_paterno.Text = mpersona.Apellido_paterno; this.txt_materno.Text = mpersona.Apellido_materno; this.txt_dv.Text = mpersona.Dv; this.txt_nacionalidad.Text = mpersona.Nacionalidad; this.txt_profesion.Text = mpersona.Profesion; this.dl_sexo.SelectedValue = mpersona.Sexo; this.dl_estado_civil.SelectedValue = mpersona.Estado_civil; this.txt_giro.Text = mpersona.Giro; this.ib_personeria.Attributes.Add("onclick", "javascript:window.showModalDialog('mParticipante.aspx?rut=" + FuncionGlobal.FuctionEncriptar(this.txt_rut.Text) + "&nombre=" + this.txt_nombre.Text + " " + this.txt_paterno.Text + "','','status:false;dialogWidth:900px;dialogHeight:500px')"); }
private void carga_link() { double rut_deudor = 0; if (this.txt_rut_deudor.Text == "") { rut_deudor = 0; } else { rut_deudor = Convert.ToDouble(this.txt_rut_deudor.Text); string persona = new PersonaBC().add_personaCG(Convert.ToDouble(this.txt_rut_deudor.Text), this.txt_dv.Text, 1, "", this.txt_nombre_deudor.Text, this.txt_paterno.Text, this.txt_materno.Text, "", "", "", "", "0", "0", "", "", "", "", "", "0"); } this.ib_direccion.Attributes.Add("onclick", "javascript:window.showModalDialog('../administracion/mDireccion.aspx?rut=" + FuncionGlobal.FuctionEncriptar(this.txt_rut_deudor.Text.Trim()) + "','','status:false;dialogWidth:500px;dialogHeight:300px')"); this.ib_telefono.Attributes.Add("onclick", "javascript:window.showModalDialog('../administracion/mTelefonos.aspx?rut=" + FuncionGlobal.FuctionEncriptar(this.txt_rut_deudor.Text.Trim()) + "','','status:false;dialogWidth:400px;dialogHeight:300px')"); this.ib_correo.Attributes.Add("onclick", "javascript:window.showModalDialog('../administracion/mCorreo.aspx?rut=" + FuncionGlobal.FuctionEncriptar(this.txt_rut_deudor.Text.Trim()) + "','','status:false;dialogWidth:400px;dialogHeight:300px')"); }
private void busca_persona(double rut) { Persona mpersona = new PersonaBC().getpersonabyrut(rut); if (mpersona != null) { this.DatosParticipante.Mostrar_Form(mpersona.Rut); //this.ib_persona.Visible = true; //this.ib_persona.Attributes.Add("OnClick", "javascript:window.showModalDialog('../administracion/mPersonaModal.aspx?id_persona=" + FuncionGlobal.FuctionEncriptar( mpersona.Rut.ToString()) + "','#1','dialogHeight: 350px; dialogWidth: 900px;dialogTop: 190px; dialogLeft: 220px; edge: Raised; center: Yes;help: No; resizable: No; status: No;');"); //this.txt_rut.Enabled = false; //this.txt_dv.Enabled = false; //this.txt_nombre.Text = mpersona.Nombre; //this.txt_paterno.Text = mpersona.Apellido_paterno; //this.txt_materno.Text = mpersona.Apellido_materno; //this.txt_dv.Text = mpersona.Dv; //this.txt_direccion.Text = mpersona.Direccion; //this.txt_numero.Text = mpersona.Numero; //this.txt_depto.Text = mpersona.Depto; //this.txt_telefono.Text = mpersona.Telefono; //this.dl_pais.SelectedValue = mpersona.Comuna.Ciudad.Region.Pais.Codigo; //FuncionGlobal.comboregion(this.dl_region, mpersona.Comuna.Ciudad.Region.Pais.Codigo); //this.dl_region.SelectedValue = Convert.ToString(mpersona.Comuna.Ciudad.Region.Id_region); //FuncionGlobal.combociudad(this.dl_ciudad, Convert.ToInt16(mpersona.Comuna.Ciudad.Region.Id_region)); //this.dl_ciudad.SelectedValue = Convert.ToString(mpersona.Comuna.Ciudad.Id_Ciudad); //FuncionGlobal.combocomuna(this.dl_comuna, Convert.ToInt16(mpersona.Comuna.Ciudad.Id_Ciudad)); //this.dl_comuna.SelectedValue = Convert.ToString(mpersona.Comuna.Id_Comuna); } }
private void add_persona() { string persona = new PersonaBC().add_persona(Convert.ToDouble(this.txt_rut.Text), this.txt_dv.Text, Convert.ToInt16(0), "", this.txt_nombre.Text, this.txt_paterno.Text, this.txt_materno.Text, this.dl_sexo.SelectedValue, "0", this.txt_nacionalidad.Text, this.txt_profesion.Text, this.dl_estado_civil.SelectedValue, "0", "0", "", "", "", "", "0", this.txt_giro.Text); }
protected void mensajeOper(int codigo, string id_solicitud) { MailBCA mBCA = new MailBCABC().getMailbycodigo(codigo); Operacion op = new OperacionBC().getoperacion(Convert.ToInt32(id_solicitud)); string ccopia = mBCA.Ccopy; Agenda agn = new AgendaBC().getAgenda(Convert.ToInt32(id_solicitud)); //Usuario eject = new UsuarioBC().GetUsuario(agn.Ejecutivo); Persona pers = new PersonaBC().getpersonabyrut(agn.Rut_persona); string[] body = mBCA.Body.Split('.'); Mail.Mail mail = new Mail.Mail(); StringBuilder strBody = new StringBuilder(); strBody.Append("<html><head><title>Correo Automatico</title><body>"); strBody.Append("<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">"); strBody.Append("<tr><td>"); foreach (string item in body) { strBody.AppendLine("<br/>"); strBody.AppendLine(item); } strBody.AppendLine("<br/>"); strBody.AppendLine("Se Frimaron los siguientes Creditos"); strBody.AppendLine("<br/>"); strBody.AppendLine("<table whidth=\"70px\">"); foreach (GridViewRow row in grdCreditos.Rows) { string idref; string idinterno; idref = row.Cells[0].Text; idinterno = row.Cells[1].Text; CheckBox chkF = (CheckBox)row.Cells[2].FindControl("chkfirma"); if (chkF.Checked) { strBody.Append("<tr><td aling=\"Center\">"); strBody.AppendLine(idinterno); strBody.Append("</td></tr>"); } } strBody.AppendLine("</table>"); strBody.Append("</td></tr>"); strBody.Append("<tr><td>"); strBody.AppendLine("<br/>"); strBody.AppendLine("Atte.,"); strBody.AppendLine("<br/>"); strBody.AppendLine(mBCA.Firma); strBody.Append("</td></tr><tr><td>"); strBody.Append("<IMG SRC=" + "http://190.196.121.53/imagenes/firmaCA.jpg" + ">"); strBody.Append("</td></tr></table>"); strBody.Append("</body></html>"); //op.Usuario.Correo mail.SendMail(op.Usuario.Correo, mBCA.Ccopy, mBCA.Subject.Replace("NOperacion", id_solicitud), strBody.ToString().Replace("NOperacion", id_solicitud).Replace("NombreCliente", pers.Nombre + " " + pers.Apellido_paterno + " " + pers.Apellido_materno)); }
private void busca_persona(double rut) { Persona mpersona = new PersonaBC().getpersonabyrut(rut); if (mpersona.Rut == Convert.ToDouble(0)) { FuncionGlobal.alerta("RUT NO EXISTE COMO PERSONA EN EL SISTEMA", this.Page); return; } }
public bool Guardar_Form() { if (!Validar_Form()) { return(false); } string persona = new PersonaBC().add_persona(Convert.ToDouble(this.txt_rut.Text), this.txt_dv.Text, 1, "", this.txt_nombre.Text, this.txt_paterno.Text, this.txt_materno.Text, this.dl_sexo.SelectedValue, "0", this.txt_nacionalidad.Text, this.txt_profesion.Text, this.dl_estado_civil.SelectedValue, "", "", "", "", "", "", "0", giro); this._persona = new PersonaBC().getpersonabyrut(Convert.ToDouble(this.txt_rut.Text)); return(true); }
private void busca_persona(double rut) { Persona mpersona = new PersonaBC().getpersonabyrut(rut); if (mpersona != null) { this.ib_personeria.Visible = true; this.ib_ficha.Visible = true; //carga_rpt(); this.txt_rut.Enabled = false; this.txt_dv.Enabled = false; this.txt_nombre.Text = mpersona.Nombre; this.txt_paterno.Text = mpersona.Apellido_paterno; this.txt_materno.Text = mpersona.Apellido_materno; this.txt_dv.Text = mpersona.Dv; this.txt_serie.Text = mpersona.Serie; this.txt_nacionalidad.Text = mpersona.Nacionalidad; this.txt_profesion.Text = mpersona.Profesion; this.txt_telefono.Text = mpersona.Telefono; this.txt_celular.Text = mpersona.Celular; this.txt_correo.Text = mpersona.Correo; this.txt_direccion.Text = mpersona.Direccion; this.txt_numero.Text = mpersona.Numero; this.txt_depto.Text = mpersona.Depto; this.dl_tipo_persona.SelectedValue = mpersona.Tipo_persona; this.dl_tipo_empleador.SelectedValue = mpersona.Tipo_empleador; this.dl_sexo.SelectedValue = mpersona.Sexo; this.dl_estado_civil.SelectedValue = mpersona.Estado_civil; this.dl_pais.SelectedValue = mpersona.Comuna.Ciudad.Region.Pais.Codigo; FuncionGlobal.comboregion(this.dl_region, mpersona.Comuna.Ciudad.Region.Pais.Codigo); this.dl_region.SelectedValue = Convert.ToString(mpersona.Comuna.Ciudad.Region.Id_region); FuncionGlobal.combociudad(this.dl_ciudad, Convert.ToInt16(mpersona.Comuna.Ciudad.Region.Id_region)); this.dl_ciudad.SelectedValue = Convert.ToString(mpersona.Comuna.Ciudad.Id_Ciudad); FuncionGlobal.combocomuna(this.dl_comuna, Convert.ToInt16(mpersona.Comuna.Ciudad.Id_Ciudad)); this.dl_comuna.SelectedValue = Convert.ToString(mpersona.Comuna.Id_Comuna); this.ib_comuna.Attributes.Add("OnClick", "javascript:window.showModalDialog('../administracion/mComunamodal.aspx?id_ciudad=" + FuncionGlobal.FuctionEncriptar(this.dl_ciudad.SelectedValue.Trim()) + "','#1','dialogHeight: 400px; dialogWidth: 350px;dialogTop: 190px; dialogLeft: 220px; edge: Raised; center: Yes;help: No; resizable: No; status: No;');"); ib_comuna.Visible = true; } else { this.txt_dv.Enabled = true; this.txt_dv.Focus(); return; } }
protected void txt_rut_TextChanged(object sender, EventArgs e) { if (txt_rut.Text != "") { txt_dv.Text = digitoVerificador(txt_rut.Text); } Persona person = new PersonaBC().getpersonabyrut(Convert.ToInt32(txt_rut.Text.Trim())); if (person != null) { txtNombre.Text = person.Nombre; txtApellidoP.Text = person.Apellido_paterno; txtApellidoM.Text = person.Apellido_materno; txt_celular.Text = person.Celular; List <Telefonos> telper = new TelefonoBC().gettelefonos(Convert.ToInt32(person.Rut)); foreach (Telefonos item in telper) { if (item.Tipo_telefono == "TCEL") { txt_celular.Text = item.Numero.ToString(); } if (item.Tipo_telefono == "TOFI") { txt_telefono.Text = item.Numero.ToString(); } } Direcciones dirper = new DireccionesBC().getDireccionPorDefecto(Convert.ToInt32(person.Rut)); if (dirper != null) { txt_numeriDir.Text = dirper.Numero; txtdireccion.Text = dirper.Direccion; Comuna compers = new ComunaBC().getComuna(Convert.ToInt16(dirper.Comuna.Id_Comuna)); cboComuna.SelectedValue = compers.Id_Comuna.ToString(); } } else { txtNombre.Focus(); } }
public void GetOt(int idOt) { var otra = new OrdenTrabajoBC().GetOrdenTrabajo(idOt); lblNumerOrden.Text = otra.NumeroOrden; var cliente = new ClienteBC().getcliente(Convert.ToInt16(otra.IdCliente)); lblCliente.Text = cliente.Persona.Nombre.ToUpper();; hdIdCliente.Value = cliente.Id_cliente.ToString(CultureInfo.InvariantCulture); lblSucursal.Text = otra.IdSucursal == 0 ? "" : new SucursalclienteBC().getSucursal(Convert.ToInt16(otra.IdSucursal)).Nombre.ToUpper(); lblFormaPago.Text = otra.CodigoFormaPago.Trim() == "0" ? "" : new ParametroBC().getparametro("FOPA", otra.CodigoFormaPago.Trim()).Valoralfanumerico.ToUpper(); lblFinanciera.Text = otra.CodigoFinanciera.Trim() == "0" ? "" : new BancofinancieraBC().getBancofinanciera(otra.CodigoFinanciera.Trim()).Nombre.ToUpper(); lblQuienPaga.Text = otra.QuienPaga.Trim() == "0" ? "" : new ParametroBC().getparametro("CAVE", otra.QuienPaga).Valoralfanumerico.ToUpper(); lblCompraPara.Text = otra.CompraPara.ToUpper(); lblTerminacionEspecial.Text = otra.TmEspecial.ToUpper(); lblImpuestoVerde.Text = otra.ImpuestoVerde.Trim() == "0" ? "No se ha especificado." : new ParametroBC().getparametro("IMPV", otra.ImpuestoVerde.Trim()).Valoralfanumerico.ToUpper(); lblObservacion.Text = otra.Observacion.ToUpper(); lblFacturaNumero.Text = otra.NumeroFactura; hlFactura.NavigateUrl = otra.UrlFactura.Trim(); lblAbonoCliente.Text = otra.AbonoCliente.ToString(CultureInfo.InvariantCulture); lblFacturaFecha.Text = otra.FechaFactura.Trim() == "" ? "" : Convert.ToDateTime(otra.FechaFactura.Trim()).ToShortDateString(); lblFacturaNeto.Text = otra.FacturaNeto.Trim(); var adquiriente = new PersonaBC().getpersonabyrut(Convert.ToDouble(otra.RutAdquiriente.Substring(0, otra.RutAdquiriente.Length - 1))); lblCompradorRut.Text = adquiriente == null ? "" : adquiriente.Rut + "-" + adquiriente.Dv; lblCompradorNombre.Text = adquiriente == null ? "" : adquiriente.Nombre.ToUpper(); lblCompApepat.Text = adquiriente == null ? "" : adquiriente.Apellido_paterno.Trim().ToUpper(); lblCompApemat.Text = adquiriente == null ? "" : adquiriente.Apellido_materno.Trim().ToUpper(); lblVehiculoMarca.Text = otra.VehiculoMarca.Trim() == "0" ? "" : new MarcavehiculoBC().getmarcavehiculo(Convert.ToInt16(otra.VehiculoMarca.Trim())).Nombre.ToUpper(); lblVehiculoModelo.Text = otra.VehiculoModelo.Trim().ToUpper(); lblVehiculoAnio.Text = otra.VehiculoAnio.Trim().ToUpper(); lblVehiculoCilindrada.Text = otra.VehiculoCilindrada.Trim().ToUpper(); lblVehiculoNumAsientos.Text = otra.VehiculoAsientos.ToString(CultureInfo.InvariantCulture); lblNumeroPuertas.Text = otra.VehiculoPuertas.ToString(CultureInfo.InvariantCulture); lblVehiculoPesoBruto.Text = otra.VehiculoPesoBruto.ToString(CultureInfo.InvariantCulture); lblVehiculoCarga.Text = otra.VehiculoCarga.ToString(CultureInfo.InvariantCulture); lblVehiculoCombustible.Text = otra.VehiculoCombustible.Trim() == "" || otra.VehiculoCombustible.Trim() == "0" ? "" : new ParametroBC().getparametro("COMB", otra.VehiculoCombustible.Trim()).Valoralfanumerico.Trim().ToUpper(); lblVehiculoColor.Text = otra.VehiculoColor.Trim().ToUpper(); lblVehiculoMotor.Text = otra.VehiculoMotor.Trim().ToUpper(); lblPatente.Text = otra.Patente.Trim().ToUpper(); lblVehiculoChasis.Text = otra.VehiculoChasis.Trim().ToUpper(); lblVehiculoVin.Text = otra.VehiculoVin.Trim().ToUpper(); lblVehiculoCit.Text = otra.VehiculoCit.Trim().ToUpper(); }
protected void Page_Load(object sender, EventArgs e) { string rut_encrip; string nombre; rut_encrip = FuncionGlobal.FuctionDesEncriptar(Request.QueryString["rut"].ToString()); rut = Convert.ToInt32(rut_encrip); Persona mpersona = new PersonaBC().getpersonabyrut(rut); nombre = mpersona.Nombre; this.lbl_nombre.Text = nombre; this.lbl_rut.Text = rut_encrip; if (!IsPostBack) { getcorreo(); } }
private void busca_persona(double rut) { Persona mpersona = new PersonaBC().getpersonabyrut(rut); if (mpersona != null) { this.txt_rut_deudor.Enabled = false; this.txt_dv.Enabled = false; this.txt_nombre_deudor.Text = mpersona.Nombre; this.txt_materno.Text = mpersona.Apellido_materno; this.txt_paterno.Text = mpersona.Apellido_paterno; this.txt_dv.Text = mpersona.Dv; } else { this.txt_dv.Focus(); } getreferencia(id_solicitud); }
private void CagraGrilla() { List <Operacion> lstcreditos = new OperacionBC().getCreditosBCA(); DataTable dt = new DataTable(); dt.Columns.Add("id_solicitud", typeof(string)); dt.Columns.Add("N_interno", typeof(string)); dt.Columns.Add("Cliente", typeof(string)); dt.Columns.Add("Estado", typeof(string)); dt.Columns.Add("Fecha", typeof(string)); dt.Columns.Add("OBS", typeof(string)); DataRow row; foreach (Operacion item in lstcreditos) { if (item.Estado == "CREDITO OTORGADO NO PAGADO") { MasterBCA mst = new MasterBCABC().getMAsterBCAbyid(Convert.ToInt32(item.Id_solicitud)); Agenda agd = new AgendaBC().getAgenda(mst.Id_solicitud); Persona pers = new PersonaBC().getpersonabyrut(agd.Rut_persona); EstadoOperacion estop = new EstadooperacionBC().getUltimoEstadoByIdoperacion(Convert.ToInt32(item.Id_solicitud)); row = dt.Rows.Add(); row["id_solicitud"] = item.Id_solicitud; row["N_interno"] = mst.Id_interno; row["Cliente"] = pers.Nombre + " " + pers.Apellido_paterno + " " + pers.Apellido_materno; row["Estado"] = item.Estado; row["Fecha"] = item.Fecha_solicitud; row["OBS"] = estop.Observacion; } } if (dt.Columns.Count > 0) { this.btn_Aceptar.Enabled = true; } this.grdResultado.DataSource = dt; this.grdResultado.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { string rut_encrip; string nombre; rut_encrip = FuncionGlobal.FuctionDesEncriptar(Request.QueryString["rut"].ToString()); rut = Convert.ToInt32(rut_encrip); Persona mpersona = new PersonaBC().getpersonabyrut(rut); nombre = mpersona.Nombre; this.lbl_nombre.Text = nombre; this.lbl_rut.Text = rut_encrip; string paremetro = "TTEL"; if (!IsPostBack) { gettelefonos(); FuncionGlobal.comboparametro(this.dl_tipo_telefono, paremetro); } }
public bool Guardar_Form() { if (!Validar_Form()) { return(false); } string tipo_persona = (Convert.ToDouble(this.txt_rut.Text) > 50000000) ? "JUR" : "NAT"; string output = ""; //Guarda los datos de la persona output = new PersonaBC().add_persona(Convert.ToDouble(this.txt_rut.Text), this.txt_dv.Text.ToUpper().Trim(), 1, "", this.txt_nombre.Text.ToUpper().Trim(), this.txt_paterno.Text.ToUpper().Trim(), this.txt_materno.Text.ToUpper().Trim(), this.dl_sexo.SelectedValue.Trim(), tipo_persona, this.txt_nacionalidad.Text.ToUpper().Trim(), this.txt_profesion.Text.ToUpper().Trim(), this.dl_estado_civil.SelectedValue.Trim(), "", "", "", "", "", "", "0", ""); if (output != "") { ViewState["mensajeError"] = output; ScriptManager.RegisterStartupScript(this.up_persona, this.up_persona.GetType(), "ErrorPersona", "alert('Ha ocurrido un error al guardar los datos de la persona:\\n\\n" + output + "');", true); return(false); } this.Rut = Convert.ToDouble(this.txt_rut.Text.Replace(System.Globalization.CultureInfo.CurrentUICulture.NumberFormat.NumberGroupSeparator, "")); return(true); }
private void add_persona() { string persona = new PersonaBC().add_persona(Convert.ToDouble(this.txt_rut.Text), this.txt_dv.Text, Convert.ToInt16(this.dl_comuna.SelectedValue), this.txt_serie.Text, this.txt_nombre.Text, this.txt_paterno.Text, this.txt_materno.Text, this.dl_sexo.SelectedValue, this.dl_tipo_persona.SelectedValue, this.txt_nacionalidad.Text, this.txt_profesion.Text, this.dl_estado_civil.SelectedValue, this.txt_telefono.Text, this.txt_celular.Text, this.txt_correo.Text, this.txt_direccion.Text, this.txt_numero.Text, this.txt_depto.Text, this.dl_tipo_empleador.SelectedValue, "0"); }
private void add_operacion() { double rut_deudor = 0; GridViewRow row; string rutvend = "0"; Int32 monto_final = 0; DateTime fecha = Convert.ToDateTime("01/01/1900"); if (this.Datosvendedor.Guardar_Form()) { if (this.Datosvendedor.InfoPersona != null) { rutvend = this.Datosvendedor.InfoPersona.Rut.ToString(); } } if (this.txt_rut_deudor.Text == "") { rut_deudor = 0; } else { rut_deudor = Convert.ToDouble(this.txt_rut_deudor.Text); string persona = new PersonaBC().add_personaCG(Convert.ToDouble(this.txt_rut_deudor.Text), this.txt_dv.Text, 1, "", this.txt_nombre_deudor.Text, this.txt_paterno.Text, this.txt_materno.Text, "", "", "", "", "0", "0", "", "", "", "", "", "0"); } Int32 add = new OperacionBC().add_operacion(Convert.ToInt32(this.lbl_numero.Text), Convert.ToInt16(id_cliente), "SGI", (string)(Session["usrname"]), 0, "", Convert.ToInt32(this.dl_sucursal_origen.SelectedValue), 0); if (this.txt_monto_final.Text != "") { monto_final = Convert.ToInt32(this.txt_monto_final.Text); } if (this.txt_fecha_gestion.Text != "") { fecha = Convert.ToDateTime(this.txt_fecha_gestion.Text); } string addI_CTG = new ControlGestionBC().add_controlgestion(add, Convert.ToInt32(this.txt_rut_deudor.Text), Convert.ToInt32(this.dl_producto_Cliente.SelectedValue), Convert.ToInt32(FuncionGlobal.NumeroSinFormato(this.txt_total.Text)), fecha, Convert.ToInt32(this.txt_ncuotas.Text), this.txt_noperacion.Text, Convert.ToInt32(this.dl_sucursal_origen.SelectedValue.ToString()), this.txt_observacion.Text, Convert.ToInt32(this.dl_forma_pago.SelectedValue.ToString()), Convert.ToInt32(rutvend), this.txt_patente.Text, monto_final ); string add_SGI = ""; string del_SGI = ""; if (add != 0) { del_SGI = new DatoContactoBC().del_DatoContacto(add); for (int i = 0; i < gr_dato.Rows.Count; i++) { row = gr_dato.Rows[i]; TextBox txt_referencia = (TextBox)gr_dato.Rows[i].FindControl("txt_referencia"); add_SGI = new DatoContactoBC().add_DatoContacto(add, txt_referencia.Text ); } if (add_SGI == "") { string add_or = new EstadooperacionBC().add_estado_orden(Convert.ToInt32(add), 1, "SGI", "", (string)(Session["usrname"])); } } this.lbl_operacion.Visible = true; this.lbl_numero.Visible = true; this.ib_mas.Enabled = true; this.lbl_operacion.Text = "Operación de Gestion y Control Numero:"; this.lbl_numero.Text = Convert.ToString(add); getreferencia(Convert.ToString(add)); //carga_rpt(add); }
private void add() { double rut_compra_para; double rut_comprador; rut_compra_para = 0; rut_comprador = 0; //gravar dato vendedor en perona string persona = new PersonaBC().add_persona(Convert.ToDouble(this.txt_rut.Text), this.txt_dv.Text, Convert.ToInt16(this.dl_comuna.SelectedValue), "", this.txt_nombre.Text, this.txt_paterno.Text, this.txt_materno.Text, "0", "0", "", "", "0", this.txt_telefono.Text, "", "", this.txt_direccion.Text, this.txt_numero.Text, this.txt_depto.Text, "0", ""); if (this.rb_consignacion.Checked == false) { rut_comprador = Convert.ToDouble(this.txt_rut_compra.Text); //graba dato comprador en persona string personacom = new PersonaBC().add_persona(Convert.ToDouble(this.txt_rut_compra.Text), this.txt_dv.Text, Convert.ToInt16(this.dl_comuna_compra.SelectedValue), "", this.txt_nombre_compra.Text, this.txt_apellidop_compra.Text, this.txt_apellidom_compra.Text, "0", "0", "", "", "0", this.txt_telefono_compra.Text, "", "", this.txt_direccion_compra.Text, this.txt_numero_compra.Text, this.txt_depto_compra.Text, "0", ""); if (this.chk_compra_para.Checked == true) { rut_compra_para = Convert.ToDouble(this.txt_rut_para.Text); //grabo dato compra para en persona string personacpara = new PersonaBC().add_persona(Convert.ToDouble(this.txt_rut_para.Text), this.txt_dv.Text, Convert.ToInt16(this.dl_comuna_para.SelectedValue), "", this.txt_nombre_para.Text, this.txt_paterno_para.Text, this.txt_materno_para.Text, "0", "0", "", "", "0", this.txt_telefono_para.Text, "", "", this.txt_direccion_para.Text, this.txt_numero_para.Text, this.txt_depto_para.Text, "0", ""); } } Int32 add = new OperacionBC().add_operacion(Convert.ToInt32(this.lbl_numero.Text), Convert.ToInt16(this.dl_cliente.SelectedValue), "TR", (string)(Session["usrname"]), 0, "", 0, 0); if (add != 0) { string add_TR = new TransferenciaBC().add_Transferencia(add, Convert.ToDouble(this.txt_rut.Text), rut_comprador, rut_compra_para, 1, "", ""); } this.lbl_operacion.Visible = true; this.lbl_numero.Visible = true; this.lbl_operacion.Text = "Operación de Transferencia Numero:"; this.lbl_numero.Text = Convert.ToString(add); FuncionGlobal.alerta("CONTRATO DE TRANSFERENCIA, INGRESADO CON EXITO", Page); }
private void Busca_Persona(double rut) { Persona persona = new PersonaBC().getpersonabyrut(rut); ViewState["rut"] = rut; ViewState["apellidos"] = true; if (rut >= 50000000) { ViewState["apellidos"] = false; ViewState["otrosDatos"] = false; } this.pnl_apellidos.Visible = Convert.ToBoolean(ViewState["apellidos"] ?? false); this.rfv_paterno.Enabled = Convert.ToBoolean(ViewState["apellidos"] ?? false); this.rfv_paterno2.Enabled = Convert.ToBoolean(ViewState["apellidos"] ?? false); this.rfv_materno.Enabled = Convert.ToBoolean(ViewState["apellidos"] ?? false); this.rfv_materno2.Enabled = Convert.ToBoolean(ViewState["apellidos"] ?? false); if (Convert.ToBoolean(ViewState["apellidos"] ?? false)) { this.lbl_rut.Text = "R.U.N."; this.lbl_nombre.Text = "Nombres"; } else { this.lbl_rut.Text = "R.U.T."; this.lbl_nombre.Text = "Razón Social"; } this.rfv_rut.ErrorMessage = string.Format("{0} ({1})", this.lbl_rut.Text, this.Titulo); this.rfv_nombre.ErrorMessage = string.Format("{0} ({1})", this.lbl_nombre.Text, this.Titulo); this.pnl_otros_datos.Visible = Convert.ToBoolean(ViewState["otrosDatos"]); //if (Convert.ToBoolean(ViewState["otrosDatos"])) //{ // this.rfv_estado_civil.Enabled = Convert.ToBoolean(ViewState["apellidos"] ?? false); // this.rfv_estado_civil2.Enabled = Convert.ToBoolean(ViewState["apellidos"] ?? false); // this.rfv_sexo.Enabled = Convert.ToBoolean(ViewState["apellidos"] ?? false); // this.rfv_sexo2.Enabled = Convert.ToBoolean(ViewState["apellidos"] ?? false); //} if (persona != null && rut != 0) { this.txt_rut.Text = persona.Rut.ToString("N0"); this.txt_rut.Enabled = false; this.txt_dv.Enabled = false; this.txt_nombre.Text = persona.Nombre; this.txt_paterno.Text = persona.Apellido_paterno; this.txt_materno.Text = persona.Apellido_materno; this.txt_dv.Text = persona.Dv; this.txt_profesion.Text = persona.Profesion; this.txt_nacionalidad.Text = persona.Nacionalidad; FuncionGlobal.BuscarValueCombo(dl_sexo, persona.Sexo); FuncionGlobal.BuscarValueCombo(this.dl_estado_civil, persona.Estado_civil); this.Cambio_Persona(new CambioPersonaEventArgs(persona)); } else if (rut == 0) { this.txt_rut.Text = ""; this.txt_dv.Text = ""; this.txt_rut.Enabled = true; this.txt_dv.Enabled = false; this.txt_nombre.Focus(); } else { this.txt_rut.Text = rut.ToString("N0"); this.txt_dv.Text = FuncionGlobal.digitoVerificador(rut.ToString()); this.txt_rut.Enabled = false; this.txt_dv.Enabled = false; this.txt_nombre.Focus(); } }
private void CrearOperacion(string _id_oper, string _hora, string _tipo, string _fecha) { txt_obs.Text = ""; TBL_Agenda.Visible = false; TBL_Operacion.Visible = true; lblerror2.Text = ""; id_solicitud = _id_oper; fecha = _fecha; hora = _hora; tipo = _tipo; bt_guardar.Enabled = false; lbl_Oper_Fecha.Text = fecha; lbl_Oper_Hora.Text = hora; lbl_Oper_ID.Text = _id_oper; lbl_Oper_Tipo.Text = _tipo; if (tipo == "C") { Agenda agaux = new AgendaBC().getAgenda(Convert.ToInt32(id_solicitud)); Persona pers = new PersonaBC().getpersonabyrut(agaux.Rut_persona); Direcciones dirper = new DireccionesBC().getDireccionPorDefecto(Convert.ToInt32(pers.Rut)); List <Telefonos> telper = new TelefonoBC().gettelefonos(Convert.ToInt32(pers.Rut)); txt_rut.Text = pers.Rut.ToString(); txt_dv.Text = pers.Dv; txtNombre.Text = pers.Nombre; txtApellidoP.Text = pers.Apellido_paterno; txtApellidoM.Text = pers.Apellido_materno; cbo_EjeCom.SelectedValue = agaux.Ejecutivo; txtdireccion.Text = dirper.Direccion; txt_numeriDir.Text = dirper.Numero; this.giro = pers.Giro; foreach (Telefonos item in telper) { if (item.Tipo_telefono == "TCEL") { txt_celular.Text = item.Numero.ToString(); } if (item.Tipo_telefono == "TOFI") { txt_telefono.Text = item.Numero.ToString(); } } if (dirper.Tipo_direccion != null && dirper.Tipo_direccion != "") { rdbtipodir.SelectedValue = dirper.Tipo_direccion.Trim(); } //this.bt_finalizar.Visible = true; //this.bt_guardar.Text = "Eliminar"; txt_cantidadCredito.Visible = false; btnAgregarcredito.Visible = false; Label18.Visible = false; btnRechCred.Visible = false; List <MasterBCA> lbca = new MasterBCABC().getMAsterBCA(Convert.ToInt32(id_solicitud)); CreditosBice(lbca); } this.lbl_fecha.Text = fecha;// +" " + hora; this.lbl_operacion.Text = id_solicitud; GET_AGENDA(); }
protected void bt_guardar_Click(object sender, EventArgs e) { lblerror2.Text = ""; if (rdbtipodir.SelectedIndex == -1) { lblerror2.Visible = true; lblerror2.Text = "Debe seleccionar un tipo de direccion"; } else { UpdatePanel up = (UpdatePanel)this.Master.FindControl("UpdatePanel1"); if (txt_celular.Text != "") { string celupers = new TelefonoBC().add_telefonos(Convert.ToInt32(txt_rut.Text), "TCEL", Convert.ToInt32(this.txt_celular.Text), 0); } if (txt_telefono.Text != "") { string telefonopers = new TelefonoBC().add_telefonos(Convert.ToInt32(txt_rut.Text), "TOFI", Convert.ToInt32(this.txt_telefono.Text), 0); } string pers = new PersonaBC().add_persona(Convert.ToInt32(txt_rut.Text), txt_dv.Text.Trim(), 2, "", txtNombre.Text, txtApellidoP.Text, txtApellidoM.Text, "0", "0", "", "", "", txt_telefono.Text, "", "", txtdireccion.Text, "0", rdbtipodir.SelectedValue, "", giro); string dirpers = new DireccionesBC().add_direcciones(Convert.ToInt32(txt_rut.Text), this.txtdireccion.Text, rdbtipodir.SelectedValue, this.txt_numeriDir.Text, Convert.ToInt32(cboComuna.SelectedValue), "", 0); switch (lbl_Oper_Tipo.Text) { //case "C": // string magenda = new AgendaBC().del_agenda(Convert.ToInt32(lbl_Oper_ID.Text)); // string add_esta = new EstadooperacionBC().add_estado_orden(Convert.ToInt16(lbl_Oper_ID.Text), 60, "AGND", txt_obs.Text, (string)(Session["usrname"])); // FuncionGlobal.alerta_updatepanel("Operacion " + lbl_Oper_ID.Text + " guardada correctamente", Page, up); // mensajeOper(7, lbl_Oper_ID.Text); // break; case "R": if (cbo_EjeCom.SelectedValue != "0") { lblerror2.Text = ""; cbo_EjeCom.BackColor = System.Drawing.Color.White; Int32 rut = Convert.ToInt32(txt_rut.Text); string add = new AgendaBC().add_agenda(Convert.ToInt32(lbl_Oper_ID.Text), Convert.ToDateTime(lbl_Oper_Fecha.Text), lbl_Oper_Hora.Text, rut, (string)(Session["usrname"]), cbo_EjeCom.SelectedValue, cbo_tipoagenda.SelectedValue, dl_Usuarios.SelectedValue.Trim()); string add_est = new EstadooperacionBC().add_estado_orden(Convert.ToInt32(lbl_Oper_ID.Text), 80, "AGND", txt_obs.Text, (string)(Session["usrname"])); } else { lblerror2.Text = "debe Seleccionar un Ejecutivo Comercial"; cbo_EjeCom.BackColor = System.Drawing.Color.Yellow; cbo_EjeCom.Focus(); return; } break; case "T": if (cbo_EjeCom.SelectedValue != "0") { lblerror2.Text = ""; cbo_EjeCom.BackColor = System.Drawing.Color.White; Int32 opr = new OperacionBC().add_operacion(0, Convert.ToInt16(lbl_Oper_IDCli.Text), "AGND", (string)(Session["usrname"]), 0, "", 0, 0); string add_operacion = new AgendaBC().add_agenda(Convert.ToInt32(opr), Convert.ToDateTime(lbl_Oper_Fecha.Text), lbl_Oper_Hora.Text, Convert.ToInt32(txt_rut.Text), (string)(Session["usrname"]), cbo_EjeCom.SelectedValue, cbo_tipoagenda.SelectedValue, dl_Usuarios.SelectedValue.Trim()); string add_or = new EstadooperacionBC().add_estado_orden(Convert.ToInt32(opr), 10, "AGND", txt_obs.Text, (string)(Session["usrname"])); foreach (GridViewRow row in grdAddCreditos.Rows) { string idref = row.Cells[0].Text; string addBCA = new MasterBCABC().add_MasterBCA(opr, idref, 0); } mensajeOper(1, opr.ToString()); FuncionGlobal.alerta_updatepanel("Operacion " + opr + " guardada correctamente", Page, up); } else { lblerror2.Text = "debe Seleccionar un Ejecutivo Comercial"; cbo_EjeCom.BackColor = System.Drawing.Color.Yellow; cbo_EjeCom.Focus(); return; } break; } bt_guardar.Enabled = false; bt_Volver.Visible = true; } }