private bool pmCheckPermission_Add(string inTaskName, Business.Entity.AuthenType inChkType, string inAppUser) { bool bllResult = false; string strErrorMsg = ""; bool bllHasSetRight = false; string strSQLStr = "select AppEMRole.cAppRole , AppRole.cLevel from AppEMRole left join AppRole on AppRole.cRowID = AppEMRole.cAppRole where AppEMRole.cEmpl "; strSQLStr += " in (select CROWID from APPEMPL where CRCODE in (select CRCODE from APPLOGIN where CROWID = ? ))"; WS.Data.Agents.cDBMSAgent objSQLHelper = this.mSaveDBAgent; objSQLHelper.SetPara(new object[] { inAppUser }); if (objSQLHelper.SQLExec(ref this.dtsDataEnv, "QEmpPost", "EMPPOST", strSQLStr, ref strErrorMsg)) { foreach (DataRow dtrEMPPost in this.dtsDataEnv.Tables["QEmpPost"].Rows) { ////¡Ó˹´ÊÔ·¸ÔìÃдѺ Login (Login) //bllResult = this.pmCheckLevelC(inTaskName, inChkType, dtrEMPPost["cAppRole"].ToString(), inAppUser, ref bllHasSetRight); //if (bllHasSetRight) return bllResult; //¡Ó˹´ÊÔ·¸ÔìÃдѺ µÓáË¹è§ (Role) bllResult = this.pmCheckLevelB_Add1(inTaskName, inChkType, dtrEMPPost["cAppRole"].ToString(), ref bllHasSetRight); if (bllHasSetRight) { return(bllResult); } } } return(bllResult); }
public bool CheckPermission_Add(string inTaskName, Business.Entity.AuthenType inChkType, string inLoginName, string inAppUser) { if (inLoginName.TrimEnd() != "BIGBOSS") { return(this.pmCheckPermission_Add(inTaskName, inChkType, inAppUser)); } else { return(true); } }
public bool CheckPermissionByBook(Business.Entity.AuthenType inChkType, string inLoginName, string inAppUser, string inRefType, string inBook) { if (inLoginName.TrimEnd() != "BIGBOSS") { return(this.pmCheckPermissionByBook(inChkType, inAppUser, inRefType, inBook)); } else { return(true); } }
private bool pmCheckPermissionByBook(Business.Entity.AuthenType inChkType, string inAppUser, string inRefType, string inWsBook) { string strErrorMsg = ""; WS.Data.Agents.cDBMSAgent objSQLHelper = this.mSaveDBAgent; bool bllResult = true; objSQLHelper.SetPara(new object[] { gc_AuthType_BOOK, inAppUser, inRefType, inWsBook }); if (objSQLHelper.SQLExec(ref this.dtsDataEnv, "QAuthDet", "AppAuthDet", "select * from AppAuthDet where cType = ? and cAppLogin = ? and cRefType = ? and cBook = ?", ref strErrorMsg)) { DataRow dtrAuthDet = this.dtsDataEnv.Tables["QAuthDet"].Rows[0]; bllResult = this.pmGetRight(inChkType, dtrAuthDet); } return(bllResult); }
private bool pmCheckLevelB_Add1(string inTaskName, Business.Entity.AuthenType inChkType, string inPost, ref bool ioHasSetRight) { bool bllResult = false; ioHasSetRight = false; string strErrorMsg = ""; bool bllHasSetRight = false; string strSQLStr = "select * from APPAUTHB_ADD1 where CTASKNAME = ? and CPOST = ? "; WS.Data.Agents.cDBMSAgent objSQLHelper = this.mSaveDBAgent; //objSQLHelper.SetPara(new object[] { inTaskName.PadRight(10), inPost }); objSQLHelper.SetPara(new object[] { inTaskName, inPost }); if (objSQLHelper.SQLExec(ref this.dtsDataEnv, "QAppAuth", "APPAUTHB", strSQLStr, ref strErrorMsg)) { bllHasSetRight = true; DataRow dtrAppAuth = this.dtsDataEnv.Tables["QAppAuth"].Rows[0]; bllResult = this.pmGetRight(inChkType, dtrAppAuth); } ioHasSetRight = bllHasSetRight; return(bllResult); }
public bool XXXCheckPermission(string inTaskName, Business.Entity.AuthenType inChkType, string inAppUser) { //return true; return(this.pmCheckPermission(inTaskName, inChkType, inAppUser)); }
public bool CheckPermission(Business.Entity.AuthenType inChkType, string inAppUser, string inTaskName) { return(true); //return this.pmCheckPermission(inChkType, inAppUser, inTaskName); }