private void CopyRecord() { // copy record if (Request["copyid1"] != null || Request["editid1"] != null) { if (Request["copyid1"] != null) { item = Data.AKTOR.FetchByID(Request["copyid1"]); isCopy = true; } else { item = Data.AKTOR.FetchByID(Request["editid1"]); } // clear key fields defvalues["NIP"] = item.NIP; } else if (defvalues.Count == 0) { } if (inlineedit == ADD_MODE.ADD_ONTHEFLY) { } }
private void SaveData() { if (RequestAction != "edited") { item = new Data.AKTOR(); } Data.AKTOR emptyItem = new Data.AKTOR(); // processing NAMA - start if (!string.IsNullOrEmpty(Request["value_NAMA"])) { item.NAMA = Convert.ToString(Request["value_NAMA"]); } else { item.NAMA = emptyItem.NAMA; } // processing KODEJABATAN - start if (!string.IsNullOrEmpty(Request["value_KODEJABATAN"])) { item.KODEJABATAN = Convert.ToString(Request["value_KODEJABATAN"]); } else { item.KODEJABATAN = emptyItem.KODEJABATAN; } // processing KODETIPE - start if (!string.IsNullOrEmpty(Request["value_KODETIPE"])) { item.KODETIPE = Convert.ToString(Request["value_KODETIPE"]); } else { item.KODETIPE = emptyItem.KODETIPE; } // //item.NIP = Convert.ToString(Request["editid1"]); // string idx = string.Empty; idx = "1"; item.NIP = Convert.ToString(Request["editid" + idx]); bool abortSaving = false; if (!abortSaving) { item.MarkOld(); item.Save(); idx = "1"; item.NIP = Convert.ToString(Request["editid" + idx]); ShowSuccessMessage(); } }
public void Update(String NIP, String NAMA, String KODEJABATAN, String KODETIPE) { AKTOR item = new AKTOR(); item.NIP = NIP; item.NAMA = NAMA; item.KODEJABATAN = KODEJABATAN; item.KODETIPE = KODETIPE; item.MarkOld(); item.Save(""); }
private void SaveData() { item = new Data.AKTOR(); // processing NIP - start if (!string.IsNullOrEmpty(Request["value_NIP"])) { item.NIP = Convert.ToString(Request["value_NIP"]); } // processing NAMA - start if (!string.IsNullOrEmpty(Request["value_NAMA"])) { item.NAMA = Convert.ToString(Request["value_NAMA"]); } // processing KODEJABATAN - start if (!string.IsNullOrEmpty(Request["value_KODEJABATAN"])) { item.KODEJABATAN = Convert.ToString(Request["value_KODEJABATAN"]); } // processing KODETIPE - start if (!string.IsNullOrEmpty(Request["value_KODETIPE"])) { item.KODETIPE = Convert.ToString(Request["value_KODETIPE"]); } bool abortSaving = false; // insert masterkey value if exists and if not specified if (Mastertable == "dbo.TIPEAKTOR") { if (string.IsNullOrEmpty(Request["value_KODETIPE"])) { item.KODETIPE = Convert.ToString(Session[strTableName + "_masterkey1"]); } } if (Mastertable == "dbo.JABATANAKTOR") { if (string.IsNullOrEmpty(Request["value_KODEJABATAN"])) { item.KODEJABATAN = Convert.ToString(Session[strTableName + "_masterkey1"]); } } if (!abortSaving) { item.Save(); ShowSuccessMessage(); } }
private bool Init() { inlineedit = ((string)Request["editType"] == "inline"); record_id = (string)Request["recordID"]; if (inlineedit) { templatefile = "AKTOR_inline_edit.aspx"; } else { templatefile = "AKTOR_edit.aspx"; } keys["NIP"] = Request["editid1"]; if (keys.Count > 1) { item = controller.FetchByManyID(keys); } else { item = Data.AKTOR.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=\"AKTOR_list.aspx?a=return\">back</a>"); return(false); } } else { this.Server.Transfer("~/AKTOR_list.aspx?a=return"); } return(true); }
public void Insert( String NIP , String NAMA , String KODEJABATAN , String KODETIPE ) { AKTOR item = new AKTOR(); item.NIP = NIP; item.NAMA = NAMA; item.KODEJABATAN = KODEJABATAN; item.KODETIPE = KODETIPE; item.Save(""); }