private void CopyRecord()
    {
        //	copy record
        if (Request["copyid1"] != null || Request["editid1"] != null)
        {
            if (Request["copyid1"] != null)
            {
                item   = Data.KELOMPOKPENGGUNA.FetchByID(Request["copyid1"]);
                isCopy = true;
            }
            else
            {
                item = Data.KELOMPOKPENGGUNA.FetchByID(Request["editid1"]);
            }

            //	clear key fields
            defvalues["KODEKELOMPOK"] = item.KODEKELOMPOK;
        }
        else if (defvalues.Count == 0)
        {
        }

        if (inlineedit == ADD_MODE.ADD_ONTHEFLY)
        {
        }
    }
Example #2
0
        public void Update(String KODEKELOMPOK, String DESKRIPSI)
        {
            KELOMPOKPENGGUNA item = new KELOMPOKPENGGUNA();

            item.KODEKELOMPOK = KODEKELOMPOK;
            item.DESKRIPSI    = DESKRIPSI;
            item.MarkOld();
            item.Save("");
        }
Example #3
0
        public void Insert(
            String
            KODEKELOMPOK
            ,
            String
            DESKRIPSI
            )
        {
            KELOMPOKPENGGUNA item = new KELOMPOKPENGGUNA();

            item.KODEKELOMPOK = KODEKELOMPOK;
            item.DESKRIPSI    = DESKRIPSI;
            item.Save("");
        }
    private void SaveData()
    {
        item = new Data.KELOMPOKPENGGUNA();
        //	processing KODEKELOMPOK - start
        if (!string.IsNullOrEmpty(Request["value_KODEKELOMPOK"]))
        {
            item.KODEKELOMPOK = Convert.ToString(Request["value_KODEKELOMPOK"]);
        }
        //	processing DESKRIPSI - start
        if (!string.IsNullOrEmpty(Request["value_DESKRIPSI"]))
        {
            item.DESKRIPSI = Convert.ToString(Request["value_DESKRIPSI"]);
        }
        bool abortSaving = false;


        if (!abortSaving)
        {
            item.Save();
            ShowSuccessMessage();
        }
    }
    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);
    }
    private void SaveData()
    {
        if (RequestAction != "edited")
        {
            item = new Data.KELOMPOKPENGGUNA();
        }

        Data.KELOMPOKPENGGUNA emptyItem = new Data.KELOMPOKPENGGUNA();

        //	processing DESKRIPSI - start
        if (!string.IsNullOrEmpty(Request["value_DESKRIPSI"]))
        {
            item.DESKRIPSI = Convert.ToString(Request["value_DESKRIPSI"]);
        }
        else
        {
            item.DESKRIPSI = emptyItem.DESKRIPSI;
        }
        //
        //item.KODEKELOMPOK =  Convert.ToString(Request["editid1"]);
        //
        string idx = string.Empty;

        idx = "1";
        item.KODEKELOMPOK = Convert.ToString(Request["editid" + idx]);
        bool abortSaving = false;

        if (!abortSaving)
        {
            item.MarkOld();
            item.Save();
            idx = "1";
            item.KODEKELOMPOK = Convert.ToString(Request["editid" + idx]);
            ShowSuccessMessage();
        }
    }