protected void GridViewFacturasDetail_CustomCallback(object sender, DevExpress.Web.ASPxGridViewCustomCallbackEventArgs e) { string SerieFactura = Convert.ToString(GridViewFacturas.GetSelectedFieldValues("SerieFactura").Select(c => c).FirstOrDefault()); GridViewFacturasDetail.DataSource = FacturasRepository.GetFacturasDetail(SerieFactura); GridViewFacturasDetail.DataBind(); }
protected void GridViewFacturas_SelectionChanged(object sender, EventArgs e) { string SerieFactura = Convert.ToString(GridViewFacturas.GetSelectedFieldValues("SerieFactura").Select(c => c).FirstOrDefault()); GridViewFacturasDetail.DataSource = FacturasRepository.GetFacturasDetail(SerieFactura); GridViewFacturasDetail.DataBind(); }
protected void GridViewFacturas_SelectionChanged(object sender, EventArgs e) { string SerieFactura = Convert.ToString(GridViewFacturas.GetSelectedFieldValues("SerieFactura").Select(c => c).FirstOrDefault()); GridViewFacturasDetail.DataSource = FacturasRepository.GetFacturasDetail(SerieFactura); GridViewFacturasDetail.DataBind(); ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "divShow('#gridfamilia')", true); }
protected void Page_Load(object sender, EventArgs e) { if (Session["User"] != null) { TopMenu.Visible = false; //Login LogingMenu.Visible = true; //Logout } else { TopMenu.Visible = true; //Login LogingMenu.Visible = false; //Logout if (!HttpContext.Current.Request.Url.AbsoluteUri.Contains("login")) { if (Page.IsCallback) { ASPxWebControl.RedirectOnCallback("/Account/login.aspx"); } else { Response.Redirect("/Account/login.aspx"); } } } DateTime?defecha = null; DateTime?afecha = null; if (!Page.IsPostBack) { Session["buttonclick"] = "date"; defecha = Convert.ToDateTime(fechahoy.ToString("01/MMM/yyy")); afecha = Convert.ToDateTime(DateTime.DaysInMonth(fechahoy.Year, fechahoy.Month) + "/" + fechahoy.Month + "/" + fechahoy.Year); } if ((dtfromDate.Date != null || dttoDate.Date != null) && Convert.ToString(Session["buttonclick"]) == "date") { defecha = dtfromDate.Date; afecha = dttoDate.Date; } var Cliente = (Clientes)Session["User"]; GridViewFacturas.DataSource = FacturasRepository.GetAllFacturas("", Cliente.AutoCliente, defecha, afecha); GridViewFacturas.DataBind(); string SerieFactura = string.Empty; if (GridViewFacturas.GetSelectedFieldValues("SerieFactura").Count > 0) { SerieFactura = Convert.ToString(GridViewFacturas.GetSelectedFieldValues("SerieFactura").Select(c => c).FirstOrDefault()); } else { SerieFactura = Convert.ToString(GridViewFacturas.GetRowValues(0, "SerieFactura")); } GridViewFacturasDetail.DataSource = FacturasRepository.GetFacturasDetail(SerieFactura); GridViewFacturasDetail.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { if (Session["User"] == null) { if (Page.IsCallback) { ASPxWebControl.RedirectOnCallback("/Account/login.aspx"); } else { Response.Redirect("/Account/login.aspx"); } } // if (Request.Browser.IsMobileDevice) // { // if (Page.IsCallback) // { // ASPxWebControl.RedirectOnCallback("/mobile/Facturas.aspx"); // } // else // { // Response.Redirect("/mobile/Facturas.aspx"); // } // } DateTime?defecha = null; DateTime?afecha = null; if (!Page.IsPostBack) { Session["buttonclick"] = "date"; defecha = Convert.ToDateTime(fechahoy.ToString("01/MMM/yyy")); afecha = Convert.ToDateTime(DateTime.DaysInMonth(fechahoy.Year, fechahoy.Month) + "/" + fechahoy.Month + "/" + fechahoy.Year); } if ((dtfromDate.Date != null || dttoDate.Date != null) && Convert.ToString(Session["buttonclick"]) == "date") { defecha = dtfromDate.Date; afecha = dttoDate.Date; } var Cliente = (Clientes)Session["User"]; GridViewFacturas.DataSource = FacturasRepository.GetAllFacturas("", Cliente.AutoCliente, defecha, afecha); GridViewFacturas.DataBind(); string SerieFactura = string.Empty; if (GridViewFacturas.GetSelectedFieldValues("SerieFactura").Count > 0) { SerieFactura = Convert.ToString(GridViewFacturas.GetSelectedFieldValues("SerieFactura").Select(c => c).FirstOrDefault()); } else { SerieFactura = Convert.ToString(GridViewFacturas.GetRowValues(0, "SerieFactura")); } GridViewFacturasDetail.DataSource = FacturasRepository.GetFacturasDetail(SerieFactura); GridViewFacturasDetail.DataBind(); }