protected void btnModificarSocio_DirectClick(object sender, Ext.Net.DirectEventArgs e) { if (this.txtNombre.Text != "" && this.txtApellidoPat.Text != "" && this.dteFechaN.Text != "" && this.dteFechaI.Text != "" && this.txtCalle.Text != "" && this.txtNoExt.Text != "") { if (this.rdoMasculino.Checked == true) { Session["Sexo"] = 1; } else { Session["Sexo"] = 0; } DateTime hoy = new DateTime(); DateTime actual = new DateTime(); hoy = DateTime.Now; actual = DateTime.Today; int ano = DateTime.Now.Year; fechaNac = Convert.ToDateTime(this.dteFechaN.Text); fechaIng = Convert.ToDateTime(this.dteFechaI.Text); if (DateTime.Compare(fechaIng, actual) > 0 || DateTime.Compare(fechaNac, actual) > 0) { X.Msg.Alert("Error", "La fecha es mayor a la actual").Show(); } else { ErrorOper = socio.InsertSocioBeneficio(Convert.ToString(Session["NumeroSocio"]), this.txtNombre.Text.ToUpper(), this.txtNombre2.Text.ToUpper(), this.txtApellidoPat.Text.ToUpper(), this.txtApellidoMat.Text.ToUpper(), fechaNac.ToString("dd/MM/yyyy"), fechaIng.ToString("dd/MM/yyyy"), (int)(Session["Sexo"]), "", "", "", Convert.ToInt32(this.cmbOcupacion.SelectedItem.Value), Convert.ToInt32(this.cmbEdoCivil.SelectedItem.Value), Convert.ToInt32(Session["Sucursal"]), Convert.ToString(ano), 1, this.txtCalle.Text.ToUpper(), this.txtNoExt.Text.ToUpper(), this.txtNoInt.Text.ToUpper(), 1, Convert.ToInt32(Session["Usuario"])); Session["IdSiniestro"] = dfNumeroSiniestro2.Text = ErrorOper.Mensaje; this.pnlSocio.Disabled = true; this.pnlSocio.Collapsed = true; this.paneLol.Disabled = false; this.pnlProteccionAhorros.Disabled = false; this.pnlProteccionPrestamos.Disabled = false; } this.btnCancelarRegistroSocio.Disabled = true; this.btnModificarSocio.Disabled = true; int noSiniestro = Convert.ToInt32(Session["IdSiniestro"]); } else { X.Msg.Alert("Aviso", "Faltan algunos campos de llenado").Show(); } }
protected void btnModificarSocio_DirectClick(object sender, Ext.Net.DirectEventArgs e) { if (this.txtNombre.Text != "" && this.txtApellidoPat.Text != "" && this.dteFechaN.Text != "" && this.dteFechaI.Text != "" && this.txtCalle.Text != "" && this.txtNoExt.Text != "") { if (this.rdoMasculino.Checked == true) Session["Sexo"] = 1; else Session["Sexo"] = 0; DateTime hoy = new DateTime(); DateTime actual = new DateTime(); hoy = DateTime.Now; actual = DateTime.Today; int ano = DateTime.Now.Year; fechaNac = Convert.ToDateTime(this.dteFechaN.Text); fechaIng = Convert.ToDateTime(this.dteFechaI.Text); if (DateTime.Compare(fechaIng, actual) > 0 || DateTime.Compare(fechaNac, actual) > 0) X.Msg.Alert("Error", "La fecha es mayor a la actual").Show(); else { ErrorOper = socio.InsertSocioBeneficio(Convert.ToString(Session["NumeroSocio"]), this.txtNombre.Text.ToUpper(), this.txtNombre2.Text.ToUpper(), this.txtApellidoPat.Text.ToUpper(), this.txtApellidoMat.Text.ToUpper(), fechaNac.ToString("dd/MM/yyyy"), fechaIng.ToString("dd/MM/yyyy"), (int)(Session["Sexo"]), "", "", "", Convert.ToInt32(this.cmbOcupacion.SelectedItem.Value), Convert.ToInt32(this.cmbEdoCivil.SelectedItem.Value), Convert.ToInt32(Session["Sucursal"]), Convert.ToString(ano), 1, this.txtCalle.Text.ToUpper(), this.txtNoExt.Text.ToUpper(), this.txtNoInt.Text.ToUpper(), 1, Convert.ToInt32(Session["Usuario"])); Session["IdSiniestro"] = dfNumeroSiniestro2.Text = ErrorOper.Mensaje; this.pnlSocio.Disabled = true; this.pnlSocio.Collapsed = true; this.paneLol.Disabled = false; this.pnlProteccionAhorros.Disabled = false; this.pnlProteccionPrestamos.Disabled = false; } this.btnCancelarRegistroSocio.Disabled = true; this.btnModificarSocio.Disabled = true; int noSiniestro = Convert.ToInt32(Session["IdSiniestro"]); } else X.Msg.Alert("Aviso", "Faltan algunos campos de llenado").Show(); }