public static string IngresaNota(BENotas obj) { IHotels IService = new IHotels(); string fdoc = ""; if (obj.fechaF.Length > 5) { fdoc = obj.fechaF.Substring(6, 4) + obj.fechaF.Substring(3, 2) + obj.fechaF.Substring(0, 2); } string stResp = IService.ISetNotaCredito(obj.SerieNC, obj.CorrNC, obj.SerieF, obj.CorrF, fdoc); if (stResp != null) { if (stResp.Equals("0")) { return("No se actualizo ningun registro"); } else if (stResp.Substring(0, 1).Equals("0")) { return(stResp.Substring(2)); } else { return("Se actualizaron " + stResp + " registro(s)."); } } else { return("0"); } }
protected void btnAceptar_Click(object sender, EventArgs e) { IHotels IService = new IHotels(); string fdoc = ""; if (txtfecDoc.Text.Length > 5) { fdoc = txtfecDoc.Text.Substring(6, 4) + txtfecDoc.Text.Substring(3, 2) + txtfecDoc.Text.Substring(0, 2); } lblMsg.Text = "Se actualizaron " + IService.ISetNotaCredito(txtNumSerieNC.Text, txtNumCorrNC.Text, txtNumSerieFactura.Text, txtNumCorrFactura.Text, fdoc) + " registro(s)."; txtNumSerieNC.Text = string.Empty; txtNumCorrNC.Text = string.Empty; txtNumSerieFactura.Text = string.Empty; txtNumCorrFactura.Text = string.Empty; txtfecDoc.Text = string.Empty; }