예제 #1
0
    private void SaveData()
    {
        item = new Data.SKPD();
        //	processing KODESKPD - start
        if (!string.IsNullOrEmpty(Request["value_KODESKPD"]))
        {
            item.KODESKPD = Convert.ToString(Request["value_KODESKPD"]);
        }
        //	processing DESKRIPSI - start
        if (!string.IsNullOrEmpty(Request["value_DESKRIPSI"]))
        {
            item.DESKRIPSI = Convert.ToString(Request["value_DESKRIPSI"]);
        }
        //	processing ALAMAT - start
        if (!string.IsNullOrEmpty(Request["value_ALAMAT"]))
        {
            item.ALAMAT = Convert.ToString(Request["value_ALAMAT"]);
        }
        bool abortSaving = false;


        if (!abortSaving)
        {
            item.Save();
            ShowSuccessMessage();
        }
    }
        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("");
        }
예제 #3
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();
        }
    }
        public void Insert(
            String
            KODESKPD
            ,
            String
            DESKRIPSI
            ,
            String
            ALAMAT
            )
        {
            SKPD item = new SKPD();

            item.KODESKPD  = KODESKPD;
            item.DESKRIPSI = DESKRIPSI;
            item.ALAMAT    = ALAMAT;
            item.Save("");
        }