コード例 #1
0
    private bool Init()
    {
        inlineedit = ((string)Request["editType"] == "inline");
        record_id  = (string)Request["recordID"];
        if (inlineedit)
        {
            templatefile = "KELOMPOKPENGGUNA_inline_edit.aspx";
        }
        else
        {
            templatefile = "KELOMPOKPENGGUNA_edit.aspx";
        }

        keys["KODEKELOMPOK"] = Request["editid1"];
        if (keys.Count > 1)
        {
            item = controller.FetchByManyID(keys);
        }
        else
        {
            item = Data.KELOMPOKPENGGUNA.FetchByID(Request["editid1"]);
        }

        if (item != null)
        {
            bool editable = true;
            if (!editable)
            {
                output.Append("<p>" + "You don't have permissions to access this table" + " <a href=\"KELOMPOKPENGGUNA_list.aspx?a=return\">back</a>");
                return(false);
            }
        }
        else
        {
            this.Server.Transfer("~/KELOMPOKPENGGUNA_list.aspx?a=return");
        }

        return(true);
    }