当前位置: 代码迷 >> ASP.NET >> 因看不懂,请问一段程序
  详细解决方案

因看不懂,请问一段程序

热度:4035   发布时间:2013-02-26 00:00:00.0
因看不懂,请教一段程序?
protected   void   gv_Privilege_RowCreated(object   sender,   GridViewRowEventArgs   e)
                {
                        if   (e.Row.RowType   ==   DataControlRowType.DataRow)
                        {
                                DataRowView   drv   =   (DataRowView)e.Row.DataItem;
                                if   (drv   ==   null)
                                {
                                        return;
                                }
                                for   (int   i   =   0;   i   <   drv.DataView.Table.Columns.Count;   i++)
                                {
                                        if   (drv.DataView.Table.Columns[i].ColumnName   !=   "资源名称 ")
                                        {
                                                //问题一?
                                                CheckBox   chk   =   (CheckBox)e.Row.Cells[i].Controls[0];
                                                if   (Convert.ToBoolean(drv[drv.DataView.Table.Columns[i].ColumnName].ToString()))
                                                {
                                                       
                                                       
                                                        string   roleId   =   lbl_GroupName.Attributes[ "RoleId "].ToString();
                                                                                                                string   privilegeId   =   new   SMS_Privilege().GetPrivilegeId(drv[0].ToString(),   drv.DataView.Table.Columns[i].ColumnName);
  相关解决方案