示例#1
0
        protected void gridMultiPlace_CustomButtonInitialize(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonEventArgs e)
        {
            //已确认的显示加入替换按钮,未确认的显示删除和确认按钮
            if (e.VisibleIndex < 0)
            {
                return;
            }

            string flag = gridMultiPlace.GetRowValues(e.VisibleIndex, "FLAG") as string;

            if (e.ButtonID == "Confirm")
            {
                if (flag == "1")
                {
                    e.Visible = DefaultBoolean.True;
                }
            }
            if (e.ButtonID == "Delete")
            {
                if (flag == "0")
                {
                    e.Visible = DefaultBoolean.True;
                }
            }
        }
示例#2
0
        protected void gvPersetujuan_CustomButtonInitialize(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonEventArgs e)
        {
            try
            {
                var data = gvPersetujuan.GetRowValues(e.VisibleIndex, "isRealisasi").ToString();

                if (data == "True")
                {
                    e.Image.Url = "~/content/images/checklist.png";
                    e.Text      = "Detail";
                }
            }
            catch (Exception ex)
            {
            }
        }
示例#3
0
 protected void gvPenilaianSurvey_CustomButtonInitialize(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonEventArgs e)
 {
     if (e.ButtonID == "Tambah")
     {
         try
         {
             string a    = gvPenilaianSurvey.GetRowValues(e.VisibleIndex, "Keputusan").ToString();
             var    data = gvPenilaianSurvey.GetRowValues(e.VisibleIndex, "Keputusan").ToString();
             if (data.Equals("DITERIMA") || data.Equals("DISETUJUI"))
             {
                 //e.Visible = DevExpress.Utils.DefaultBoolean.False;
                 e.Image.Url = "../content/images/checklist.png";
             }
         }
         catch
         {
         }
     }
 }
示例#4
0
 protected void gridviewCustomField_CustomButtonInitialize(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewCustomButtonEventArgs e)
 {
     if (e.ButtonID.Equals("CustomField_Edit") ||
         e.ButtonID.Equals("CustomField_Delete"))
     {
         var objectId = gridviewCustomField.GetRowValues(e.VisibleIndex, "CustomFieldId");
         if (objectId != null)
         {
             Guid customFieldId = (Guid)gridviewCustomField.GetRowValues(e.VisibleIndex, "CustomFieldId");
             NAS.DAL.CMS.ObjectDocument.CustomField customField =
                 session.GetObjectByKey <NAS.DAL.CMS.ObjectDocument.CustomField>(customFieldId);
             if (customField.CustomFieldType.Equals(CustomFieldTypeConstant.CUSTOM_FIELD_TYPE_READONLY) ||
                 customField.CustomFieldType.Equals(CustomFieldTypeConstant.CUSTOM_FIELD_TYPE_MASTER_READONLY) ||
                 customField.CustomFieldType.Equals(CustomFieldTypeConstant.CUSTOM_FIELD_TYPE_MASTER))
             {
                 e.Visible = DevExpress.Utils.DefaultBoolean.False;
             }
             else
             {
                 e.Visible = DevExpress.Utils.DefaultBoolean.Default;
             }
         }
     }
 }