Example #1
0
        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)
                {
                }
            }
        }
Example #2
0
        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";
            }
        }
Example #3
0
 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)
         {
         }
     }
 }
Example #4
0
        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;
                }
            }
        }
Example #5
0
 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)
         {
         }
     }
 }
Example #6
0
        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;
                }
            }
        }
Example #7
0
        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;
                }
            }
        }
Example #8
0
 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)
         {
         }
     }
 }
Example #9
0
 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)
     {
     }
 }
Example #10
0
        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;
            }
        }
Example #11
0
 protected void gvPembayaran_CustomButtonInitialize(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonEventArgs e)
 {
     //
 }