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(""); }
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(); } }