1
black-goat-me
2023-05-23 1664e7f3b3ef38ecf01afb098512c733315c4d10
WebAPI/Controllers/BaseSet/Xt_grdAlignment_WMESController.cs
@@ -27,7 +27,21 @@
        {
            try
            {
                ds = oCN.RunProcReturn("select * from  Xt_grdAlignment_WMES where HModName='" + HModName + "' and HUserName='" + user + "'", "Xt_grdAlignment_WMES");
                if (ds.Tables[0].Rows.Count == 0)
                {
                    ds = oCN.RunProcReturn("select * from  Xt_grdAlignment_WMES where HModName='" + HModName + "' and (HUserName='admin' or HUserName='Admin')", "Xt_grdAlignment_WMES");
                    if (ds.Tables[0].Rows.Count == 0) {
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "Sucess!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
@@ -144,6 +158,48 @@
        #endregion
        #region 隐藏列设置  删除
        [Route("Xt_grdAlignment_WMES/DelgrdAlignmentWMES")]
        [HttpGet]
        public object DelgrdAlignmentWMES(string HModName, string user)
        {
            try
            {
                ds = oCN.RunProcReturn("select * from  Xt_grdAlignment_WMES where HModName='" + HModName + "' and HUserName='" + user + "'", "Xt_grdAlignment_WMES");
                if (ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "此人无模块数据!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                oCN.BeginTran();
                oCN.RunProc("delete from Xt_grdAlignment_WMES where HModName='" + HModName + "' and HUserName='" + user + "'");
                oCN.Commit();
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "删除成功!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region 按钮设置 列表
        [Route("Xt_ModuleButtonSet_WMES/moduleButtonSetWMESList")]