protected void gvDiskonJasa_CustomButtonInitialize(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonEventArgs e) { if (e.VisibleIndex > 0) { try { if (e.ButtonID == "debitur") { e.Text = (gvDiskonJasa.GetRowValues(e.VisibleIndex, "mitra_id")).ToString(); } else if (e.ButtonID == "btnTambah") { int sisa = Convert.ToInt32(gvDiskonJasa.GetRowValues(e.VisibleIndex, "sisabunga")); if (sisa > 0) { e.Visible = DefaultBoolean.True; } else { e.Visible = DefaultBoolean.False; } } } catch (Exception ex) { } } }
protected void gvPenyaluran_CustomButtonInitialize(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonEventArgs e) { var data = gvPenyaluran.GetRowValues(e.VisibleIndex, "iscair") ?? ""; if (data.ToString() == "1") { e.Image.Url = "~/content/images/checklist.png"; } }
protected void gvPerPinjBinLingk_CustomButtonInitialize(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonEventArgs e) { if (e.VisibleIndex >= 0) { try { e.Text = (gvPerPinjBinLingk.GetRowValues(e.VisibleIndex, "requestor_name")).ToString(); } catch (Exception ex) { } } }
protected void gvNeraca_CustomButtonInitialize(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonEventArgs e) { if (e.VisibleIndex >= 0) { object[] x = (object[])gvNeraca.GetRowValues(e.VisibleIndex, "SaldoAwal", "Debet", "Kredit", "SaldoAkhir"); if (Convert.ToDecimal(x[0]) != 0 || Convert.ToDecimal(x[1]) != 0 || Convert.ToDecimal(x[2]) != 0 || Convert.ToDecimal(x[3]) != 0) { e.Visible = DevExpress.Utils.DefaultBoolean.True; } else { e.Visible = DevExpress.Utils.DefaultBoolean.False; } } }
protected void gvMitraBermasala_CustomButtonInitialize(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonEventArgs e) { if (e.VisibleIndex >= 0) { try { if (e.ButtonID == "Kartu") { e.Text = (gvMitraBermasala.GetRowValues(e.VisibleIndex, "requestor_name")).ToString(); } } catch (Exception ex) { } } }
protected void grdInventoryCommand_CustomButtonInitialize(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonEventArgs e) { if (e.VisibleIndex == -1) { return; } if (e.CellType == DevExpress.Web.ASPxGridView.GridViewTableCommandCellType.Data) { InventoryAuditArtifact row = (InventoryAuditArtifact)grdInventoryCommand.GetRow(e.VisibleIndex); if (e.ButtonID == "buttonApprove" && row.ApprovalStatus.ToString().Contains(Constant.APRROVE_YES)) { e.Visible = DefaultBoolean.False; } } }
protected void gvPerwabPanjar_CustomButtonInitialize(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonEventArgs e) { var noref = gvPerwabPanjar.GetRowValues(e.VisibleIndex, "NoRefPerwab"); if (e.VisibleIndex > 0) { if (string.IsNullOrEmpty(noref.ToString())) { e.Visible = DefaultBoolean.True; } else { e.Visible = DefaultBoolean.False; } } }
protected void gvPengembalianKelebihan_CustomButtonInitialize(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonEventArgs e) { if (e.VisibleIndex >= 0) { try { if (e.ButtonID == "Kartu") { e.Text = (gvPengembalianKelebihan.GetRowValues(e.VisibleIndex, "mitra_id")).ToString(); } } catch (Exception ex) { } } }
protected void gvJadwalPembayaran_CustomButtonInitialize(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonEventArgs e) { try { if (e.ButtonID == "Detail") { if (gvJadwalPembayaran.GetRowValues(e.VisibleIndex, "existPiutang").ToString() == "1") { e.Image.Url = "../content/images/checklist.png"; } } } catch (Exception ex) { } }
protected void gvMonitoring_CustomButtonInitialize(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonEventArgs e) { if (e.ButtonID == "button1") { string text = gvMonitoring.GetRowValues(e.VisibleIndex, "I").ToString(); e.Text = text; } if (e.ButtonID == "button2") { string text = gvMonitoring.GetRowValues(e.VisibleIndex, "II").ToString(); e.Text = text; } if (e.ButtonID == "button3") { string text = gvMonitoring.GetRowValues(e.VisibleIndex, "III").ToString(); e.Text = text; } }
protected void gvPembayaran_CustomButtonInitialize(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonEventArgs e) { // }