private void SaveData() { reff_agamaDAL _dalreff_agamaDAL = null; Hashtable _htParameters = null; int iNextID = 0; try { _dalreff_agamaDAL = new reff_agamaDAL(); _htParameters = new Hashtable(); MPF23.Shared.Mapper.UIToDB.Map(pnlBody.Controls, _htParameters); Utility.ApplyDefaultProp(_htParameters); if (Request.Params["action"] == "add") { _dalreff_agamaDAL.Insert(_htParameters, ref iNextID); } else { _dalreff_agamaDAL.Update(_htParameters); iNextID = Int32.Parse(lblRELIGION.Text); } Utility.ShowMessageBox(this, Utility.SAVE_DATA_SUCCESS_MESSAGE, null, "agamadtl.aspx?action=edt&id=" + iNextID.ToString()); } catch (Exception ex) { Utility.ShowMessageBox(this, Utility.SAVE_DATA_FAIL_MESSAGE, ex, null); } }
private void BindGrid() { reff_agamaDAL _dalreff_agama = null; Hashtable _htParameters = null; try { _dalreff_agama = new reff_agamaDAL(); _htParameters = new Hashtable(); _htParameters["p_keywords"] = txtSearch.Text; gvwList.DataSource = _dalreff_agama.GetRows(_htParameters); gvwList.DataBind(); } catch (Exception ex) { Utility.ShowMessageBox(this, Utility.LOAD_DATA_FAIL_MESSAGE, ex, null, null); } }
private void LoadData() { reff_agamaDAL _dalreff_agamaDAL = null; Hashtable _htParameters = null; try { //System.Diagnostics.Debugger.Break(); _dalreff_agamaDAL = new reff_agamaDAL(); _htParameters = new Hashtable(); _htParameters["p_id"] = Request.Params["id"]; DataTable _dt = _dalreff_agamaDAL.GetRow(_htParameters); MPF23.Shared.Mapper.DBToUI.Map(pnlBody.Controls, _dt.Rows[0]); } catch (Exception ex) { Utility.ShowMessageBox(this, Utility.LOAD_DATA_FAIL_MESSAGE, ex, null); } }
private void BindAgama() { reff_agamaDAL _dalreff_agama = null; Hashtable _htParameters = null; try { _dalreff_agama = new reff_agamaDAL(); _htParameters = new Hashtable(); _htParameters["p_keywords"] = ""; DdlAgama.DataSource = _dalreff_agama.GetRows(_htParameters); DdlAgama.DataValueField = "KODE"; DdlAgama.DataTextField = "deskripsi"; DdlAgama.DataBind(); } catch (Exception ex) { Utility.ShowMessageBox(this, Utility.LOAD_DATA_FAIL_MESSAGE, ex, null); } }