protected void Grid2_RowDataBound(object sender, FineUI.GridRowEventArgs e)
        {
            AspNet.CheckBoxList ddlPowers = (AspNet.CheckBoxList)Grid2.Rows[e.RowIndex].FindControl("ddlPowers");

            IGrouping <string, SYS_POWERSModel> powers = e.DataItem.GetType().GetProperty("Powers").GetValue(e.DataItem, null) as IGrouping <string, SYS_POWERSModel>;

            foreach (SYS_POWERSModel power in powers.ToList())
            {
                AspNet.ListItem item = new AspNet.ListItem();
                item.Value = power.ID.ToString();
                item.Text  = power.Title;
                item.Attributes["data-qtip"] = power.Name;

                if (_currentRolePowers.ContainsKey(power.Name))
                {
                    item.Selected = true;
                }
                else
                {
                    item.Selected = false;
                }

                ddlPowers.Items.Add(item);
            }
        }
Esempio n. 2
0
        protected void Grid1_RowDataBound(object sender, FineUI.GridRowEventArgs e)
        {
            DataRowView row = e.DataItem as DataRowView;

            if (row != null)
            {
            }
        }
Esempio n. 3
0
        protected void Grid1_RowDataBound(object sender, FineUI.GridRowEventArgs e)
        {
            // 行绑定后,确定应该选择哪一行
            Dept dept = e.DataItem as Dept;

            if (dept != null && _deptID == dept.ID)
            {
                _selectedRowIndex = e.RowIndex;
            }
        }
 protected void Grid_RowDataBound(object sender, FineUI.GridRowEventArgs e)
 {
     FineOffice.Modules.OA_FlowRunProcess row = e.DataItem as FineOffice.Modules.OA_FlowRunProcess;
     if (row != null)
     {
         if (row.State == 3)
         {
             highlightRows.Text += e.RowIndex.ToString() + ",";
         }
     }
 }
Esempio n. 5
0
        protected void Grid2_RowDataBound(object sender, FineUI.GridRowEventArgs e)
        {
            AspNet.CheckBoxList cblPurviewCodes = (AspNet.CheckBoxList)Grid2.Rows[e.RowIndex].FindControl("cblPurviewCodes");
            string mId = Grid2.DataKeys[e.RowIndex][0].ToString();

            cblPurviewCodes.Items.Add(new AspNet.ListItem("浏览", Grid2.DataKeys[e.RowIndex][1].ToString()));
            if (purviewCodeData != null && purviewCodeData.Rows.Count > 0)
            {
                DataRow[] drItem = purviewCodeData.Select("M_ID=" + mId);
                foreach (DataRow dr in drItem)
                {
                    cblPurviewCodes.Items.Add(new AspNet.ListItem(dr["MPC_NAME"].ToString(), dr["MPC_CODE"].ToString()));
                }
            }
        }
Esempio n. 6
0
        protected void Grid1_RowDataBound(object sender, FineUI.GridRowEventArgs e)
        {
            DataRowView row = e.DataItem as DataRowView;

            if (row != null)
            {
                if (e.Values[3].ToString() == "0")
                {
                    e.Values[3] = "<span style='color:red'>停用</span>";
                }
                if (e.Values[3].ToString() == "1")
                {
                    e.Values[3] = "<span style='color:green'>启用</span>";
                }
            }
        }
Esempio n. 7
0
        // 用CheckBoxList展现权限列表
        protected void Grid2_RowDataBound(object sender, FineUI.GridRowEventArgs e)
        {
            AspNet.CheckBoxList cbl = (AspNet.CheckBoxList)Grid2.Rows[e.RowIndex].FindControl("ddlPowers");
            string group            = e.DataItem.GetPropertyValue("Group").ToString();
            var    items            = typeof(PowerType).ToList(group);

            foreach (var power in items)
            {
                AspNet.ListItem item = new AspNet.ListItem();
                item.Value = power.ID.ToString();
                item.Text  = power.Name;
                item.Attributes["data-qtip"] = power.Name;
                item.Selected = _powers.ContainsKey((PowerType)(power.Value));
                cbl.Items.Add(item);
            }
        }
 protected void Grid1_RowDataBound(object sender, GridRowEventArgs e)
 {
     DataRowView dr = e.DataItem as DataRowView;
     if (dr != null)
     {
         string strCreateUserKey = dr["PublishID"].ToString();
         e.Values[0] = Get_UserName(strCreateUserKey);
     }
 }
 protected void Grid1_RowDataBound(object sender, GridRowEventArgs e)
 {
     //DataRowView dr = e.DataItem as DataRowView;
     //if (dr != null)
     //{
     //    string strUserType = dr["UserType"].ToString();
     //    e.Values[0] = Get_UserTypeName(strUserType);
     //}
 }
Esempio n. 10
0
        protected void Grid1_RowDataBound(object sender, GridRowEventArgs e)
        {
            if (B_Action.ToUpper() == "VIEW")
            {

            }
        }
Esempio n. 11
0
 /// <summary>
 /// 触发行绑定后事件
 /// </summary>
 /// <param name="e">事件参数</param>
 protected virtual void OnRowDataBound(GridRowEventArgs e)
 {
     EventHandler<GridRowEventArgs> handler = Events[_rowDataBoundHandlerKey] as EventHandler<GridRowEventArgs>;
     if (handler != null)
     {
         handler(this, e);
     }
 }
        protected void Grid1_RowDataBound(object sender, GridRowEventArgs e)
        {
            DataRowView dr = e.DataItem as DataRowView;
            if (dr != null)
            {
                string strEnterpriseKey = dr["EnterpriseKey"].ToString();
                e.Values[0] = Get_EnterpriseName(strEnterpriseKey);

                string strJobWorkType = dr["JobWorkType"].ToString();
                e.Values[2] = Get_JobWorkType(strJobWorkType);

                //string strEnterpriseType = dr["JobFeildKinds"].ToString();
                //e.Values[3] = Get_EnterpriseType(strEnterpriseType);

                //string strJobPositionStatus = dr["JobPositionStatus"].ToString();
                //e.Values[7] = Get_JobPositionStatus(strJobPositionStatus);

                string strJobSalary = dr["JobSalary"].ToString();
                e.Values[4] = Get_JobSalary(strJobSalary);

            }
        }
        protected void Grid1_RowDataBound(object sender, GridRowEventArgs e)
        {
            DataRowView dr = e.DataItem as DataRowView;
            if (dr != null)
            {
                string strType = dr["ExchangeCornerTypeKey"].ToString();
                e.Values[1] = Get_TypeName(strType);

                string strExchangeCornerFileSize = dr["ExchangeCornerFileSize"].ToString();
                if (strExchangeCornerFileSize != "")
                e.Values[3] = Get_FileSize(int.Parse(strExchangeCornerFileSize));
            }
        }
        protected void Grid1_RowDataBound(object sender, GridRowEventArgs e)
        {
            DataRowView dr = e.DataItem as DataRowView;
            if (dr != null)
            {
                string strPublishID = dr["PublishID"].ToString();
                e.Values[0] = Get_UserName(strPublishID);

                string strNavigateGUID = dr["NavigateGUID"].ToString();
                e.Values[1] = Get_NavigateName(strNavigateGUID);
            }
        }
Esempio n. 15
0
        protected void Grid1_RowDataBound(object sender, GridRowEventArgs e)
        {
            GridRow gr = Grid1.Rows[e.RowIndex];
            System.Web.UI.WebControls.Label lb = gr.FindControl("Label1") as System.Web.UI.WebControls.Label;

            if (lb.Text.Trim() == "3")
                lb.Text = "通过";
            else if (lb.Text.Trim() == "4")
                lb.Text = "不通过";
            else
                lb.Text = "未审核";
        }
 /// <summary>
 /// 分组绑定右侧权限
 /// 修改人:金协民 2015年7月29日
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void Grid2_RowDataBound(object sender, GridRowEventArgs e)
 {
     AspNet.CheckBoxList ddlPowers = (AspNet.CheckBoxList)Grid2.Rows[e.RowIndex].FindControl("ddlPowers");
     var GroupName = e.DataItem.GetType().GetProperty("GroupName").GetValue(e.DataItem, null);
     List<T_POWERS> T_POWERS_LIST = new List<T_POWERS>();
     var query = new DapperExQuery<T_POWERS>().AndWhere(n => n.GROUP_NAME, OperationMethod.Equal, GroupName);
     T_POWERS_LIST = T_POWERS_BLL.GetAllList(query);
     foreach (var po in T_POWERS_LIST)
     {
         AspNet.ListItem item = new AspNet.ListItem
         {
             Value = po.P_CODE.ToString(),
             Text = string.Format("{0}({1})", po.P_CHINESE_NAME, po.P_NAME)
         };
         item.Attributes["data-qtip"] = po.P_NAME;
         if (_currentRolePowers.ContainsKey(po.P_NAME))
         {
             item.Selected = true;
         }
         else
         {
             item.Selected = false;
         }
         ddlPowers.Items.Add(item);
     }
 }
Esempio n. 17
0
 protected void Grid1_RowDataBound(object sender, FineUI.GridRowEventArgs e)
 {
     //  System.Web.UI.WebControls.DropDownList ddlGender = (System.Web.UI.WebControls.DropDownList)Grid1.Rows[e.RowIndex].FindControl("ddlGender");
     //  System.Web.UI.WebControls.TextBox tbxGender = (System.Web.UI.WebControls.TextBox)Grid1.Rows[e.RowIndex].FindControl("tbxGender");
     //  System.Web.UI.WebControls.BoundField dd = (System.Web.UI.WebControls.BoundField)Grid1.Rows[e.RowIndex].FindControl("tbxGender");
 }
Esempio n. 18
0
        protected void Grid2_RowDataBound(object sender, GridRowEventArgs e)
        {
            object[] values = Grid1.DataKeys[Grid1.SelectedRowIndex];
            string roleid = values[0].ToString().Trim();

            object[] values1 = Grid2.DataKeys[e.RowIndex];
            string ModuleName = values1[0].ToString().Trim();

            AspNet.CheckBox ck_read = (AspNet.CheckBox)Grid2.Rows[e.RowIndex].FindControl("CheckBox1");
            AspNet.CheckBoxList ddlOthers = (AspNet.CheckBoxList)Grid2.Rows[e.RowIndex].FindControl("ddlOthers");
            DataTable dt = ViewState["dt"] as DataTable;
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                if (roleid == dt.Rows[i]["RoleId"].ToString().Trim() && ModuleName == dt.Rows[i]["ModuleName"].ToString().Trim())
                {
                    if (dt.Rows[i]["IsCanRead"].ToString().Trim() == "0")
                        ck_read.Checked = false;
                    else
                        ck_read.Checked = true;
                    //JObject otherPowerObj = new JObject(dt.Rows[i]["Others"]);
                    JObject otherPowerObj = JObject.Parse(dt.Rows[i]["Others"].ToString().Trim());
                    JProperty jp1 = otherPowerObj.Property("New");
                    if (jp1 != null)
                    {
                        if (jp1.Value.ToString() == "True")
                            ddlOthers.Items[0].Selected = true;
                        else
                            ddlOthers.Items[0].Selected = false;
                    }

                    jp1 = otherPowerObj.Property("Edit");
                    if (jp1 != null)
                    {
                        if (jp1.Value.ToString() == "True")
                            ddlOthers.Items[1].Selected = true;
                        else
                            ddlOthers.Items[1].Selected = false;
                    }

                    jp1 = otherPowerObj.Property("Del");
                    if (jp1 != null)
                    {
                        if (jp1.Value.ToString() == "True")
                            ddlOthers.Items[2].Selected = true;
                        else
                            ddlOthers.Items[2].Selected = false;
                    }

                    break;
                }
            }
        }
        protected void Grid1_RowDataBound(object sender, GridRowEventArgs e)
        {
            DataRowView dr = e.DataItem as DataRowView;
            if (dr != null)
            {
                string strPublishID = dr["PublishID"].ToString();
                e.Values[0] = Get_UserName(strPublishID);

                string strEnterpriseServiceTypeGUID = dr["EnterpriseServiceTypeGUID"].ToString();
                e.Values[1] = Get_EnterpriseServiceTypename(strEnterpriseServiceTypeGUID);
            }
        }
        protected void Grid2_RowDataBound(object sender, GridRowEventArgs e)
        {
            string roleRightStr = "";
            string roleOperResStr = "";
            if (Role != null)
            {
                roleRightStr = Role.RoleRightStr ?? "";
                roleOperResStr = Role.RoleOperResStr ?? "";
            }

            var cblpower = (System.Web.UI.WebControls.CheckBoxList)Grid2.Rows[e.RowIndex].FindControl("cblPowers");
            var mid = Grid2.DataKeys[e.RowIndex][0].ToString();
            var m = mList.FirstOrDefault(p => p.Id == mid);
            Debug.Assert(m != null, "m != null");

            //添加浏览
            var item0 = new System.Web.UI.WebControls.ListItem
            {
                Text = "浏览",
                Value = m.MenuCode + "-0"
            };
            item0.Attributes["data-qtip"] = m.MenuCode;

            //初始化浏览权限
            item0.Selected = roleRightStr.Contains(m.MenuCode + "-0");

            cblpower.Items.Add(item0);
            foreach (var item in m.sys_Action.Select(a => new System.Web.UI.WebControls.ListItem
            {
                Text = a.ActionName,
                Value = string.Format("{0}-{1}", m.MenuCode, a.ActionCode)
            }))
            {
                item.Attributes["data-qtip"] = m.MenuCode;

                item.Selected = roleRightStr.Contains(item.Value);
                cblpower.Items.Add(item);
            }

        }
 protected void Grid1_RowDataBound(object sender, GridRowEventArgs e)
 {
     DataRowView dr = e.DataItem as DataRowView;
     if (dr != null)
     {
         string strLinkType = dr["LinkType"].ToString();
         if (strLinkType == "0")
         {
             e.Values[1] = "文字链接";
         }
         else
         {
             e.Values[1] = "图片链接";
         }
     }
 }
Esempio n. 22
0
 protected void Grid1_RowDataBound(object sender, GridRowEventArgs e)
 {
     DataRowView dr = e.DataItem as DataRowView;
     if (dr != null)
     {
         string strEnterpriseGUID = dr["EnterpriseGuid"].ToString();
         e.Values[0] = Get_EnterpriseName(strEnterpriseGUID);
         //string strADType = dr["ADType"].ToString();
         //if (strADType == "1")
         //{
         //    e.Values[2] = "图片类型";
         //}
         //else if(strADType == "2")
         //{
         //    e.Values[2] = "脚本类型";
         //}
         //else
         //{
         //    e.Values[2] = "未知类型";
         //}
     }
 }
 protected void Grid1_RowDataBound(object sender, GridRowEventArgs e)
 {
     //DataRowView dr = e.DataItem as DataRowView;
     //if (dr != null)
     //{
     //    string strEnterpriseGuid = dr["EnterpriseGuid"].ToString();
     //    e.Values[0] = Get_EnterpriseName(strEnterpriseGuid);
     //}
 }
        protected void Grid1_RowDataBound(object sender, GridRowEventArgs e)
        {
            DataRowView dr = e.DataItem as DataRowView;
            if (dr != null)
            {
                //string strIsEmergencyRecruitment = dr["IsEmergencyRecruitment"].ToString();
                //if (Convert.IsDBNull(strIsEmergencyRecruitment))
                //{
                //    e.Values[4] = "0";
                //}
                //else if (strIsEmergencyRecruitment == "0")
                //{
                //    e.Values[4] = "0";
                //}
                //else
                //{
                //    e.Values[4] = "1";
                //}

                //string strDownloadResume = dr["DownloadResume"].ToString();
                //if (Convert.IsDBNull(strDownloadResume))
                //{
                //    e.Values[5] = "0";
                //}
                //else if (strDownloadResume == "0")
                //{
                //    e.Values[5] = "0";
                //}
                //else
                //{
                //    e.Values[5] = "1";
                //}
            }
        }
Esempio n. 25
0
 protected void Grid1_RowDataBound(object sender, GridRowEventArgs e)
 {
     if (B_Action.ToUpper() == "VIEW")
     {
         System.Web.UI.WebControls.TextBox txt;
         txt = Grid1.Rows[e.RowIndex].FindControl("txtQty") as System.Web.UI.WebControls.TextBox;
         txt.ReadOnly = true;
         txt.BorderWidth = 0;
         txt = Grid1.Rows[e.RowIndex].FindControl("txtPrice") as System.Web.UI.WebControls.TextBox;
         txt.ReadOnly = true;
         txt.BorderWidth = 0;
     }
 }
Esempio n. 26
0
 protected void grdData_RowDataBound(object sender, FineUI.GridRowEventArgs e)
 {
 }