| | |
| | | { |
| | | try |
| | | { |
| | | string sErrMsg = ""; |
| | | oSystemParameter.ShowBill(ref sErrMsg); |
| | | DataSet ds = null; |
| | | ClsCN oCnLoc = new ClsCN(); |
| | | DAL.ClsUser oUser = new DAL.ClsUser(); |
| | |
| | | string sql = string.Format(@" select a.* from Gy_UserByOrgRelation a |
| | | where a.HUserID = '{0}' and a.HOrgID = '{1}'", UserName, HOrgName); |
| | | DataSet _ds = oCnLoc.RunProcReturn(sql, "h_p_Xt_UserRelationOrg_Check"); |
| | | //if (_ds == null || _ds.Tables[0].Rows.Count == 0) |
| | | //{ |
| | | // objjson.code = "0"; |
| | | // objjson.count = 0; |
| | | // objjson.Message = "用户" + UserName + "没有该组织权限"; |
| | | // objjson.data = null; |
| | | // return objjson; |
| | | //} |
| | | |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "杭州斯莫尔") |
| | | { |
| | | if (_ds == null || _ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "用户" + UserName + "没有该组织权限"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | } |
| | | |
| | | objjson.code = "0"; |
| | | objjson.count = 1; |
| | |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "获取失败" + DBUtility.ClsPub.sErrInfo; |
| | | objjson.Message = "获取失败,未设置默认检验方案"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "获取失败,查无数据" + DBUtility.ClsPub.sErrInfo; |
| | | objjson.Message = "获取失败,明细查无数据"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | |
| | | ds = oCn.RunProcReturn(sql1, "Gy_MenuDefineSet"); //查询用户绑定的角色 是否设置菜单信息 取角色名称最短的一个 |
| | | if ((ds.Tables[0] == null || ds.Tables[0].Rows.Count == 0)) |
| | | { |
| | | sql = "Select HitemID,HNumber,HName,HPartentID,HLevel,Hurl,HShowMode,isnull(HTranslationText_English,HName) HTranslationText_English,isnull(HTranslationText_Spain,HName) HTranslationText_Spain,HPicNum from Gy_Menu_1 where HType = '" + HType + "' Order by HPosition,len(HitemID),HitemID "; |
| | | ds = oCn.RunProcReturn(sql, "Gy_Menu_1"); |
| | | sql1 = "select HItemID,HPartentID,HNumber,HName,HLevel,Hurl,HType,HPicNum,HShowMode,isnull(HTranslationText_English,HName) HTranslationText_English,isnull(HTranslationText_Spain,HName) HTranslationText_Spain from Gy_MenuDefineSet where HMakeName = 'admin' and HType = '" + HType + "' order by HPosition"; |
| | | ds = oCn.RunProcReturn(sql1, "Gy_MenuDefineSet"); //查询admin 是否设置菜单信息 |
| | | if ((ds.Tables[0] == null || ds.Tables[0].Rows.Count == 0)) |
| | | { |
| | | sql = "Select HitemID,HNumber,HName,HPartentID,HLevel,Hurl,HShowMode,isnull(HTranslationText_English,HName) HTranslationText_English,isnull(HTranslationText_Spain,HName) HTranslationText_Spain,HPicNum from Gy_Menu_1 where HType = '" + HType + "' Order by HPosition,len(HitemID),HitemID "; |
| | | ds = oCn.RunProcReturn(sql, "Gy_Menu_1"); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |