Esempio n. 1
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();
        }
    }
        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("");
        }
Esempio n. 3
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();
        }
    }
        public void Insert(
            String
            KODEPOKJA
            ,
            String
            NAMA
            ,
            String
            DESKRIPSSI
            )
        {
            POKJA item = new POKJA();

            item.KODEPOKJA  = KODEPOKJA;
            item.NAMA       = NAMA;
            item.DESKRIPSSI = DESKRIPSSI;
            item.Save("");
        }