コード例 #1
0
        protected void gdvdln1_CommandButtonInitialize(object sender, ASPxGridViewCommandButtonEventArgs e)
        {
            if (e.VisibleIndex == -1)
            {
                return;
            }
            //if (!string.IsNullOrWhiteSpace(txtDocEntry.Text))
            //{
            //    if (e.ButtonType == ColumnCommandButtonType.Edit || e.ButtonType == ColumnCommandButtonType.Delete)
            //        e.Enabled = false;
            //}
            object fieldValue = gdvdln1.GetRowValues(e.VisibleIndex, "TreeType");

            if (e.VisibleIndex >= 0)
            {
                if (fieldValue.ToString() == "I")
                {
                    if (e.ButtonType == ColumnCommandButtonType.Delete)
                    {
                        e.Enabled = false;
                    }
                }
            }
            if (!string.IsNullOrWhiteSpace(txtguia.Text))
            {
                if (e.ButtonType == ColumnCommandButtonType.New ||
                    e.ButtonType == ColumnCommandButtonType.Edit ||
                    e.ButtonType == ColumnCommandButtonType.Delete)
                {
                    e.Enabled = false;
                }
            }
        }
        protected void ASPxGridView1_CommandButtonInitialize(object sender, ASPxGridViewCommandButtonEventArgs e)
        {
            try
            {
                if (Session["datosPicking"] == null)
                {
                    return;
                }

                var dsEjecucion = (DataSet)Session["datosPicking"];
                if (e.VisibleIndex >= 0 && (dsEjecucion.Tables[0].Rows).Count != 0)
                {
                    if (e.ButtonType == DevExpress.Web.ColumnCommandButtonType.SelectCheckbox)
                    {
                        if (ASPxGridView1.GetRowValues(e.VisibleIndex, "IS_POSTED_ERP").ToString() == "Si")
                        {
                            e.Visible = false;
                            e.Enabled = false;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText",
                                                    "CallError('Error: " + ex.Message + "');", true);
            }
        }
コード例 #3
0
 protected void gdvLotes_CommandButtonInitialize(object sender, ASPxGridViewCommandButtonEventArgs e)
 {
     if (e.ButtonType == ColumnCommandButtonType.New || e.ButtonType == ColumnCommandButtonType.Delete)
     {
         e.Enabled = false;
     }
 }
コード例 #4
0
        protected void ASPxGridView1_CommandButtonInitialize(object sender, ASPxGridViewCommandButtonEventArgs e)
        {
            ASPxGridView grid         = (ASPxGridView)sender;
            string       run_flag     = grid.GetRowValues(e.VisibleIndex, "RUN_FLAG") as string;
            string       ITEM_flag    = grid.GetRowValues(e.VisibleIndex, "ITEM_FLAG") as string;
            string       third_flag   = grid.GetRowValues(e.VisibleIndex, "THIRD_FLAG") as string;
            string       confirm_flag = grid.GetRowValues(e.VisibleIndex, "CONFIRM_FLAG") as string;

            if (confirm_flag == "N")
            {
                e.Enabled = true;
            }
            else
            {
                e.Enabled = false;
            }
            if (run_flag != "N")//已生产确认的不能修改删除
            {
                e.Enabled = false;
            }
            if (ITEM_flag != "N") //已库房确认的不能修改删除
            {
                e.Enabled = false;
            }
            if (third_flag != "N")//已参与三方要料的不能修改删除
            {
                e.Enabled = false;
            }

            if (e.ButtonType == ColumnCommandButtonType.SelectCheckbox)
            {
                e.Enabled = true;
            }
        }
コード例 #5
0
        protected void grdDVT_CommandButtonInitialize(object sender, ASPxGridViewCommandButtonEventArgs e)
        {
            return;

            SYS_Session session = (SYS_Session)Session["SYS_Session"];

            var  lst = db.DN_Select_ThucTe(int.Parse(session.User.ma_dviqly), int.Parse(cmbThang.Value + ""), int.Parse("" + cmbNam.Value)).ToList().Where(x => x.Ngay == e.VisibleIndex + 1);
            bool kt  = false;

            foreach (var a in lst)
            {
                if (a.ISLooK == 1)
                {
                    kt = true;
                }
                else
                {
                    kt = false;
                }
                if (e.ButtonType == DevExpress.Web.ColumnCommandButtonType.Edit)
                {
                    e.Visible = kt;
                }

                // disable the selction checkbox
                if (e.ButtonType == DevExpress.Web.ColumnCommandButtonType.SelectCheckbox)
                {
                    e.Enabled = kt;
                }
            }
        }
コード例 #6
0
 protected void dGridItemTarefa_CommandButtonInitialize(object sender, ASPxGridViewCommandButtonEventArgs e)
 {
     if (!(((ASPxGridView)sender).GetRowValues(e.VisibleIndex, "LoginResponsavel").ToString() == SPContext.Current.Web.CurrentUser.LoginName || spsWrapper.Utilidades.Administrador()))
     {
         e.Visible = false;
     }
 }
コード例 #7
0
 protected void GridView_CommandButtonInitialize(object sender, ASPxGridViewCommandButtonEventArgs e)
 {
     if (e.ButtonType == ColumnCommandButtonType.Update && bool.Parse(HttpContext.Current.Session["isDetailRow_Com"].ToString()))
     {
         e.Enabled = false;
     }
 }
コード例 #8
0
        protected void gdvrin1_CommandButtonInitialize(object sender, ASPxGridViewCommandButtonEventArgs e)
        {
            //if (e.VisibleIndex == -1) return;
            //if (!string.IsNullOrWhiteSpace(txtDocEntry.Text))
            //{
            //    if (e.ButtonType == ColumnCommandButtonType.Edit || e.ButtonType == ColumnCommandButtonType.Delete)
            //        e.Enabled = false;
            //}
            if (e.VisibleIndex == -1)
            {
                return;
            }
            if (!string.IsNullOrWhiteSpace(txtDocEntry.Text))
            {
                if (e.ButtonType == ColumnCommandButtonType.New ||
                    e.ButtonType == ColumnCommandButtonType.Edit ||
                    e.ButtonType == ColumnCommandButtonType.Delete)
                {
                    e.Enabled = true;
                }
            }
            if (txtDocStatus.Text == "Cerrado")
            {
                if (e.ButtonType == ColumnCommandButtonType.New ||
                    e.ButtonType == ColumnCommandButtonType.Edit ||
                    e.ButtonType == ColumnCommandButtonType.Delete)
                {
                    e.Enabled = false;
                }
            }

            gdvrin1.JSProperties["cpSubTotal"] = ((List <BEDocumentLine>)Session["rin1"]).Sum(item => Math.Round(item.LineTotal, 2));
        }
コード例 #9
0
    protected void GridListagem_CommandButtonInitialize(object sender, ASPxGridViewCommandButtonEventArgs e)
    {
        //Botão Edit
        if (e.ButtonType == DevExpress.Web.ASPxGridView.ColumnCommandButtonType.Edit)
        {
            e.Visible = lAltera;
        }

        //Botão Novo
        if (e.ButtonType == DevExpress.Web.ASPxGridView.ColumnCommandButtonType.New)
        {
            e.Visible = lInsere;
        }

        //Botão Altera
        if (e.ButtonType == DevExpress.Web.ASPxGridView.ColumnCommandButtonType.Update)
        {
            e.Visible = lAltera;
        }

        //Botão Exclui
        if (e.ButtonType == DevExpress.Web.ASPxGridView.ColumnCommandButtonType.Delete)
        {
            e.Visible = lExclui;
        }
    }
コード例 #10
0
 protected void gdvdln1_CommandButtonInitialize(object sender, ASPxGridViewCommandButtonEventArgs e)
 {
     if (e.VisibleIndex == -1)
     {
         return;
     }
     //if (!string.IsNullOrWhiteSpace(txtDocEntry.Text))
     //{
     //    if (e.ButtonType == ColumnCommandButtonType.Edit || e.ButtonType == ColumnCommandButtonType.Delete)
     //        e.Enabled = false;
     //}
     if (!string.IsNullOrWhiteSpace(txtDocEntry.Text))
     {
         if (e.ButtonType == ColumnCommandButtonType.New ||
             e.ButtonType == ColumnCommandButtonType.Edit ||
             e.ButtonType == ColumnCommandButtonType.Delete)
         {
             e.Enabled = true;
         }
     }
     if (txtDocStatus.Text == "Cerrado")
     {
         if (e.ButtonType == ColumnCommandButtonType.New ||
             e.ButtonType == ColumnCommandButtonType.Edit ||
             e.ButtonType == ColumnCommandButtonType.Delete)
         {
             e.Enabled = false;
         }
     }
 }
コード例 #11
0
        protected void dgProgram_CommandButtonInitialize(object sender, ASPxGridViewCommandButtonEventArgs e)
        {
            string perms = (new PermissionService().GetPermissionsActivity(new SessionManager().GetUserId(this.Session), "smCourseSubjSchedule"));

            switch (e.ButtonType)
            {
            case ColumnCommandButtonType.Edit:
                if (perms.Contains("EDIT"))
                {
                    e.Enabled = true;
                }
                else
                {
                    e.Enabled = false;
                }
                break;

            case ColumnCommandButtonType.Delete:
                if (perms.Contains("DELETE"))
                {
                    e.Enabled = true;
                }
                else
                {
                    e.Enabled = false;
                }
                break;
                //case ColumnCommandButtonType.Select:
                //    if (perms.Contains("VIEW")) { e.Enabled = true; } else { e.Enabled = false; }
                //    break;
            }
        }
コード例 #12
0
        protected void ASPxGridView1_OnCommandButtonInitialize(object sender, ASPxGridViewCommandButtonEventArgs e)
        {
            try
            {
                if (Session["DSsku"] == null)
                {
                    return;
                }
                if (e.VisibleIndex < 0 || ((DataSet)Session["DSsku"]).Tables[0].Select("CODE_SKU is not null").Length == 0)
                {
                    return;
                }
                if (e.ButtonType != DevExpress.Web.ColumnCommandButtonType.SelectCheckbox)
                {
                    return;
                }
                if (ASPxGridView1.GetRowValues(e.VisibleIndex, "HANDLE_SERIAL_NUMBER").ToString() != "1")
                {
                    return;
                }

                e.Visible = false;
                e.Enabled = false;
            }
            catch (Exception ex)
            {
                EstablecerError(ex.Message, ASPxGridView1);
            }
        }
 protected void Grid_CommandButtonInitialize(object sender, ASPxGridViewCommandButtonEventArgs e)
 {
     if (e.ButtonType == ColumnCommandButtonType.SelectCheckbox)
     {
         e.Enabled = !chkDisabled.Checked;
     }
 }
コード例 #14
0
        void gvBlPenilaian_CommandButtonInitialize(object sender, ASPxGridViewCommandButtonEventArgs e)
        {
            try
            {
                if (e.ButtonType == ColumnCommandButtonType.Edit)
                {
                    var userBranchCode = ((wcf_auth.GeneralUserProfile)SessionCheck.Check(Response, Session["userprofile"])).mAuthObjectValueList.FirstOrDefault(t => t.mAuthObjectName == "REGION").Value1;

                    var branch     = gvBlPenilaian.GetRowValues(e.VisibleIndex, "branch_code").ToString();
                    var isApproved = gvBlPenilaian.GetRowValues(e.VisibleIndex, "approval_result").ToString();

                    if (userBranchCode == branch)
                    {
                        e.Visible = true;
                    }
                    else
                    {
                        e.Visible = false;
                    }

                    if (isApproved == "1")
                    {
                        e.Visible = false;
                    }
                    else
                    {
                        e.Visible = true;
                    }
                }
            }
            catch (Exception ex)
            {
            }
        }
コード例 #15
0
 protected void Grid_CommandButtonInitialize(object sender, ASPxGridViewCommandButtonEventArgs e)
 {
     if (e.ButtonType == ColumnCommandButtonType.Update || e.ButtonType == ColumnCommandButtonType.Cancel)
     {
         e.Visible = false;
     }
 }
コード例 #16
0
 protected void ASPxGridView2_CommandButtonInitialize(object sender, ASPxGridViewCommandButtonEventArgs e)
 {
     //bool visible = false;
     //bool.TryParse(ASPxGridView2.GetRowValues(e.VisibleIndex, "isStored").ToString(), out visible);
     //if (e.ButtonType == ColumnCommandButtonType.Delete)
     //    e.Visible = visible;
 }
コード例 #17
0
 protected void gridviewGeneralJournal_CommandButtonInitialize(object sender, ASPxGridViewCommandButtonEventArgs e)
 {
     if (GUIContext.State is VoucherLockedBookingdEntries && GUIContext.State != null)
     {
         e.Enabled = false;
     }
 }
コード例 #18
0
 public static void gdvDelete_CommandButtonInitialize(object sender, ASPxGridViewCommandButtonEventArgs e)
 {
     if (e.ButtonType == ColumnCommandButtonType.Delete)
     {
         e.Image.Url = ResImageURL.Delete;
         e.Text      = ResGeneral.Delete;
     }
 }
コード例 #19
0
ファイル: uBuyingMaterial.ascx.cs プロジェクト: ewin66/dev
 protected void grdMaterialOnCategory_CommandButtonInitialize(object sender, ASPxGridViewCommandButtonEventArgs e)
 {
     if (e.VisibleIndex == -1 && ButtonEditMaterial.Visible &&
         (e.ButtonType == DevExpress.Web.ASPxGridView.ColumnCommandButtonType.New ||
          e.ButtonType == DevExpress.Web.ASPxGridView.ColumnCommandButtonType.Edit ||
          e.ButtonType == DevExpress.Web.ASPxGridView.ColumnCommandButtonType.Delete))
     {
         e.Visible = false;
     }
 }
コード例 #20
0
        protected void grdvContratos_CommandButtonInitialize(object sender, ASPxGridViewCommandButtonEventArgs e)
        {
            //if (e.VisibleIndex == -1) return;
            //var obec = ((BEParameters)Session["InitPar"]);

            //if (e.ButtonType == ColumnCommandButtonType.Edit)
            //{
            //    e.Enabled = true;
            //}
        }
コード例 #21
0
ファイル: Kiemke.aspx.cs プロジェクト: trantrung2608/ilinkbay
 protected void AspxGV1_CommandButtonInitialize(object sender, ASPxGridViewCommandButtonEventArgs e)
 {
     bool visible = false;
        // if (visible == true)
       //  {
         Boolean.TryParse(AspxGV1.GetRowValues(e.VisibleIndex, "isApproved").ToString(), out visible);
         if (e.ButtonType == ColumnCommandButtonType.Delete || e.ButtonType == ColumnCommandButtonType.Edit)
             e.Visible = !visible;
        // }
 }
コード例 #22
0
ファイル: studentnew.aspx.cs プロジェクト: comsoftgh/mysmis
        protected void dgEducation_CommandButtonInitialize(object sender, ASPxGridViewCommandButtonEventArgs e)
        {
            if (e.VisibleIndex == -1)
            {
                return;
            }

            //if (e.ButtonType == DevExpress.Web.ColumnCommandButtonType.Select)
            //{ if (dgEducation.GetRowValues(e.VisibleIndex, "Documment") == "No Document") { e.Enabled = false; } }//e.Visible = DocumentButtonVisibleCriteria((ASPxGridView)sender, e.VisibleIndex); }
        }
コード例 #23
0
 protected void grid_CommandButtonInitialize(object sender, ASPxGridViewCommandButtonEventArgs e)
 {
     if (ddlClassName.SelectedIndex == 0)
     {
         e.Visible = false;
     }
     else
     {
         e.Visible = true;
     }
 }
コード例 #24
0
 protected void gvPenerimaanProposal_CommandButtonInitialize(object sender, ASPxGridViewCommandButtonEventArgs e)
 {
     if (e.ButtonType == ColumnCommandButtonType.Edit)
     {
         string status = gvPenerimaanProposal.GetRowValues(e.VisibleIndex, "status").ToString();
         if (status != "DALAM PROSES" && status != "DITERIMA")
         {
             e.Visible = false;
         }
     }
 }
コード例 #25
0
    protected void grid_CommandButtonInitialize(object sender, ASPxGridViewCommandButtonEventArgs e)
    {
        if (e.ButtonType != ColumnCommandButtonType.SelectCheckbox)
        {
            return;
        }

        bool rowEnabled = getRowEnabledStatus(e.VisibleIndex);

        e.Enabled = rowEnabled;
    }
コード例 #26
0
 protected void gvPersetujuan_CommandButtonInitialize(object sender, ASPxGridViewCommandButtonEventArgs e)
 {
     if (e.ButtonType == ColumnCommandButtonType.Edit)
     {
         string status = gvPersetujuan.GetRowValues(e.VisibleIndex, "status").ToString();
         if (status == null || status == "")
         {
             e.Image.Url = "../content/images/new.png";
         }
     }
 }
コード例 #27
0
        protected void grdProductSupplier_CommandButtonInitialize(object sender, ASPxGridViewCommandButtonEventArgs e)
        {
            //if (e.VisibleIndex == -1 && ButtonEditItem.Visible &&
            //    (e.ButtonType == DevExpress.Web.ASPxGridView.ColumnCommandButtonType.New ||
            //    e.ButtonType == DevExpress.Web.ASPxGridView.ColumnCommandButtonType.Edit ||
            //    e.ButtonType == DevExpress.Web.ASPxGridView.ColumnCommandButtonType.Delete))
            //    e.Visible = false;

            //if (e.VisibleIndex == -1 && ButtonSaveItem.Visible &&
            //    e.ButtonType == DevExpress.Web.ASPxGridView.ColumnCommandButtonType.New)
            //    e.Visible = true;
        }
コード例 #28
0
 protected void Grid_CurrencyType_CommandButtonInitialize(object sender, ASPxGridViewCommandButtonEventArgs e)
 {
     if (e.ButtonType == ColumnCommandButtonType.Edit ||
         e.ButtonType == ColumnCommandButtonType.Delete)
     {
         bool isInternal = (bool)Grid_CurrencyType.GetRowValues(e.VisibleIndex, "IsInternal");
         if (isInternal)
         {
             e.Visible = false;
         }
     }
 }
コード例 #29
0
    protected void dxgridPeople_CommandButtonInitialize(object sender, ASPxGridViewCommandButtonEventArgs e)
    {
        //int idx = e.VisibleIndex;
        //if (e.VisibleIndex == -1) return;

        //Color forecolor = e.Styles.Style.ForeColor;
        //int colorsum = forecolor.R + forecolor.G + forecolor.B;
        //if (colorsum == 0)
        //{
        //	e.Styles.Style.ForeColor = Color.SlateGray;
        //}
    }
コード例 #30
0
        protected void gdvAsiento_CommandButtonInitialize(object sender, ASPxGridViewCommandButtonEventArgs e)
        {
            if (!string.IsNullOrWhiteSpace(txtTransId.Text))
            {
                if (e.ButtonType == ColumnCommandButtonType.New ||

                    e.ButtonType == ColumnCommandButtonType.Delete)
                {
                    e.Enabled = false;
                }
            }
        }
コード例 #31
0
        protected void grdvPlanes_CommandButtonInitialize(object sender, ASPxGridViewCommandButtonEventArgs e)
        {
            if (e.VisibleIndex == -1)
            {
                return;
            }
            var obec = ((BEParameters)Session["InitPar"]);

            if (e.ButtonType == ColumnCommandButtonType.Edit)
            {
                e.Enabled = true;
            }
        }
コード例 #32
0
 protected void gdvLotes_CommandButtonInitialize(object sender, ASPxGridViewCommandButtonEventArgs e)
 {
     //object fieldValue = gdvdln1.GetRowValues(e.VisibleIndex, "ItemCode");
     //if (e.VisibleIndex >= 0 && !string.IsNullOrWhiteSpace(e.VisibleIndex.ToString()))
     //{
     //    if (!String.IsNullOrWhiteSpace(fieldValue.ToString()))
     //    {
     if (e.ButtonType == ColumnCommandButtonType.New || e.ButtonType == ColumnCommandButtonType.Delete)
     {
         e.Enabled = false;
     }
     //    }
     //}
 }
コード例 #33
0
        protected void gvTaxTypes_CommandButtonInitialize(object sender, ASPxGridViewCommandButtonEventArgs e)
        {
            if (e.VisibleIndex == -1) return;

            switch (e.ButtonType)
            {
                case ColumnCommandButtonType.New:
                    e.Visible = SessionHandler.LoggedUser.IsUserAuthorised(Enums.Rights.GeneralManagement_TaxType_Add);
                    break;
                case ColumnCommandButtonType.Edit:
                    e.Visible = SessionHandler.LoggedUser.IsUserAuthorised(Enums.Rights.GeneralManagement_TaxType_Edit);
                    break;
                case ColumnCommandButtonType.Delete:
                    e.Visible = SessionHandler.LoggedUser.IsUserAuthorised(Enums.Rights.GeneralManagement_TaxType_Delete);
                    break;
            }
        }
コード例 #34
0
        protected void ASPxGridView1_CommandButtonInitialize(object sender, ASPxGridViewCommandButtonEventArgs e)
        {
            if (e.VisibleIndex == -1) return;

            if (e.ButtonType == ColumnCommandButtonType.Delete) {
                string dono = "";
                string sql = "SELECT RESPONSAVEL FROM WEBPROCESSO WHERE NUMERO = " + Request.QueryString["DID"].ToString() + " OR ID = " + Request.QueryString["DID"].ToString();
                AcessoDados.AcessoDados.abrirConn();
                FirebirdSql.Data.FirebirdClient.FbDataReader DR = AcessoDados.AcessoDados.DataReader(sql);
                while (DR.Read()) {
                    dono = DR["RESPONSAVEL"].ToString();
                }
                DR.Close();
                AcessoDados.AcessoDados.fecharConn();
                if (dono == Label1.Text.Trim())
                {
                    e.Visible = true;
                }
                else
                {
                    e.Visible = false;
                }
            }
        }
コード例 #35
0
        /// <summary>
        /// activa o desactiva los botones de eliminar y editar dependiento si la matricula es actual o anterior
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void ASPxGridViewCursoMatriculado_CommandButtonInitialize(object sender, ASPxGridViewCommandButtonEventArgs e)
        {
            try
            {
                /*Class.Matricula.Matricula dato = this.matriculaBo.consultarId(new Class.Matricula.Matricula(Int32.Parse(Session["idMatricula"].ToString())));

                if (dato != null)
                {

                    if (dato.periodo.idPeriodo.Equals(cmbPeriodo.Value.ToString()))
                    {
                        if (e.ButtonType == DevExpress.Web.ASPxGridView.ColumnCommandButtonType.Edit)
                        {
                            e.Visible = true;
                        }
                    }
                    else
                    {
                        if (e.ButtonType == DevExpress.Web.ASPxGridView.ColumnCommandButtonType.Edit)
                        {
                            e.Visible = false;
                        }
                    }

                }*/
            }
            catch (Exception ex)
            {
                this.lblMensaje.Text = Utilidades.validarExepcionSQL(ex.Message);
                this.lblMensaje.CssClass = "errorMessage";
                Session["errorMessage"] = ex.Message;
            }

        }
コード例 #36
0
 protected void viewODS_SYSTEM_ListView_CommandButtonInitialize(object sender, ASPxGridViewCommandButtonEventArgs e)
 {
     if (e.ButtonType == DevExpress.Web.ASPxGridView.ColumnCommandButtonType.Edit)
         {
             e.Visible = false;
         }
 }
コード例 #37
0
 protected new GridViewCommandColumnButtonControl CreateCommandButtonControl(GridViewCommandColumn column, ColumnCommandButtonType commandItemType, GridViewCommandButtonType buttonType, string text, ImageProperties image, int visibleIndex, bool postponeClick)
 {
     if (!CanCreateCommandButton(commandItemType)) return null;
     
     var isEditingRow = DataProxy.IsNewRowEditing && visibleIndex == -2147483647 || visibleIndex >= 0 && DataProxy.IsRowEditing(visibleIndex);
     
     var eventArgs = new ASPxGridViewCommandButtonEventArgs(column, commandItemType, text, image, visibleIndex, isEditingRow, buttonType);
     
     Grid.RaiseCommandButtonInitialize_Internal(eventArgs);
     
     return eventArgs.Visible ? new GridViewCommandColumnButtonControl(eventArgs, Grid, GetCommandButtonClickHandlerArgs(commandItemType), postponeClick) : null;
 }
コード例 #38
0
 internal void RaiseCommandButtonInitialize_Internal(ASPxGridViewCommandButtonEventArgs e)
 {
     RaiseCommandButtonInitialize(e);
 }
コード例 #39
0
ファイル: Grid.aspx.cs プロジェクト: williams55/clinic-doctor
    /// <summary>
    /// Tat mo nut edit
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void gridRoster_CommandButtonInitialize(object sender, ASPxGridViewCommandButtonEventArgs e)
    {
        try
        {
            if (e.VisibleIndex == -1) return;

            // Neu la button edit thi kiem tra dieu kien de hien thi
            if (e.ButtonType == ColumnCommandButtonType.Edit || e.ButtonType == ColumnCommandButtonType.SelectCheckbox)
            {
                var roster = gridRoster.GetRow(e.VisibleIndex) as Roster;
                e.Visible = roster != null && roster.StartTime > DateTime.Now;
            }
        }
        catch (Exception ex)
        {
            LoggerController.WriteLog(System.Runtime.InteropServices.Marshal.GetExceptionCode(), ex, Network.GetIpClient());
        }
    }
コード例 #40
0
 protected void ASPxGridView1_CommandButtonInitialize(object sender, ASPxGridViewCommandButtonEventArgs e)
 {
 }