| | |
| | | |
| | | Int64 HItemID = 0; |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | |
| | | |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | } catch (Exception e) |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | |
| | | } |
| | | else |
| | | { |
| | | sWhere = sWhere.Replace("\"", "''"); |
| | | ds = oCN.RunProcReturn("exec h_p_IF_BarCodeBillList " + page + "," + size + ",'" + sWhere + "'", "h_p_IF_BarCodeBillList"); |
| | | } |
| | | |
| | |
| | | { |
| | | DataSet ds = oCN.RunProcReturn("exec [h_p_Gy_MenuDefineSet_APP_Get] " + |
| | | "@HMaker = N'" + HMaker + "'," + |
| | | "@HType = N'" + HType + "'," + |
| | | "@HType = N'" + HType + "'," + |
| | | "@HMenuListName = N'" + HMenuListName + "'" |
| | | , "h_p_Gy_MenuDefineSet_APP_Get"); |
| | | |
| | |
| | | list.ForEach(one => |
| | | { |
| | | string sql2 = "insert into Gy_MenuDefineSet_APP( HEntryID, HIndex, HName, HMenuName, HPicNum, HShowMode, HMaker)" + |
| | | "Values('" + one.HEntryID + "','" + one.HIndex + "','" + one.HName + "','" + MenuName + "','" |
| | | "Values('" + one.HEntryID + "','" + one.HIndex + "','" + one.HName + "','" + MenuName + "','" |
| | | + one.HPicNum + "','" + one.HShowMode + "','" + user + "')"; |
| | | oCN.RunProcReturn(sql2, "Gy_MenuDefineSet_APP"); |
| | | }); |
| | |
| | | { |
| | | string 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=" + |
| | | "(select top 1 c.GroupName from Gy_Czygl a left join System_UserGroupInfo b on a.Czybm = b.UserId " + |
| | | "left join System_UserGroup c on b.GroupId = c.GroupID where a.Czymc ='"+HMakeName+"' order by len(c.GroupName ))"; |
| | | "left join System_UserGroup c on b.GroupId = c.GroupID where a.Czymc ='" + HMakeName + "' order by len(c.GroupName ))"; |
| | | 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"); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | for (int i = 0; i < ds.Tables[0].Rows.Count; i++) //将菜单的根节点保存到列表menu中 |
| | |
| | | { |
| | | try |
| | | { |
| | | |
| | | |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | |
| | | |
| | |
| | | if (HPartentID == "0" || HPartentID == ds.Tables[0].Rows[0]["HItemID"].ToString()) |
| | | { |
| | | string HPosition = ds.Tables[0].Rows[0]["HPosition"].ToString(); |
| | | sql = "insert into Gy_MenuDefineSet(HItemID,HPartentID,HNumber,HName,HLevel,Hurl,HType,HMakeName,HPicNum,HPosition,HTranslationText_English,HTranslationText_Spain) values('" + saveDataList[i].HItemID + "','" + HPartentID + "','" + HNumber + "','" + saveDataList[i].HName + "'," + HLevel + ",'" + Hurl + "','" + HType + "','" + HMakeName + "','" + HPicNum + "','" + HPosition + "','"+ HTranslationText_English + "','" + HTranslationText_Spain + "')"; |
| | | sql = "insert into Gy_MenuDefineSet(HItemID,HPartentID,HNumber,HName,HLevel,Hurl,HType,HMakeName,HPicNum,HPosition,HTranslationText_English,HTranslationText_Spain) values('" + saveDataList[i].HItemID + "','" + HPartentID + "','" + HNumber + "','" + saveDataList[i].HName + "'," + HLevel + ",'" + Hurl + "','" + HType + "','" + HMakeName + "','" + HPicNum + "','" + HPosition + "','" + HTranslationText_English + "','" + HTranslationText_Spain + "')"; |
| | | oCN.RunProc(sql); |
| | | } |
| | | else |
| | |
| | | //快捷方式自定义菜单:获取树组件数据 |
| | | [Route("Web/Xt_UserFastMenu_Display")] |
| | | [HttpGet] |
| | | public object Xt_UserFastMenu_Display(string HMakeName, string HType,string HModelAtributos) |
| | | public object Xt_UserFastMenu_Display(string HMakeName, string HType, string HModelAtributos) |
| | | { |
| | | try |
| | | { |
| | |
| | | string HCaption = ds.Tables[0].Rows[0]["HName"].ToString(); |
| | | string HType = ds.Tables[0].Rows[0]["HType"].ToString(); |
| | | |
| | | sql = "insert into Xt_UserFastMenu(HUserID,HSubFuncID,HCaption,HType,HModelAtributos) values('" + HUserID + "','" + HSubFuncID + "','" + HCaption + "','" + HType + "','"+ HModelAtributos + "')"; |
| | | sql = "insert into Xt_UserFastMenu(HUserID,HSubFuncID,HCaption,HType,HModelAtributos) values('" + HUserID + "','" + HSubFuncID + "','" + HCaption + "','" + HType + "','" + HModelAtributos + "')"; |
| | | oCN.RunProc(sql); |
| | | } |
| | | } |
| | |
| | | //快捷方式自定义菜单:获取树组件数据 |
| | | [Route("Web/Xt_UserFastMenu_Init")] |
| | | [HttpGet] |
| | | public object Xt_UserFastMenu_Init(string HMakeName, string HType,string HModelAtributos) |
| | | public object Xt_UserFastMenu_Init(string HMakeName, string HType, string HModelAtributos) |
| | | { |
| | | try |
| | | { |
| | |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_Gy_GetBillInfoByHBillTypeAndHBillNo N'" + HBillType + "',N'" + HBillNo + |
| | | ds = oCN.RunProcReturn("exec h_p_Gy_GetBillInfoByHBillTypeAndHBillNo N'" + HBillType + "',N'" + HBillNo + |
| | | "'," + HStockOrgID, "h_p_Gy_GetBillInfoByHBillTypeAndHBillNo"); |
| | | |
| | | if (ds == null) |
| | |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else if((bool)ds.Tables[1].Rows[0]["returnType"] == false) |
| | | else if ((bool)ds.Tables[1].Rows[0]["returnType"] == false) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 小卫电器获取物料条码对应单据 |
| | | /// </summary> |
| | | /// <param name="sWhere">自定义过滤条件</param> |
| | | /// <param name="HBillType">单据号</param> |
| | | /// <param name="HSourceBillType">源单号</param> |
| | | /// <returns></returns> |
| | | [Route("web/XiaoWeiBarCodeQuery")] |
| | | [HttpGet] |
| | | public object XiaoWeiBarCodeQuery(string sWhere, int HBillType, int HSourceBillType) |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_XiaoWeiBarCodeQuery '" + sWhere + "'," + HBillType + "," + HSourceBillType, "h_p_XiaoWeiBarCodeQuery"); |
| | | |
| | | if(ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "该物料条码无对应的单据"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | }else |
| | | { |
| | | objjson.code = "1"; |
| | | objjson.count = 1; |
| | | objjson.Message = "获取成功!"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | |
| | | |
| | | |
| | | objjson.code = "1"; |
| | | objjson.count = 1; |
| | | objjson.Message = "获取成功!"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "获取失败" + ex.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |