Exemplo n.º 1
0
    /// <summary>Begin page running after session validations</summary>
    private void Go()
    {
        this.user       = (ApplicationUser)Session["User"];
        this.master     = this.Master as Main;
        this.company    = Session["Company"] as Company;
        this.Dictionary = Session["Dictionary"] as Dictionary <string, string>;

        // Renew session
        Session["User"]       = this.user;
        Session["Dictionary"] = this.Dictionary;

        this.master.AddBreadCrumb(ApplicationDictionary.Translate("Item_Presupuestos"));
        this.master.Titulo           = ApplicationDictionary.Translate("Item_Presupuesto");
        this.master.SearcheableItems = "[]";

        var codedQuery = new CodedQuery();

        codedQuery.SetQuery(this.Request.QueryString);
        this.MascotaId   = codedQuery.GetByKey <string>("mascotaId");
        this.Mascota     = Mascota.ById(this.MascotaId);
        this.TarifaId    = codedQuery.GetByKey <string>("tarifaId");
        this.ColectivoId = codedQuery.GetByKey <string>("colectivo");
        this.PolizaId    = codedQuery.GetByKey <string>("polizaId");
        this.GetActos();
        this.RenderActosRealizados();

        var poliza = Poliza.ById(this.PolizaId);

        if (!string.IsNullOrEmpty(poliza.AseguradoNombre))
        {
            this.PolizaNum = poliza.AseguradoNombre + " - " + poliza.Numero;
        }
        else
        {
            this.PolizaNum = poliza.Numero;
        }
    }