private void SaveData()
    {
        MST_JABATAN_DAL _dalMST_JABATAN_DAL = null;
        Hashtable       _htParameters       = null;
        int             iNextID             = 0;

        try
        {
            _dalMST_JABATAN_DAL = new MST_JABATAN_DAL();
            _htParameters       = new Hashtable();

            MPF23.Shared.Mapper.UIToDB.Map(pnlBody.Controls, _htParameters);
            Utility.ApplyDefaultProp(_htParameters);

            if (Request.Params["action"] == "add")
            {
                _dalMST_JABATAN_DAL.Insert(_htParameters, ref iNextID);
            }
            else
            {
                _dalMST_JABATAN_DAL.Update(_htParameters);
                iNextID = Int32.Parse(lblID.Text);
            }

            Utility.ShowMessageBox(this, Utility.SAVE_DATA_SUCCESS_MESSAGE, null, "mstjabatandtl.aspx?action=edt&id=" + iNextID.ToString());
        }
        catch (Exception ex)
        {
            Utility.ShowMessageBox(this, Utility.SAVE_DATA_FAIL_MESSAGE, ex, null);
        }
    }
    protected void gvwList_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        switch (e.CommandName)
        {
        case "Edit":
            Response.Redirect("mstjabatandtl.aspx?action=edt&id=" + e.CommandArgument);
            break;

        case "Delete":
            MST_JABATAN_DAL _dalMST_JABATAN_DAL = null;
            Hashtable       _htParameters       = null;

            try
            {
                _dalMST_JABATAN_DAL = new MST_JABATAN_DAL();
                _htParameters       = new Hashtable();

                _htParameters["p_ID"] = e.CommandArgument.ToString();

                _dalMST_JABATAN_DAL.Delete(_htParameters);
                this.BindGrid();
                Response.Redirect("mstjabatanlist.aspx");
            }
            catch (Exception ex)
            {
                Utility.ShowMessageBox(this, Utility.LOAD_DATA_FAIL_MESSAGE, ex, null);
            }
            break;
        }
    }
    private bool SaveKenaikan()
    {
        MST_JABATAN_DAL _dalMST_JABATAN_DAL = null;
        Hashtable       _htParameters       = null;

        try
        {
            _dalMST_JABATAN_DAL = new MST_JABATAN_DAL();
            _htParameters       = new Hashtable();

            if (ddlTahun.SelectedValue == "")
            {
                Utility.ShowMessageBoxAnas(this, "Tahun masih kosong", "Gagal");
                return(false);
            }
            else
            {
                if (txtRupiah.Visible)
                {
                    txtPersen.Text = "0";
                    if (txtRupiah.Text == "" || txtRupiah.Text == "0")
                    {
                        Utility.ShowMessageBoxAnas(this, "Nominal Rupiah tidak boleh kosong atau Nol", "Gagal");
                        return(false);
                    }
                    txtRupiah.Text = txtRupiah.Text.Replace(",", "");
                }
                else
                {
                    txtRupiah.Text = "0";
                    if (txtPersen.Text == "" || txtPersen.Text == "0")
                    {
                        Utility.ShowMessageBoxAnas(this, "Persen tidak boleh kosong atau Nol", "Gagal");
                        return(false);
                    }
                    if (Convert.ToDecimal(txtPersen.Text) > 100)
                    {
                        Utility.ShowMessageBoxAnas(this, "Nilai Persen tidak boleh lebih dari 100 ", "Gagal");
                        return(false);
                    }
                }

                MPF23.Shared.Mapper.UIToDB.Map(pnlBody.Controls, _htParameters);
                Utility.ApplyDefaultProp(_htParameters);
                _dalMST_JABATAN_DAL.UpdateKenaikan(_htParameters);

                return(true);
            }
        }
        catch (Exception ex)
        {
            Utility.ShowMessageBox(this, Utility.SAVE_DATA_FAIL_MESSAGE, ex, null);
            return(false);
        }
    }
    private void LoadData()
    {
        MST_JABATAN_DAL _dalMST_JABATAN_DAL = null;
        Hashtable       _htParameters       = null;

        try
        {
            _dalMST_JABATAN_DAL = new MST_JABATAN_DAL();
            _htParameters       = new Hashtable();

            _htParameters["p_ID"] = Request.Params["id"];
            DataTable _dt = _dalMST_JABATAN_DAL.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 BindGrid()
    {
        MST_JABATAN_DAL _dalMST_JABATAN_DAL = null;
        Hashtable       _htParameters       = null;

        try
        {
            _dalMST_JABATAN_DAL = new MST_JABATAN_DAL();
            _htParameters       = new Hashtable();

            _htParameters["p_keywords"] = ddlUnitKerja.SelectedValue;

            gvwList.DataSource = _dalMST_JABATAN_DAL.GetRows(_htParameters);
            gvwList.DataBind();
        }
        catch (Exception ex)
        {
            Utility.ShowMessageBox(this, Utility.LOAD_DATA_FAIL_MESSAGE, ex, null, null);
        }
    }