コード例 #1
0
    private void CopyRecord()
    {
        //	copy record
        if (Request["copyid1"] != null || Request["editid1"] != null)
        {
            if (Request["copyid1"] != null)
            {
                item   = Data.POKJA.FetchByID(Request["copyid1"]);
                isCopy = true;
            }
            else
            {
                item = Data.POKJA.FetchByID(Request["editid1"]);
            }

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

        if (inlineedit == ADD_MODE.ADD_ONTHEFLY)
        {
        }
    }
コード例 #2
0
    private void SaveData()
    {
        item = new Data.POKJA();
        //	processing KODEPOKJA - start
        if (!string.IsNullOrEmpty(Request["value_KODEPOKJA"]))
        {
            item.KODEPOKJA = Convert.ToString(Request["value_KODEPOKJA"]);
        }
        //	processing NAMA - start
        if (!string.IsNullOrEmpty(Request["value_NAMA"]))
        {
            item.NAMA = Convert.ToString(Request["value_NAMA"]);
        }
        //	processing DESKRIPSSI - start
        if (!string.IsNullOrEmpty(Request["value_DESKRIPSSI"]))
        {
            item.DESKRIPSSI = Convert.ToString(Request["value_DESKRIPSSI"]);
        }
        bool abortSaving = false;


        if (!abortSaving)
        {
            item.Save();
            ShowSuccessMessage();
        }
    }
コード例 #3
0
        public void Update(String KODEPOKJA, String NAMA, String DESKRIPSSI)
        {
            POKJA item = new POKJA();

            item.KODEPOKJA  = KODEPOKJA;
            item.NAMA       = NAMA;
            item.DESKRIPSSI = DESKRIPSSI;
            item.MarkOld();
            item.Save("");
        }
コード例 #4
0
    private void SaveData()
    {
        if (RequestAction != "edited")
        {
            item = new Data.POKJA();
        }

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

        //	processing NAMA - start
        if (!string.IsNullOrEmpty(Request["value_NAMA"]))
        {
            item.NAMA = Convert.ToString(Request["value_NAMA"]);
        }
        else
        {
            item.NAMA = emptyItem.NAMA;
        }
        //	processing DESKRIPSSI - start
        if (!string.IsNullOrEmpty(Request["value_DESKRIPSSI"]))
        {
            item.DESKRIPSSI = Convert.ToString(Request["value_DESKRIPSSI"]);
        }
        else
        {
            item.DESKRIPSSI = emptyItem.DESKRIPSSI;
        }
        //
        //item.KODEPOKJA =  Convert.ToString(Request["editid1"]);
        //
        string idx = string.Empty;

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

        if (!abortSaving)
        {
            item.MarkOld();
            item.Save();
            idx            = "1";
            item.KODEPOKJA = Convert.ToString(Request["editid" + idx]);
            ShowSuccessMessage();
        }
    }
コード例 #5
0
        public void Insert(
            String
            KODEPOKJA
            ,
            String
            NAMA
            ,
            String
            DESKRIPSSI
            )
        {
            POKJA item = new POKJA();

            item.KODEPOKJA  = KODEPOKJA;
            item.NAMA       = NAMA;
            item.DESKRIPSSI = DESKRIPSSI;
            item.Save("");
        }
コード例 #6
0
    private bool Init()
    {
        inlineedit = ((string)Request["editType"] == "inline");
        record_id  = (string)Request["recordID"];
        if (inlineedit)
        {
            templatefile = "POKJA_inline_edit.aspx";
        }
        else
        {
            templatefile = "POKJA_edit.aspx";
        }

        keys["KODEPOKJA"] = Request["editid1"];
        if (keys.Count > 1)
        {
            item = controller.FetchByManyID(keys);
        }
        else
        {
            item = Data.POKJA.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=\"POKJA_list.aspx?a=return\">back</a>");
                return(false);
            }
        }
        else
        {
            this.Server.Transfer("~/POKJA_list.aspx?a=return");
        }

        return(true);
    }