protected void btnRefresh_Click(object sender, EventArgs e)
 {
     if (Page.IsValid)
     {
         //update ke grid
         GvSaldoIjin.DataBind();
         lblTitleRincianJatahIjin.Visible = false;
         gvIjinRinci.Visible = false;
     }
 }
 protected void GvSaldoIjin_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "Show")
     {
         if (Page.IsValid)
         {
             GridViewRow row = (GridViewRow)((LinkButton)e.CommandSource).NamingContainer;
             GvSaldoIjin.SelectedIndex = row.RowIndex;
             GvSaldoIjin.DataBind();
             dsIjinRinci.SelectCommand = "select TGL_PROSES, KET_JATAH, KREDIT, DEBIT from q_JatahIjinRinci where NIP = '" + ((LinkButton)row.Cells[0].FindControl("lnkCol0Item")).Text + "' AND KODE_IJIN = '" + ddlFilterItem5.SelectedValue + "' AND TGL_JATAH = '" + DateTime.Parse(((Label)row.Cells[13].FindControl("lblCol13Item")).Text).ToString("MM/dd/yyyy") + "' ORDER BY TGL_PROSES, KODE_JATAH";
             dsIjinRinci.DataBind();
             lblTitleRincianJatahIjin.Visible = true;
             gvIjinRinci.Visible = true;
         }
     }
 }
        protected void txtHalaman_TextChanged(object sender, EventArgs e)
        {
            GridViewRow rowPager   = GvSaldoIjin.BottomPagerRow;
            TextBox     txtHalaman = (TextBox)(rowPager.Cells[0].FindControl("txtHalaman"));

            try
            {
                if (int.Parse(txtHalaman.Text) <= GvSaldoIjin.PageCount + 1 && int.Parse(txtHalaman.Text) > 0)
                {
                    GvSaldoIjin.PageIndex = (int.Parse(txtHalaman.Text)) - 1;
                    GvSaldoIjin.DataBind();
                }
            }
            catch (Exception)
            {
                txtHalaman.Text = (GvSaldoIjin.PageIndex + 1).ToString();
            }
        }
 protected void btnOK_Click(object sender, EventArgs e)
 {
     if (Page.IsValid)
     {
         if (radProsesUpdateJatahIjin.Checked)
         {
             doProses("proc_UpdateJatahIjin", "1401");
         }
         else if (radTambahJatahIjin.Checked)
         {
             doProsesParameterInteger("proc_TambahJatahIjin", "@iJmlTambah", "1402");
         }
         else if (radPotongJatahIjin.Checked)
         {
             doProsesParameterInteger("proc_PotongJatahIjin", "@iJmlPotong", "1403");
         }
         else if (radPotongSisaJatahIjin.Checked)
         {
             doProsesParameterInteger("proc_PotongSisaJatahIjin", "@iJmlSisa", "1404");
         }
         else if (radSetExpiredJatahIjin.Checked)
         {
             doProsesParameterTanggal("proc_SetExpiredJatahIjin", "@dTglExpired", "1405");
         }
         else if (radPerpanjangJatahIjin.Checked)
         {
             doProsesParameterInteger("proc_PerpanjangJatahIjin", "@iLamaBln", "1406");
         }
         else if (radHangusJatahIjin.Checked)
         {
             doProses("proc_HangusJatahIjin", "1407");
         }
         GvSaldoIjin.DataBind();
     }
     setInitialStateOfParameterValidator();
 }