private void CopyRecord() { // copy record if (Request["copyid1"] != null || Request["editid1"] != null) { if (Request["copyid1"] != null) { item = Data.DOKUMEN.FetchByID(Request["copyid1"]); isCopy = true; } else { item = Data.DOKUMEN.FetchByID(Request["editid1"]); } // clear key fields defvalues["KODEDOKUMEN"] = item.KODEDOKUMEN; } else if (defvalues.Count == 0) { } if (inlineedit == ADD_MODE.ADD_ONTHEFLY) { } }
public void Update(String KODEDOKUMEN, String DESKRIPSI) { DOKUMEN item = new DOKUMEN(); item.KODEDOKUMEN = KODEDOKUMEN; item.DESKRIPSI = DESKRIPSI; item.MarkOld(); item.Save(""); }
public void Insert( String KODEDOKUMEN , String DESKRIPSI ) { DOKUMEN item = new DOKUMEN(); item.KODEDOKUMEN = KODEDOKUMEN; item.DESKRIPSI = DESKRIPSI; item.Save(""); }
private void SaveData() { item = new Data.DOKUMEN(); // processing KODEDOKUMEN - start if (!string.IsNullOrEmpty(Request["value_KODEDOKUMEN"])) { item.KODEDOKUMEN = Convert.ToString(Request["value_KODEDOKUMEN"]); } // processing DESKRIPSI - start if (!string.IsNullOrEmpty(Request["value_DESKRIPSI"])) { item.DESKRIPSI = Convert.ToString(Request["value_DESKRIPSI"]); } bool abortSaving = false; if (!abortSaving) { item.Save(); ShowSuccessMessage(); } }
private bool Init() { inlineedit = ((string)Request["editType"] == "inline"); record_id = (string)Request["recordID"]; if (inlineedit) { templatefile = "DOKUMEN_inline_edit.aspx"; } else { templatefile = "DOKUMEN_edit.aspx"; } keys["KODEDOKUMEN"] = Request["editid1"]; if (keys.Count > 1) { item = controller.FetchByManyID(keys); } else { item = Data.DOKUMEN.FetchByID(Request["editid1"]); } if (item != null) { bool editable = true; if (!editable) { output.Append("<p>" + "You don't have permissions to access this table" + " <a href=\"DOKUMEN_list.aspx?a=return\">back</a>"); return(false); } } else { this.Server.Transfer("~/DOKUMEN_list.aspx?a=return"); } return(true); }
private void SaveData() { if (RequestAction != "edited") { item = new Data.DOKUMEN(); } Data.DOKUMEN emptyItem = new Data.DOKUMEN(); // processing DESKRIPSI - start if (!string.IsNullOrEmpty(Request["value_DESKRIPSI"])) { item.DESKRIPSI = Convert.ToString(Request["value_DESKRIPSI"]); } else { item.DESKRIPSI = emptyItem.DESKRIPSI; } // //item.KODEDOKUMEN = Convert.ToString(Request["editid1"]); // string idx = string.Empty; idx = "1"; item.KODEDOKUMEN = Convert.ToString(Request["editid" + idx]); bool abortSaving = false; if (!abortSaving) { item.MarkOld(); item.Save(); idx = "1"; item.KODEDOKUMEN = Convert.ToString(Request["editid" + idx]); ShowSuccessMessage(); } }