private void addd() { double rut_adq = 0; Int32 add = new OperacionBC().add_operacion(Convert.ToInt32(this.lbl_numero.Text), Convert.ToInt16(10), tipo_operacion, (string)(Session["usrname"]), 0, "", Convert.ToInt32(this.dl_sucursal.SelectedValue), 0); if (this.DatosAdquiriente.Guardar_Form()) { if (this.DatosAdquiriente.InfoPersona != null) { rut_adq = this.DatosAdquiriente.InfoPersona.Rut; } } Int32 n_cliente = 0; if (this.txt_n_cliente.Text != "") { n_cliente = Convert.ToInt32(this.txt_n_cliente.Text); } string add2 = new Retiro_carpetaBC().add_retiro_carpeta(rut_adq.ToString(), n_cliente, this.txt_ejecutivo.Text, add, "0", this.dl_concesionario.SelectedItem.Text, "0", "", this.txt_patente.Text, DateTime.Now.ToString()); string add_or = new EstadooperacionBC().add_estado_orden(Convert.ToInt32(add), 1, tipo_operacion, "", (string)(Session["usrname"])); this.lbl_operacion.Visible = true; this.lbl_numero.Visible = true; this.lbl_operacion.Text = "Operación de Retiro de Carpeta Numero:"; this.lbl_numero.Text = Convert.ToString(add); FuncionGlobal.alerta("RETIRO DE CARPETA, INGRESADO CON EXITO", Page); }
protected void busca_operacion() { Retiro_Carpeta mretiro = new Retiro_carpetaBC().getretiro(id_solicitud); Operacion moper = new OperacionBC().getoperacion(id_solicitud); if (mretiro.Id_solicitud != 0) { string id_usuario = ((string)(Session["usrname"])); FuncionGlobal.combosucursalbyclienteandUsuario(this.dl_sucursal, Convert.ToInt16(10), id_usuario); switch (mretiro.Concesionario) { case "DERCO S.A.": conces = "DER"; break; case "AMICAR": conces = "AMI"; break; case "AUTOMOTORES GILDEMEISTER": conces = "AUT"; break; case "DERCOMAQ (MAQUINAS, BUSES Y CAMIONES PESADOS)": conces = "DCM"; break; case "AG MAQUINAS, BUSES Y CAMIONES PESADOS": conces = "AGM"; break; } this.dl_concesionario.SelectedValue = conces; this.txt_f_adjudicacion.Text = mretiro.Fecha_adjudicacion; this.DatosAdquiriente.Mostrar_Form(mretiro.Rut_adquiriente); this.txt_credito.Text = mretiro.Num_credito.ToString(); this.txt_ejecutivo.Text = mretiro.Ejecutivo; this.dl_sucursal.SelectedValue = moper.Sucursal.Id_sucursal.ToString(); this.dl_financiera.SelectedValue = this.dl_financiera.Items.FindByText(mretiro.Financiera).Value; this.lbl_operacion.Visible = true; this.lbl_numero.Visible = true; this.lbl_operacion.Text = "Operación de Retiro de Carpeta Numero:"; this.lbl_numero.Text = Convert.ToString(mretiro.Id_solicitud); this.dl_prohibicion.SelectedValue = mretiro.Prohibicion; this.txt_ot.Text = mretiro.Codigo_ot; this.dl_concesionario.Enabled = false; this.txt_credito.Enabled = false; this.txt_ejecutivo.Enabled = false; Usuario user = new UsuarioBC().GetUsuario((string)(Session["usrname"])); if (user.Cliente.Id_cliente != 1) { this.dl_financiera.Enabled = false; } this.dl_sucursal.Enabled = false; this.dl_prohibicion.Enabled = true; } }
protected void txt_credito_TextChanged(object sender, EventArgs e) { Retiro_Carpeta mretiro = new Retiro_carpetaBC().getretirobycredito(Convert.ToInt32(this.txt_credito.Text)); if (mretiro.Id_solicitud != 0) { Operacion moper = new OperacionBC().getoperacion(mretiro.Id_solicitud); this.DatosAdquiriente.Mostrar_Form(mretiro.Rut_adquiriente); this.txt_credito.Text = mretiro.Num_credito.ToString(); this.txt_ejecutivo.Text = mretiro.Ejecutivo; this.dl_prohibicion.SelectedValue = mretiro.Prohibicion; this.txt_ot.Text = mretiro.Codigo_ot; string id_usuario = ((string)(Session["usrname"])); switch (mretiro.Concesionario) { case "DERCO S.A.": conces = "DER"; break; case "AMICAR": conces = "AMI"; break; case "AUTOMOTORES GILDEMEISTER": conces = "AUT"; break; case "DERCOMAQ (MAQUINAS, BUSES Y CAMIONES PESADOS)": conces = "DCM"; break; case "AG MAQUINAS, BUSES Y CAMIONES PESADOS": conces = "AGM"; break; } this.dl_concesionario.SelectedValue = conces; FuncionGlobal.combosucursalbyclienteandUsuarioconces(this.dl_sucursal, Convert.ToInt16(10), id_usuario, conces); this.dl_sucursal.SelectedValue = moper.Sucursal.Id_sucursal.ToString(); this.dl_financiera.SelectedValue = this.dl_financiera.Items.FindByText(mretiro.Financiera).Value; this.txt_f_adjudicacion.Text = mretiro.Fecha_adjudicacion.ToString(); if (tipo_operacion.Trim().ToUpper() == "RETC") { this.lbl_operacion.Visible = true; this.lbl_numero.Visible = true; this.lbl_operacion.Text = "Operación de Retiro de Carpeta Numero:"; this.lbl_numero.Text = Convert.ToString(mretiro.Id_solicitud); } } }