Using system.data; using system.collections;
Namespace XSTBD.COMMON.right {/// /// Action Summary Description. /// summary> public class action {private string m_actionname; private bool m_Actionenabled = true; private dataset m_dsrights; private hashtable m_actionobjht; private arraylist m_actionList;
/// /// Operation /// summary> public action () {resetAction ();}
Public action (String ActionName, Bool Actionenable) {this.m_actionname = actionname; this.m_Actionenabled = Actionenabled; resetAction ();
Public action (String actionName) {this.m_actionname = actionname; this.m_Actionenabled = false; resetAction ();} /// /// Operation name /// summary> public string actionname {get {Return THIS .m_actionname;} set {this.m_actionname = value;}}
/// /// Operation enabled ///// summary> public bool actionenabled {get {return this.m_Actionenabled;} set {this.m_actionenablenabled = value;}}
/// /// Action correspondence object table /// summary> public hashtable actionObjht {get {return this.m_actionobjht;} set {this.m_actionobjht = value;}} /// / The sub-action /// summary> public arraylist actionList {get {return} set} set {this.m_actionlist = value;}}
/// // / permission set and /// summary> public dataset dsrights {get {return this.m_dsrights;} set {this.m_dsrights = value;}} public void address (action action) {m_ActionList .Add (action);} /// /// Reset Action /// summary> private void resetAction () {m_actionobjht = new hashtable (); m_ActionList = new arraylist ();} /// /// Add operation object /// summary> /// Operation object param> /// Object type param> Public void addressobj (Object obj, type objtype) {m_actionobjht.add (obj, objtype);
/// /// Set an enabled status of an action while setting the control over an Enabled status of an Action /// summary> public void setActionenabled () {if (this.dsrights.tables [0] .rows.count > 0) {if (this.dsrights.tables [0] .Rows [0] ["ActionName"]. TOSTRING () == "allright") // Set all permissions {setAllactionNableNableD (); return;} for (int); i = 0; i
Private void setALLACTIONENABLED () {for (int i = 0; i /// Setting the control enabled /// summary> private void setActionObjenabled () {for (int i = 0; i