Пример #1
0
    private bool retrieveEntity()
    {
        token  = (Token)Session["token"];
        survey = surveyCRUD.readById(token.SubjectKey);
        if (survey != null)
        {
            supplier = supplierCRUD.readById(survey.SupplierMasterKey);
            if (supplier != null)
            {
                SessionObject soSupplier = new SessionObject();
                supplier.SupplierSurvey   = survey;
                soSupplier.Content        = supplier;
                soSupplier.Status         = "forUpdate";
                Session["supplierObject"] = soSupplier;

                return(true);
            }
        }
        return(false);
    }
Пример #2
0
    public void updateByID(object sender, CommandEventArgs e)
    {
        long           id     = long.Parse((string)e.CommandArgument);
        SupplierSurvey survey = new SupplierSurvey();

        survey = surveyCRUD.readById(id);
        if (survey != null)
        {
            supplier.SupplierSurvey = survey;
            SessionObject so = new SessionObject();
            so.Content = supplier;
            so.Status  = "forUpdate";
            Session["supplierObject"] = so;

            uscSurveyForm.load();
            panelPopup.Visible = true;
        }
        else
        {
            Navigator.goToPage("~/Error.aspx", "ERROR:Could not retrieve survey with id = " + id);
        }
    }