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

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

        if (inlineedit == ADD_MODE.ADD_ONTHEFLY)
        {
        }
    }
示例#2
0
        public void Update(String KODEKELENGKAPAN, String KODEDOKUMEN, String KODEJENISKEGIATAN)
        {
            KELENGKAPAN item = new KELENGKAPAN();

            item.KODEKELENGKAPAN   = KODEKELENGKAPAN;
            item.KODEDOKUMEN       = KODEDOKUMEN;
            item.KODEJENISKEGIATAN = KODEJENISKEGIATAN;
            item.MarkOld();
            item.Save("");
        }
示例#3
0
    private void SaveData()
    {
        if (RequestAction != "edited")
        {
            item = new Data.KELENGKAPAN();
        }

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

        //	processing KODEDOKUMEN - start
        if (!string.IsNullOrEmpty(Request["value_KODEDOKUMEN"]))
        {
            item.KODEDOKUMEN = Convert.ToString(Request["value_KODEDOKUMEN"]);
        }
        else
        {
            item.KODEDOKUMEN = emptyItem.KODEDOKUMEN;
        }
        //	processing KODEJENISKEGIATAN - start
        if (!string.IsNullOrEmpty(Request["value_KODEJENISKEGIATAN"]))
        {
            item.KODEJENISKEGIATAN = Convert.ToString(Request["value_KODEJENISKEGIATAN"]);
        }
        else
        {
            item.KODEJENISKEGIATAN = emptyItem.KODEJENISKEGIATAN;
        }
        //
        //item.KODEKELENGKAPAN =  Convert.ToString(Request["editid1"]);
        //
        string idx = string.Empty;

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

        if (!abortSaving)
        {
            item.MarkOld();
            item.Save();
            idx = "1";
            item.KODEKELENGKAPAN = Convert.ToString(Request["editid" + idx]);
            ShowSuccessMessage();
        }
    }
示例#4
0
        public void Insert(
            String
            KODEKELENGKAPAN
            ,
            String
            KODEDOKUMEN
            ,
            String
            KODEJENISKEGIATAN
            )
        {
            KELENGKAPAN item = new KELENGKAPAN();

            item.KODEKELENGKAPAN   = KODEKELENGKAPAN;
            item.KODEDOKUMEN       = KODEDOKUMEN;
            item.KODEJENISKEGIATAN = KODEJENISKEGIATAN;
            item.Save("");
        }
示例#5
0
    private void SaveData()
    {
        item = new Data.KELENGKAPAN();
        //	processing KODEKELENGKAPAN - start
        if (!string.IsNullOrEmpty(Request["value_KODEKELENGKAPAN"]))
        {
            item.KODEKELENGKAPAN = Convert.ToString(Request["value_KODEKELENGKAPAN"]);
        }
        //	processing KODEDOKUMEN - start
        if (!string.IsNullOrEmpty(Request["value_KODEDOKUMEN"]))
        {
            item.KODEDOKUMEN = Convert.ToString(Request["value_KODEDOKUMEN"]);
        }
        //	processing KODEJENISKEGIATAN - start
        if (!string.IsNullOrEmpty(Request["value_KODEJENISKEGIATAN"]))
        {
            item.KODEJENISKEGIATAN = Convert.ToString(Request["value_KODEJENISKEGIATAN"]);
        }
        bool abortSaving = false;

        //      insert masterkey value if exists and if not specified
        if (Mastertable == "dbo.JENISKEGIATAN")
        {
            if (string.IsNullOrEmpty(Request["value_KODEJENISKEGIATAN"]))
            {
                item.KODEJENISKEGIATAN = Convert.ToString(Session[strTableName + "_masterkey1"]);
            }
        }
        if (Mastertable == "dbo.DOKUMEN")
        {
            if (string.IsNullOrEmpty(Request["value_KODEDOKUMEN"]))
            {
                item.KODEDOKUMEN = Convert.ToString(Session[strTableName + "_masterkey1"]);
            }
        }

        if (!abortSaving)
        {
            item.Save();
            ShowSuccessMessage();
        }
    }
示例#6
0
    private bool Init()
    {
        inlineedit = ((string)Request["editType"] == "inline");
        record_id  = (string)Request["recordID"];
        if (inlineedit)
        {
            templatefile = "KELENGKAPAN_inline_edit.aspx";
        }
        else
        {
            templatefile = "KELENGKAPAN_edit.aspx";
        }

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

        return(true);
    }