private void CopyRecord() { // copy record if (Request["copyid1"] != null || Request["editid1"] != null) { if (Request["copyid1"] != null) { item = Data.SKPD.FetchByID(Request["copyid1"]); isCopy = true; } else { item = Data.SKPD.FetchByID(Request["editid1"]); } // clear key fields defvalues["KODESKPD"] = item.KODESKPD; } else if (defvalues.Count == 0) { } if (inlineedit == ADD_MODE.ADD_ONTHEFLY) { } }
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(""); }
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(""); }
private bool Init() { inlineedit = ((string)Request["editType"] == "inline"); record_id = (string)Request["recordID"]; if (inlineedit) { templatefile = "SKPD_inline_edit.aspx"; } else { templatefile = "SKPD_edit.aspx"; } keys["KODESKPD"] = Request["editid1"]; if (keys.Count > 1) { item = controller.FetchByManyID(keys); } else { item = Data.SKPD.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=\"SKPD_list.aspx?a=return\">back</a>"); return(false); } } else { this.Server.Transfer("~/SKPD_list.aspx?a=return"); } return(true); }