public void Update(String KODESTATUS, String DESKRIPSI, Int32 URUTAN)
        {
            STATUSPBJ item = new STATUSPBJ();

            item.KODESTATUS = KODESTATUS;
            item.DESKRIPSI  = DESKRIPSI;
            item.URUTAN     = URUTAN;
            item.MarkOld();
            item.Save("");
        }
예제 #2
0
    private void SaveData()
    {
        if (RequestAction != "edited")
        {
            item = new Data.STATUSPBJ();
        }

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

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

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

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