protected string PagarFila() { string resultado = string.Empty; bool insert = false; DataTable dt = (DataTable)Page.Session["gvCalendario"]; var idCalendario = HdfIndexPago["value"].ToString(); LogicaNegocio Ln = new LogicaNegocio(); DataRow[] result = null; SPWeb app2 = SPContext.Current.Web; util.ObtenerValor(app2.CurrentUser.Name); if (!string.IsNullOrEmpty(idCalendario.ToString())) { result = dt.Select("IdCalendario = '" + idCalendario.ToString() + "'"); } if (result != null) { insert = Ln.CP_ActualizarDatos(int.Parse(idCalendario), result[0]["Interes"].ToString().GetValorDecimal(), result[0]["MontoCuota"].ToString().GetValorDecimal(), result[0]["Capital"].ToString().GetValorDecimal(), int.Parse(OrigenPagoFila.Value.ToString()), util.ObtenerValor(app2.CurrentUser.Name), "", DateTime.Parse(FechaPagoFila.Value.ToString()), "0", "0", "0", "0", DateTime.Now, "02"); } if (insert) { resultado = "OK"; } return(resultado); }
protected void gvCalendarioPago_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e) { bool borrar = false; LogicaNegocio LN = new LogicaNegocio(); int Id = Convert.ToInt32(e.Values[gvCalendarioPago.KeyFieldName].ToString()); SPWeb app2 = SPContext.Current.Web; util.ObtenerValor(app2.CurrentUser.Name); borrar = LN.CP_ActualizarDatos(Id, 0, 0, 0, 0, util.ObtenerValor(app2.CurrentUser.Name), "0", DateTime.Now, "0", "0", "0", "0", DateTime.Now, "04"); e.Cancel = true; string[] parametros = (string[])Page.Session["filtos"]; inicializacionGrillas(parametros); //gvCalendarioPago.JSProperties["cpGrilla"] = "eliminar"; }
protected string PagarMasivo() { string resultado = string.Empty; bool masivo = false; SPWeb app2 = SPContext.Current.Web; LogicaNegocio Ln = new LogicaNegocio(); masivo = Ln.CP_ActualizarDatos(0, 0, 0, 0, int.Parse(OrigenPagoMasivo.Value.ToString()), util.ObtenerValor(app2.CurrentUser.Name), "", DateTime.Parse(FechaPagoMasivo.Value.ToString()), "0", txtCertificadoMasivo.Text.Trim(), "0", "0", DateTime.Now, "05"); if (masivo) { resultado = "OK"; } return(resultado); }
protected void gvCalendarioPago_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e) { SPWeb app2 = SPContext.Current.Web; bool modificar = false; LogicaNegocio Ln = new LogicaNegocio(); var fechaPago = e.NewValues["FechaPago"] == null ? null : (DateTime?)Convert.ToDateTime(e.NewValues["FechaPago"].ToString()); var origenPago = e.NewValues["IdOrigenPago"] == null ? null : (int?)int.Parse(e.NewValues["IdOrigenPago"].ToString()); int IdCalendario = Convert.ToInt32(e.Keys[gvCalendarioPago.KeyFieldName].ToString()); //e.Keys[0] == null ? 0 : Convert.ToInt32(e.Keys[0]); modificar = Ln.CP_ActualizarDatos(IdCalendario, e.NewValues["Interes"].ToString().GetValorDecimal(), e.NewValues["MontoCuota"].ToString().GetValorDecimal(), e.NewValues["Capital"].ToString().GetValorDecimal(), origenPago, util.ObtenerValor(app2.CurrentUser.Name), "", fechaPago, e.NewValues["NCredito"].ToString(), e.NewValues["NCertificado"].ToString(), e.NewValues["CuotaN"].ToString(), e.NewValues["NCuota"].ToString(), DateTime.Parse(e.NewValues["FechaVencimiento"].ToString()), "06"); gvCalendarioPago.CancelEdit(); e.Cancel = true; string[] parametros = (string[])Page.Session["filtos"]; inicializacionGrillas(parametros); }