1. Permissions are subject to the menu table as dynamic
/// <summary> ///Screen Data binding/// </summary> protected voidBind () {Try{LOG. Debug ("[Bind] execution begins. "); stringStrrolekey =""; stringstrRoleName =""; stringStrmenuids =""; string[] MenuId; Sys_menubusiness Bllsysmenu=Newsys_menubusiness (); DataSet Menuds=NewDataSet (); Menuds=bllsysmenu.getmenulist (); for(intCountrow =0; Countrow < menuds.tables[0]. Rows.Count; countrow++) {TableRow row=NewTableRow (); //labelTableCell cell1; Cell1=NewTableCell (); Label Lblmenuname=NewLabel (); Lblmenuname.id="Lblmenuname"+countrow.tostring (); LBLMENUNAME.ATTRIBUTES.ADD ("Name","Lblmenuname"+countrow.tostring ()); Lblmenuname.text= menuds.tables[0]. rows[countrow]["MenuName"]. ToString (); LblMenuName.Font.Size=9; Cell1. Controls.Add (Lblmenuname); Row. Cells.add (CELL1); //checkboxTableCell cell2; Cell2=NewTableCell (); CheckBox Cbxmenuname=NewCheckBox (); Cbxmenuname.id="Cbxmenuname"+ menuds.tables[0]. rows[countrow]["MenuId"]. ToString (); //mode is updated, binding current role permission data if(Model! ="0") { //Get update Rolekey stringRolekey =""; if(request.querystring["Rolekey"] !=NULL) {Rolekey= request.querystring["Rolekey"]. ToString (); } //get update rolekey dataSys_rolebusiness BLL =Newsys_rolebusiness (); DataSet DS=NewDataSet (); DS=BLL. Getkeyrolelist (Rolekey); Strrolekey= ds. tables[0]. rows[0]["Rolekey"]. ToString (); strRoleName= ds. tables[0]. rows[0]["RoleName"]. ToString (); Strmenuids= ds. tables[0]. rows[0]["Menuids"]. ToString (); if(ds. tables[0]. rows[0]["isactivity"]. ToString (). ToUpper () = ="TRUE") {Ddlisactivity.selectedvalue="1"; } Else{Ddlisactivity.selectedvalue="0"; } MenuId= Strmenuids.split (','); Hidrolekey.value=Strrolekey; Txtrolename.text=strRoleName; for(intCount =0; Count < Menuid.length; count++) { if(menuds.tables[0]. rows[countrow]["MenuId"]. ToString () = =Menuid[count]) {cbxmenuname.checked=true; Break; }}} cell2. Controls.Add (Cbxmenuname); Row. Cells.add (CELL2); TBMENUIDS.ROWS.ADD (row); } LOG. Debug ("[Bind] execution ends. "); } Catch(Exception ex) {LOG. Error (ex. Message); } }
2. You need to disable the parent page when ejecting the sprite, choose ShowModalDialog ()
Problem one: When the sprite is updated, the Window.opener=null;window.close () is turned off and a new page pops up when the Silent popup pops up.
Solution: Append <base target= "_self" to the head tag/>
Issue two: Sub-screen two times to save in the cache, do not walk pageload, resulting in data updates after the Dynamic checkbox is not re-bound.
Solution: Response.Expires =-1; Give an expiration time and refresh the page again.
Issue three: Sub-image DB update after the page is closed, the parent page does not refresh to keep the old data.
Resolution process 1:window.location.reload (); The entire page will be refreshed with the following prompts.
Resolution process 2:window.location.href = WINDOW.LOCATION.HREF; IE finished refreshing the parent page, but Firefox is not compatible, can't play ShowModalDialog.
Resolve the process 3:window.location.replace (URL), complete the Firefox and IE parent page refresh.
3. Update get foreground dynamic checkbox,checked ID (numeric part corresponding to MENUID) concatenation string Comma separated
stringStrmenuids =""; Sys_menubusiness BLL=Newsys_menubusiness (); DataSet Menuds=NewDataSet (); Menuds=BLL. Getmenulist (); for(intCount =0; Count < menuds.tables[0]. Rows.Count; count++) { stringCheck = request.form["Cbxmenuname"+ menuds.tables[0]. rows[count]["MenuId"]. ToString ()]; if(Check = =" on") {Strmenuids= Strmenuids + menuds.tables[0]. rows[count]["MenuId"]. ToString () +","; } }
A popup screen for rights maintenance