| | |
| | | #region 按钮设置 列表 |
| | | [Route("Xt_ModuleButtonSet_WMES/moduleButtonSetWMESList")] |
| | | [HttpGet] |
| | | public object moduleButtonSetWMESList(string HModName, string HBillType) |
| | | public object moduleButtonSetWMESList(string HModName, string HBillType, string HUserName) |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("select * from Xt_ModuleButtonSet where HModuleName='" + HModName + "' and HBillType='" + HBillType + "'", "Xt_ModuleButtonSet"); |
| | | ds = oCN.RunProcReturn("select * from Xt_ModuleButtonSet where HModuleName='" + HModName + "' and HBillType='" + HBillType + "' and HUserName='" + HUserName + "'", "Xt_ModuleButtonSet"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = ds.Tables[0].Rows.Count; |
| | |
| | | string HModuleName = sArray[4].ToString(); |
| | | string HBillType = sArray[5].ToString(); |
| | | string NoEditList = sArray[6].ToString(); |
| | | string HUserName = sArray[7].ToString(); |
| | | |
| | | try |
| | | { |
| | |
| | | List<noEditList> noEditLists= Newtonsoft.Json.JsonConvert.DeserializeObject<List<noEditList>>(NoEditList); |
| | | |
| | | //插入可编辑按钮的信息记录 |
| | | oCN.RunProc("delete from Xt_ModuleButtonSet where HModuleName= '" + HModuleName + "' and HBillType='" + HBillType + "'"); |
| | | oCN.RunProc("delete from Xt_ModuleButtonSet where HModuleName= '" + HModuleName + "' and HBillType='" + HBillType + "' and HUserName= '" + HUserName + "'"); |
| | | for (int i = 0; i < button.Count; i++) |
| | | { |
| | | for(int j = 0; j < HButtonIDLists.Count; j++) |
| | |
| | | { |
| | | HHideFlag = 1; |
| | | } |
| | | string sql = "exec h_p_Xt_ModuleButtonSet '" + HBillType + "','" + HModuleName + "','" + HButtonID + "','" + HButtonName + "'," + HOrder + "," + HHideFlag + "," + HEditFlag; |
| | | if(button[i].BtnID== "HideButton") //用户进行第一次设置时,设置 按钮设置 按钮为不可编辑且不隐藏 |
| | | { |
| | | HEditFlag = 0; |
| | | HHideFlag = 0; |
| | | } |
| | | string sql = "exec h_p_Xt_ModuleButtonSet '" + HBillType + "','" + HModuleName + "','" + HButtonID + "','" + HButtonName + "'," + HOrder + "," + HHideFlag + "," + HEditFlag + ",'" + HUserName + "'"; |
| | | oCN.RunProc(sql); |
| | | } |
| | | } |
| | |
| | | string HButtonID = noEditLists[i].HButtonID; |
| | | string HButtonName = noEditLists[i].HButtonName; |
| | | int HOrder = HOrderLists[j]; |
| | | string sql = "exec h_p_Xt_ModuleButtonSet '" + HBillType + "','" + HModuleName + "','" + HButtonID + "','" + HButtonName + "'," + HOrder + "," + HHideFlag + "," + HEditFlag; |
| | | string sql = "exec h_p_Xt_ModuleButtonSet '" + HBillType + "','" + HModuleName + "','" + HButtonID + "','" + HButtonName + "'," + HOrder + "," + HHideFlag + "," + HEditFlag + ",'" + HUserName + "'"; |
| | | oCN.RunProc(sql); |
| | | } |
| | | } |