Пример #1
0
        /// <summary>
        /// 行绑定事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void gridStudyLog_OnPreRowDataBound(object sender, FineUI.GridPreRowEventArgs e)
        {
            LinkButtonField lbf  = gridStudyLog.FindColumn("StudyDelete") as LinkButtonField;
            LinkButtonField lbf1 = gridStudyLog.FindColumn("StudyUpdate") as LinkButtonField;
            DataRowView     row  = e.DataItem as DataRowView;

            string logStatus = row[7].ToString();

            //   string status = row["BsepeakState"].ToString();

            if (logStatus != "通过审核" && logStatus != "取消审核")
            {
                lbf.Enabled       = true;
                lbf.ToolTip       = "取消预约";
                lbf.Icon          = FineUI.Icon.Delete;
                lbf.OnClientClick = WindowCancel.GetShowReference(string.Format("BeskpeakCancel.aspx?id={0}", row[0].ToString()), "取消申请");

                lbf1.Enabled       = true;
                lbf1.ToolTip       = "修改申请";
                lbf1.Icon          = FineUI.Icon.Pencil;
                lbf1.OnClientClick = WindowEdit.GetShowReference(string.Format("BeskpeakStudyRoom.aspx?id={0}&flag=edit", row[0].ToString()), "修改申请");
            }
            else
            {
                lbf.Enabled = false;
                lbf.ToolTip = "不可操作";
                lbf.Icon    = FineUI.Icon.None;

                lbf1.Enabled       = true;
                lbf1.ToolTip       = "查看申请";
                lbf1.Icon          = FineUI.Icon.Zoom;
                lbf1.OnClientClick = WindowEdit.GetShowReference(string.Format("../StudyRoomManage/StudyBookingLogCheck.aspx?id={0}", row[0].ToString()), "查看申请");
            }
        }
        protected void Grid1_PreDataBound(object sender, EventArgs e)
        {
            // 设置LinkButtonField的点击客户端事件
            LinkButtonField deleteField = Grid1.FindColumn("Delete") as LinkButtonField;

            deleteField.OnClientClick = GetDeleteScript(Grid1);
        }
        protected void GridDpt_PreRowDataBound(object sender, GridPreRowEventArgs e)
        {
            // 如果绑定到 DataTable,那么这里的 DataItem 就是 DataRowView
            DataRowView row = e.DataItem as DataRowView;

            LinkButtonField checkField  = GridDpt.FindColumn("checkField") as LinkButtonField;
            LinkButtonField editField   = GridDpt.FindColumn("editField") as LinkButtonField;
            LinkButtonField deleteField = GridDpt.FindColumn("deleteField") as LinkButtonField;

            if (row["isCheck"].ToString() == "已审核")
            {
                deleteField.Enabled = false;
                checkField.Text     = "取消";
                checkField.Icon     = Icon.Cancel;
                editField.Text      = "查看";
                editField.Icon      = Icon.Lock;
            }
            else
            {
                deleteField.Enabled = true;
                checkField.Text     = "通过";
                checkField.Icon     = Icon.Accept;
                editField.Text      = "编辑";
                editField.Icon      = Icon.Pencil;
            }
            if (!haveRight(GetIdentityUser().userId, "三重一大审批"))
            {
                checkField.Enabled = false;
            }
            else
            {
                checkField.Enabled = true;
            }
        }
Пример #4
0
        protected void gridRoomList_OnPreRowDataBound(object sender, FineUI.GridPreRowEventArgs e)
        {
            DateTime        nowDate = SeatManage.Bll.ServiceDateTime.Now;
            DataRowView     row     = e.DataItem as DataRowView;
            LinkButtonField lbf     = gridRoomList.FindColumn("appTable") as LinkButtonField;
            string          roomNum = row[0].ToString().Trim();

            bool IsUseStudyRoom = bool.Parse(row[7].ToString());

            if (IsUseStudyRoom)
            {
                lbf.IconUrl        = "/Images/Hand.png";
                lbf.EnablePostBack = false;
                lbf.Enabled        = true;
                lbf.OnClientClick  = WindowEdit.GetShowReference(string.Format("BeskpeakStudyRoom.aspx?roomNo={0}", roomNum), "申请表");
            }
            else
            {
                lbf.IconUrl        = "/Images/HandDisable.png";
                lbf.ToolTip        = "研习间暂未开放";
                lbf.EnablePostBack = false;
                lbf.Enabled        = false;
            }
            gridRoomList.AutoHeight = true;

            divremark.InnerHtml = row[2].ToString();
            //divRemaFacilitiesRenmarkrk.InnerHtml = row[3].ToString();
            //divPrecautions.InnerHtml = row[4].ToString();
            //divApplicationInfo.InnerHtml = row[5].ToString();
            //remark = row[4].ToString().Replace("\r\n", "<br/>");
        }
        protected void gridRoomList_OnPreRowDataBound(object sender, FineUI.GridPreRowEventArgs e)
        {
            DateTime        nowDate = SeatManage.Bll.ServiceDateTime.Now;
            DataRowView     row     = e.DataItem as DataRowView;
            string          roomSet = row[5].ToString();
            LinkButtonField lbf     = gridRoomList.FindColumn("seatUsedView") as LinkButtonField;

            if (string.IsNullOrEmpty(roomSet))
            {
                lbf.Icon           = Icon.BulletCross;
                lbf.ToolTip        = "该阅览室没有配置";
                lbf.EnablePostBack = false;
                lbf.Enabled        = false;
                return;
            }

            try
            {
                SeatManage.ClassModel.ReadingRoomSetting set = new SeatManage.ClassModel.ReadingRoomSetting(roomSet);
                if (Code.NowReadingRoomState.ReadingRoomOpenState(set.RoomOpenSet, nowDate) == SeatManage.EnumType.ReadingRoomStatus.Close)
                {
                    lbf.Icon           = Icon.BulletCross;
                    lbf.ToolTip        = "阅览室没有开放";
                    lbf.EnablePostBack = false;
                    lbf.Enabled        = false;
                    return;
                }
                if (!set.SeatBespeak.Used || !set.SeatBespeak.NowDayBespeak)
                {
                    lbf.Icon           = Icon.BulletCross;
                    lbf.ToolTip        = "阅览室没有开放预约";
                    lbf.EnablePostBack = false;
                    lbf.Enabled        = false;
                    return;
                }

                int canBespeakAmount = int.Parse(row[4].ToString());
                if (canBespeakAmount <= 0)
                {
                    lbf.Icon    = Icon.BulletCross;
                    lbf.ToolTip = "没有空余座位";
                    lbf.Enabled = false;
                }
                else
                {
                    lbf.Icon    = Icon.Zoom;
                    lbf.ToolTip = "预约座位";
                    lbf.Enabled = true;
                }
            }
            catch (Exception ex)
            {
                FineUI.Alert.Show(string.Format("阅览室设置不正确:{0}", ex.Message));
            }

            string roomNum = row[0].ToString().Trim();

            lbf.EnablePostBack = false;
            lbf.OnClientClick  = WindowEdit.GetShowReference(string.Format("BespeakNowDaySeatLayout.aspx?roomId={0}", roomNum), "座位视图");
        }
Пример #6
0
        //行预绑定事件
        protected void GridRole_PreRowDataBound(object sender, FineUI.GridPreRowEventArgs e)
        {
            DataRowView     row          = e.DataItem as DataRowView;
            string          roleId       = row[0].ToString();
            string          roleName     = Server.UrlEncode(row[1].ToString());
            LinkButtonField lnkbtnField  = GridRole.FindColumn("lnkbtnEdit") as LinkButtonField;
            LinkButtonField lnkbtnColDel = GridRole.FindColumn("ColDel") as LinkButtonField;

            lnkbtnField.OnClientClick = WindowEdit.GetShowReference("RoleEdit.aspx?flag=edit&roleId=" + roleId + "&roleName=" + roleName, "修改角色");
            FineUI.CheckBoxField cbxField = GridRole.FindColumn("CheckBoxField1") as FineUI.CheckBoxField;
            if (row[2].ToString() == "True")
            {
                lnkbtnField.Enabled  = false;
                lnkbtnField.Icon     = Icon.Lock;
                lnkbtnField.ToolTip  = "不可编辑";
                lnkbtnColDel.Enabled = false;
                lnkbtnColDel.Icon    = Icon.Lock;
                lnkbtnColDel.ToolTip = "不可删除";
            }
            else
            {
                lnkbtnField.Enabled  = true;
                lnkbtnField.Icon     = Icon.Pencil;
                lnkbtnField.ToolTip  = "编辑";
                lnkbtnColDel.Enabled = true;
                lnkbtnColDel.Icon    = Icon.Delete;
                lnkbtnColDel.ToolTip = "删除";
            }
        }
        /// <summary>
        /// 这个事件会在渲染每一行前调用,因此改变了列的属性,那么渲染每一行时此列的属性都发生了变化
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Grid1_PreRowDataBound(object sender, ExtAspNet.GridPreRowEventArgs e)
        {
            LinkButtonField lbfAction1  = Grid1.FindColumn("lbfAction1") as LinkButtonField;
            LinkButtonField lbfAction2  = Grid1.FindColumn("lbfAction2") as LinkButtonField;
            CheckBoxField   cbxAtSchool = Grid1.FindColumn("cbxAtSchool") as CheckBoxField;

            if (e.RowIndex < 5)
            {
                cbxAtSchool.Enabled = true;
                lbfAction1.Enabled  = true;
                lbfAction2.Enabled  = true;
            }
            else
            {
                cbxAtSchool.Enabled = false;
                lbfAction1.Enabled  = false;
                lbfAction2.Enabled  = false;
            }

            // 如果绑定到 DataTable,那么这里的 DataItem 就是 DataRowView
            HyperLinkField linkField = Grid1.Columns[4] as HyperLinkField;
            DataRowView    row       = e.DataItem as DataRowView;

            if (row != null)
            {
                linkField.DataTextFormatString = "{0} (" + row["EntranceYear"].ToString() + ")";
            }
        }
Пример #8
0
        protected void Grid1_PreRowDataBound(object sender, GridPreRowEventArgs e)
        {
            WindowField     lbfModify = Grid1.FindColumn("lbfModify") as WindowField;
            LinkButtonField lbfDelete = Grid1.FindColumn("lbfDelete") as LinkButtonField;

            //// 如果绑定到 DataTable,那么这里的 DataItem 就是 DataRowView
            DataRowView row = e.DataItem as DataRowView;

            if (row != null)
            {
                switch (TStar.Utility.Common.ConvertHelper.EnumParse <TStar.Web.Globals.SystemSetting.Status>(row["Ztdm"].ToString()))
                {
                case TG.SystemSetting.Status.Draft:
                    lbfModify.Icon = FineUI.Icon.Pencil;
                    lbfDelete.Icon = FineUI.Icon.BulletCross;
                    break;

                default:
                    lbfModify.Icon = lbfDelete.Icon = FineUI.Icon.None;
                    break;
                }
                switch (lbfDelete.Icon)
                {
                case FineUI.Icon.Decline:
                    lbfDelete.CommandName = "Delete";
                    lbfDelete.ToolTip     = "删除";
                    lbfDelete.ConfirmText = "确认删除?";
                    break;
                }
            }
        }
Пример #9
0
        // 绑定界面“编辑”“删除”状态
        protected void gridUser_PreRowDataBound(object sender, GridPreRowEventArgs e)
        {
            //如果是超级管理员,编辑为灰色
            LinkButtonField lbfEdit = gridUser.FindColumn("lbf_Edit") as LinkButtonField;
            //如果是超级管理员(最高级),删除为灰色
            LinkButtonField lbfDelete = gridUser.FindColumn("lbf_Delete") as LinkButtonField;

            object[] a = (e.DataItem as DataRowView).Row.ItemArray;
            string   b = a[11].ToString();

            if (b == "2")
            {
                lbfEdit.Enabled   = false;
                lbfDelete.Enabled = false;
            }
            else
            {
                lbfEdit.Enabled   = true;
                lbfDelete.Enabled = true;
                //if (b == "1")
                //{
                //    lbfEdit.Enabled = false;
                //    lbfDelete.Enabled = true;
                //}
                //else
                //{
                //    lbfEdit.Enabled = true;
                //    lbfDelete.Enabled = true;
                //}
            }
        }
        /// <summary>
        /// 行绑定事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void BlacklistGrid_OnPreRowDataBound(object sender, FineUI.GridPreRowEventArgs e)
        {
            LinkButtonField lbfshow = BlacklistGrid.FindColumn("BlacklistInfo") as LinkButtonField;
            DataRowView     row     = e.DataItem as DataRowView;
            string          status  = row[5].ToString();

            lbfshow.OnClientClick = WindowEdit.GetShowReference("../LogManage/BlacklistInfo.aspx?id=" + row[0].ToString() + "", "黑名单详情");
        }
Пример #11
0
        protected void Grid1_PreRowDataBound(object sender, GridPreRowEventArgs e)
        {
            ContractOrderInfo row         = e.DataItem as ContractOrderInfo;
            int             isTemp        = Convert.ToInt32(row.OrderState);
            LinkButtonField lbtnEditField = Grid1.FindColumn("lbtnEditField") as LinkButtonField;

            lbtnEditField.Enabled = isTemp == 1;
        }
Пример #12
0
        /// <summary>
        /// 行绑定事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void gridReaderList_OnPreRowDataBound(object sender, GridPreRowEventArgs e)
        {
            LinkButtonField lbf      = gridReaderList.FindColumn("seatReaderList") as LinkButtonField;
            DataRowView     row      = e.DataItem as DataRowView;
            string          seatNum  = row[3].ToString();
            string          shortNum = row[4].ToString();

            lbf.OnClientClick = WindowEdit.GetShowReference(string.Format("SeatHandle.aspx?seatNo={0}&seatShortNo={1}&used={2}", seatNum, shortNum, "1"), "座位视图");
        }
Пример #13
0
        protected void Grid1_RowCommand(object sender, FineUI.GridCommandEventArgs e)
        {
            LinkButtonField deleteField = Grid1.FindColumn("Delete") as LinkButtonField;
            DataTable       curDt       = getDataTable();

            curDt.Rows.RemoveAt(e.RowIndex);
            Grid1.DataSource = curDt;
            Grid1.DataBind();
        }
Пример #14
0
        protected void Grid1_PreRowDataBound(object sender, GridPreRowEventArgs e)
        {
            Infobasis.Data.DataEntity.HouseInfo houseInfo = e.DataItem as Infobasis.Data.DataEntity.HouseInfo;
            LinkButtonField deleteField = Grid1.FindColumn("deleteField") as LinkButtonField;

            // ForbidDelete

            deleteField.Enabled = true;
            deleteField.ToolTip = "删除";
        }
Пример #15
0
        protected void Grid1_PreRowDataBound(object sender, GridPreRowEventArgs e)
        {
            GoodsOrder      row           = e.DataItem as GoodsOrder;
            int             isTemp        = Convert.ToInt32(row.IsTemp);
            LinkButtonField lbtnEditField = Grid1.FindColumn("lbtnEditField") as LinkButtonField;
            LinkButtonField deleteField   = Grid1.FindColumn("deleteField") as LinkButtonField;

            lbtnEditField.Enabled = isTemp > 0;
            deleteField.Enabled   = isTemp > 0;
        }
Пример #16
0
        protected void GridDpt_PreRowDataBound(object sender, GridPreRowEventArgs e)
        {
            DataRowView row = e.DataItem as DataRowView;

            LinkButtonField checkField  = GridDpt.FindColumn("checkField") as LinkButtonField;
            LinkButtonField editField   = GridDpt.FindColumn("editField") as LinkButtonField;
            LinkButtonField deleteField = GridDpt.FindColumn("deleteField") as LinkButtonField;

            if (row["IsCheck"].ToString() == "已审核")
            {
                deleteField.Enabled = false;
                checkField.Text     = "取消";
                checkField.Icon     = Icon.Cancel;
                editField.Text      = "查看";
                editField.Icon      = Icon.Lock;
            }
            else
            {
                deleteField.Enabled = true;
                checkField.Text     = "通过";
                checkField.Icon     = Icon.Accept;
                editField.Text      = "编辑";
                editField.Icon      = Icon.Pencil;
            }
            if (!haveRight(GetIdentityUser().userId, "及时任务审批"))
            {
                checkField.Enabled = false;
            }
            else
            {
                checkField.Enabled = true;
            }


            string TaskLevel = row["TaskLevel"].ToString();

            FineUIPro.BoundField bfEntranceYear = GridDpt.FindColumn("TaskLevel") as FineUIPro.BoundField;

            // 首先清空 data-color 属性
            bfEntranceYear.Attributes.Remove("data-color");

            // 然后添加 data-color 属性
            if (TaskLevel == "普通")
            {
                bfEntranceYear.Attributes["data-color"] = "color1";
            }
            else if (TaskLevel == "紧急")
            {
                bfEntranceYear.Attributes["data-color"] = "color2";
            }
            else if (TaskLevel == "非常紧急")
            {
                bfEntranceYear.Attributes["data-color"] = "color3";
            }
        }
Пример #17
0
        /// <summary>
        /// Raises the <see cref="E:System.Web.UI.Control.Init" /> event.
        /// </summary>
        /// <param name="e">An <see cref="T:System.EventArgs" /> object that contains the event data.</param>EventItem
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            int?eventItemId = PageParameter("EventItemId").AsIntegerOrNull();

            if (eventItemId.HasValue)
            {
                string key = string.Format("EventItem:{0}", eventItemId);
                _eventItem = RockPage.GetSharedItem(key) as EventItem;
                if (_eventItem == null)
                {
                    _eventItem = new EventItemService(new RockContext()).Queryable()
                                 .Where(i => i.Id == eventItemId)
                                 .FirstOrDefault();
                    RockPage.SaveSharedItem(key, _eventItem);
                }

                if (_eventItem != null)
                {
                    rFilter.ApplyFilterClick += rFilter_ApplyFilterClick;

                    gCalendarItemOccurrenceList.DataKeyNames      = new string[] { "Id" };
                    gCalendarItemOccurrenceList.Actions.ShowAdd   = true;
                    gCalendarItemOccurrenceList.Actions.AddClick += gCalendarItemOccurrenceList_Add;
                    gCalendarItemOccurrenceList.GridRebind       += gCalendarItemOccurrenceList_GridRebind;

                    var registrationField = gCalendarItemOccurrenceList.ColumnsOfType <HyperLinkField>().FirstOrDefault(a => a.HeaderText == "Registration");
                    if (registrationField != null)
                    {
                        registrationField.DataNavigateUrlFormatString = LinkedPageUrl("RegistrationInstancePage") + "?RegistrationInstanceId={0}";
                    }

                    var groupField = gCalendarItemOccurrenceList.ColumnsOfType <HyperLinkField>().FirstOrDefault(a => a.HeaderText == "Group");
                    if (groupField != null)
                    {
                        groupField.DataNavigateUrlFormatString = LinkedPageUrl("GroupDetailPage") + "?GroupId={0}";
                    }

                    AddAttributeColumns();

                    var copyField = new LinkButtonField();
                    copyField.HeaderText = "Copy";
                    copyField.CssClass   = "btn btn-default btn-sm fa fa-clone";
                    copyField.HeaderStyle.HorizontalAlign = HorizontalAlign.Center;
                    copyField.ItemStyle.HorizontalAlign   = HorizontalAlign.Center;
                    gCalendarItemOccurrenceList.Columns.Add(copyField);
                    copyField.Click += gCalendarItemOccurrenceList_Copy;

                    var deleteField = new DeleteField();
                    gCalendarItemOccurrenceList.Columns.Add(deleteField);
                    deleteField.Click += gCalendarItemOccurrenceList_Delete;
                }
            }
        }
Пример #18
0
        /// <summary>
        /// 获取当前页面上所有的权限按钮
        /// </summary>
        private void CheckPowerEdit(ControlCollection controls)
        {
            for (int i = 0; i < controls.Count; i++)
            {
                ControlBase ctrl = controls[i] as ControlBase;
                if (ctrl == null)
                {
                    continue;
                }
                if (ctrl is FineUI.Grid)
                {
                    #region Grid的权限控制
                    FineUI.Grid grid = ctrl as FineUI.Grid;
                    foreach (GridColumn column in grid.Columns)
                    {
                        if (!controlList.Contains(column.ColumnID))
                        {
                            continue;
                        }

                        Modules.SYS_PageAuthority auth = SessionAuthorityList.Where(a => a.MenuID == currentMenu.ID && a.ControlID == column.ColumnID).FirstOrDefault();
                        if (auth == null)
                        {
                            if (column is LinkButtonField)
                            {
                                LinkButtonField c = (LinkButtonField)column;
                                c.Enabled = false;
                                c.ToolTip = Resources.Resource.CHECK_POWER_FAIL_ACTION_MESSAGE;
                            }
                            else if (column is WindowField)
                            {
                                WindowField c = (WindowField)column;
                                c.Enabled = false;
                                c.ToolTip = Resources.Resource.CHECK_POWER_FAIL_ACTION_MESSAGE;
                            }
                        }
                    }
                    #endregion
                }
                else
                {
                    #region 其他控件的权限控制
                    if (controlList.Contains(ctrl.ID) && !IsPostBack)
                    {
                        Modules.SYS_PageAuthority auth = SessionAuthorityList.Where(a => a.MenuID == currentMenu.ID && a.ControlID == ctrl.ID).FirstOrDefault();
                        if (auth == null)
                        {
                            ctrl.Enabled = false;
                        }
                    }
                    CheckPowerEdit(ctrl.Controls);
                    #endregion
                }
            }
        }
Пример #19
0
        protected void gridRoomList_OnPreRowDataBound(object sender, FineUI.GridPreRowEventArgs e)
        {
            LinkButtonField lbf     = gridRoomList.FindColumn("seatUsedView") as LinkButtonField;
            DataRowView     row     = e.DataItem as DataRowView;
            string          roomNum = row[0].ToString();

            lbf.OnClientClick = WindowEdit.GetShowReference("SeatGraph.aspx?roomId=" + roomNum + "", "座位视图");

            LinkButtonField lbfReaderList = gridRoomList.FindColumn("seatReaderList") as LinkButtonField;

            lbfReaderList.OnClientClick = windowSeatUsedList.GetShowReference("MonitorListMode.aspx?roomId=" + roomNum + "", "在座读者列表");
        }
        protected void Grid1_PreDataBound(object sender, EventArgs e)
        {
            // 设置LinkButtonField的点击客户端事件
            LinkButtonField deleteField = Grid1.FindColumn("Delete") as LinkButtonField;

            deleteField.OnClientClick = GetDeleteScript(Grid1);

            PRODUCT00Bll.GetInstence().BandDropDownListShowProductName_1(this, DropDownList1, "");  // (System.Web.UI.WebControls.DropDownList)
            //DropDownList1.DataTextField = PRODUCT00Table.PROD_NAME1;
            //DropDownList1.DataValueField = PRODUCT00Table.PROD_ID;

            // DropDownList1.SelectedValue = ((System.Data.DataRowView)(row)).Row.Table.Rows[e.RowIndex][PRODUCT00Table.PROD_ID].ToString();
        }
Пример #21
0
        protected void Grid1_PreRowDataBound(object sender, GridPreRowEventArgs e)
        {
            LinkButtonField lbfDelete = GridList.FindColumn("Delete") as LinkButtonField;
            DataRowView     row       = e.DataItem as DataRowView;

            if (row["FLAG"].ToString() == "Y")
            {
                lbfDelete.Enabled = false;
            }
            else
            {
                lbfDelete.Enabled = true;
            }
        }
Пример #22
0
        /// <summary>
        /// Adds the Place Elsewhere column
        /// </summary>
        private void AddPlaceElsewhereColumn()
        {
            LinkButtonField btnPlaceElsewhere = new LinkButtonField();

            btnPlaceElsewhere.ItemStyle.HorizontalAlign = HorizontalAlign.Center;
            btnPlaceElsewhere.HeaderStyle.CssClass      = "grid-columncommand";
            btnPlaceElsewhere.ItemStyle.CssClass        = "grid-columncommand";
            btnPlaceElsewhere.Text     = "<i class='fa fa-share'></i>";
            btnPlaceElsewhere.CssClass = "btn btn-default btn-sm";
            btnPlaceElsewhere.ToolTip  = "Place Elsewhere";
            btnPlaceElsewhere.Click   += btnPlaceElsewhere_Click;

            gGroupMembers.Columns.Add(btnPlaceElsewhere);
        }
        /// <summary>
        /// 行绑定事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void LibraryGrid_OnPreRowDataBound(object sender, FineUI.GridPreRowEventArgs e)
        {
            LinkButtonField lbf        = LibraryGrid.FindColumn("Libraryedit") as LinkButtonField;
            DataRowView     row        = e.DataItem as DataRowView;
            string          librarylno = row[0].ToString();

            lbf.OnClientClick = WindowEdit.GetShowReference("libraryEdit.aspx?flag=edit&id=" + librarylno + "", "图书馆编辑");

            LinkButtonField lbfx        = LibraryGrid.FindColumn("Librarydelete") as LinkButtonField;
            DataRowView     rowx        = e.DataItem as DataRowView;
            string          librarylnox = rowx[0].ToString();

            lbfx.OnClientClick = WindowDelete.GetShowReference("../SystemSet/DeletePassword.aspx?Type=Library&id=" + librarylno + "", "图书馆删除");
        }
        /// <summary>
        /// 行绑定事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void SchoolGrid_OnPreRowDataBound(object sender, FineUI.GridPreRowEventArgs e)
        {
            LinkButtonField lbf      = SchoolGrid.FindColumn("Schooledit") as LinkButtonField;
            DataRowView     row      = e.DataItem as DataRowView;
            string          schoolno = row[0].ToString();

            lbf.OnClientClick = WindowEdit.GetShowReference("SchoolEdit.aspx?flag=edit&id=" + schoolno + "", "校区编辑");

            LinkButtonField lbfx      = SchoolGrid.FindColumn("Schooldelete") as LinkButtonField;
            DataRowView     rowx      = e.DataItem as DataRowView;
            string          schoolnox = rowx[0].ToString();

            lbfx.OnClientClick = WindowDelete.GetShowReference("../SystemSet/DeletePassword.aspx?Type=School&id=" + schoolnox + "", "校区删除");
        }
Пример #25
0
        protected void Grid1_PreRowDataBound(object sender, FineUI.GridPreRowEventArgs e)
        {
            LinkButtonField linkButtonField_Operation = Grid1.FindColumn("LinkButtonField_Operation") as LinkButtonField;
            DataRowView     row                 = e.DataItem as DataRowView;
            string          strStatus           = row["Status"].ToString();
            EvaluationStatusForEvaluated status = (EvaluationStatusForEvaluated)Enum.Parse(typeof(EvaluationStatusForEvaluated), strStatus);

            if (status == EvaluationStatusForEvaluated.started)
            {
                linkButtonField_Operation.Enabled = true;
            }
            else
            {
                linkButtonField_Operation.Enabled = false;
            }
        }
Пример #26
0
        protected void Grid1_PreRowDataBound(object sender, GridPreRowEventArgs e)
        {
            Infobasis.Data.DataEntity.PermissionRole role = e.DataItem as Infobasis.Data.DataEntity.PermissionRole;
            LinkButtonField deleteField = Grid1.FindColumn("deleteField") as LinkButtonField;
            // ForbidDelete
            bool forbidDelete = role.ForbidDelete;

            if (forbidDelete)
            {
                deleteField.Enabled = false;
                deleteField.ToolTip = "禁止删除";
            }
            else
            {
                deleteField.Enabled = true;
                deleteField.ToolTip = "删除";
            }
        }
Пример #27
0
        /// <summary>
        /// 行绑定事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void VRGrid_OnPreRowDataBound(object sender, FineUI.GridPreRowEventArgs e)
        {
            LinkButtonField lbf    = VRGrid.FindColumn("VRdelete") as LinkButtonField;
            DataRowView     row    = e.DataItem as DataRowView;
            string          status = row[6].ToString();

            if (status == "失效记录")
            {
                lbf.Enabled = false;
                lbf.Icon    = FineUI.Icon.None;
                lbf.ToolTip = "此记录已失效";
            }
            else
            {
                lbf.Enabled = true;
                lbf.Icon    = FineUI.Icon.Delete;
                lbf.ToolTip = "删除此条记录";
            }
        }
Пример #28
0
        /// <summary>
        /// 行绑定事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void gridBespeakLog_RowDataBound(object sender, FineUI.GridPreRowEventArgs e)
        {
            LinkButtonField lbf = gridBespeakLog.FindColumn("bespeakOpreate") as LinkButtonField;
            DataRowView     row = e.DataItem as DataRowView;

            BookingStatus logStatus = (BookingStatus)int.Parse(row[10].ToString());

            if (logStatus == BookingStatus.Waiting)
            {
                lbf.Enabled = true;
                lbf.ToolTip = "取消预约";
                lbf.Icon    = FineUI.Icon.Delete;
            }
            else
            {
                lbf.Enabled = false;
                lbf.ToolTip = "不可操作";
                lbf.Icon    = FineUI.Icon.None;
            }
        }
        /// <summary>
        /// 行绑定事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void BlacklistGrid_OnPreRowDataBound(object sender, FineUI.GridPreRowEventArgs e)
        {
            LinkButtonField lbf     = BlacklistGrid.FindColumn("Blacklistdelete") as LinkButtonField;
            LinkButtonField lbfshow = BlacklistGrid.FindColumn("BlacklistInfo") as LinkButtonField;
            DataRowView     row     = e.DataItem as DataRowView;
            string          status  = row[6].ToString();

            lbfshow.OnClientClick = WindowEdit.GetShowReference("BlacklistInfo.aspx?id=" + row[0].ToString() + "", "黑名单详情");
            if (status == "已过期")
            {
                lbf.Enabled = false;
                lbf.Icon    = FineUI.Icon.None;
                lbf.ToolTip = "此记录已过期";
            }
            else
            {
                lbf.Enabled = true;
                lbf.Icon    = FineUI.Icon.Delete;
                lbf.ToolTip = "读者移出黑名单";
            }
        }
Пример #30
0
        protected void grdData_PreRowDataBound(object sender, GridPreRowEventArgs e)
        {
            WindowField wfEdit1 = grdData.FindColumn("myWindowField") as WindowField;

            wfEdit1.Enabled = Sigesoft.Server.WebClientAdmin.BLL.Utils.IsActionEnabled("FRM002_EDIT");

            WindowField wfEdit2 = grdData.FindColumn("myWindowField3") as WindowField;

            wfEdit2.Enabled = Sigesoft.Server.WebClientAdmin.BLL.Utils.IsActionEnabled("FRM002_RESTRICTED_WAREHOUSE");

            WindowField wfEdit3 = grdData.FindColumn("myWindowField1") as WindowField;

            wfEdit3.Enabled = Sigesoft.Server.WebClientAdmin.BLL.Utils.IsActionEnabled("FRM002_ASSIGNED_GLOBALS_PERMISSIONS");

            WindowField wfEdit4 = grdData.FindColumn("myWindowField4") as WindowField;

            wfEdit4.Enabled = Sigesoft.Server.WebClientAdmin.BLL.Utils.IsActionEnabled("FRM002_ASSIGNED_ROLE");

            LinkButtonField lbfDelete = grdData.FindColumn("lbfAction2") as LinkButtonField;

            lbfDelete.Enabled = Sigesoft.Server.WebClientAdmin.BLL.Utils.IsActionEnabled("FRM002_DELETE");
        }