protected void dsceremony_manualEdit_Inserted(object sender, System.Web.UI.WebControls.SqlDataSourceStatusEventArgs e) { //Seleksi apakah terjadi error atau tidak //jika tidak ada record yang ter insert maka terjadi error if (e.AffectedRows == 0) { ExceptionDetails.Text = lblCannotUpdate.Text; //& " (" & e.Exception.Message & ")" e.ExceptionHandled = true; if (!isEntrySambung()) { setInitialComponent(); } } else { //Catat ke Log rtwin.azlib.AddUserAct(Session["UserID"].ToString(), "2101", e.Command.Parameters["@NIP"].Value.ToString() + "," + e.Command.Parameters["@TGL_MASUK"].Value.ToString(), Application["strCn"].ToString()); ExceptionDetails.Text = "Data telah di simpan"; Gvceremony_manual.DataBind(); setInitialComponent(); } if (!isEntrySambung()) { showGridView(true); } }
protected void btnRefresh_Click(object sender, EventArgs e) { if (Page.IsValid) { //update ke grid Gvceremony_manual.DataBind(); } }
protected void dsceremony_manual_Deleted(object sender, System.Web.UI.WebControls.SqlDataSourceStatusEventArgs e) { //Seleksi apakah terjadi error atau tidak //jika tidak ada record yang ter delete maka terjadi error if (e.AffectedRows == 0) { ExceptionDetails.Text = lblCannotUpdate.Text; e.ExceptionHandled = true; } else { //Catat ke Log rtwin.azlib.AddUserAct(Session["UserID"].ToString(), "2103", e.Command.Parameters["@NIP"].Value.ToString() + "," + e.Command.Parameters["@TGL_MASUK"].Value.ToString(), Application["strCn"].ToString()); } Gvceremony_manual.DataBind(); }
protected void txtHalaman_TextChanged(object sender, EventArgs e) { GridViewRow rowPager = Gvceremony_manual.BottomPagerRow; TextBox txtHalaman = (TextBox)(rowPager.Cells[0].FindControl("txtHalaman")); try { if (int.Parse(txtHalaman.Text) <= Gvceremony_manual.PageCount + 1 && int.Parse(txtHalaman.Text) > 0) { Gvceremony_manual.PageIndex = (int.Parse(txtHalaman.Text)) - 1; Gvceremony_manual.DataBind(); } } catch (Exception) { txtHalaman.Text = (Gvceremony_manual.PageIndex + 1).ToString(); } }