public void Update(String KODESKPD, String DESKRIPSI, String ALAMAT)
        {
            SKPD item = new SKPD();

            item.KODESKPD  = KODESKPD;
            item.DESKRIPSI = DESKRIPSI;
            item.ALAMAT    = ALAMAT;
            item.MarkOld();
            item.Save("");
        }
示例#2
0
    private void SaveData()
    {
        if (RequestAction != "edited")
        {
            item = new Data.SKPD();
        }

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

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

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

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