1
沈泽
2021-10-25 be7d60d084799979d9b257eb3670b8998e3e58bc
WebAPI/Controllers/BaseSet/Xt_DataDictionary_ViewController.cs
@@ -114,7 +114,7 @@
        public object DeltetXt_DataDictionary_View(string HItemID)
        {
            DataSet ds;
            DataSet ds1;
            //DataSet ds1;
            try
            {
                //删除权限
@@ -146,15 +146,15 @@
                    objJsonResult.data = null;
                    return objJsonResult; ;
                }
                ds1 = oCN.RunProcReturn("Select HItemID from h_v_IF_DataDictionary_View  Where HParentID='" + HItemID + "'", "h_v_IF_DataDictionary_View");
                if (ds1.Tables[0].Rows.Count != 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "此项目存在子项目,不能删除!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //ds1 = oCN.RunProcReturn("Select HItemID from h_v_IF_DataDictionary_View  Where HParentID='" + HItemID + "'", "h_v_IF_DataDictionary_View");
                //if (ds1.Tables[0].Rows.Count != 0)
                //{
                //    objJsonResult.code = "0";
                //    objJsonResult.count = 0;
                //    objJsonResult.Message = "此项目存在子项目,不能删除!";
                //    objJsonResult.data = null;
                //    return objJsonResult;
                //}
               
              
                oCN.RunProc("delete from h_v_IF_DataDictionary_View where HItemID=" + HItemID);
@@ -322,7 +322,7 @@
                string msg1 = _value.ToString();
                string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
                string msg2 = sArray[0].ToString();
                string msg3 = sArray[1].ToString();
                //string msg3 = sArray[1].ToString();
                //string msg4 = sArray[2].ToString();
                //string msg5 = sArray[3].ToString();
                //反序列化
@@ -352,30 +352,29 @@
                ",HStopflag,HMakeTime,HMakeEmp,HModifyTime" +
                ",HModifyEmp" +
                ") " +
                " values(" + HModNameID + "," + HBillTypeID + "," + HBillTypeID + ",'" + HViewName + "','" + HViewCaption + "'" +
                " values(" + HModNameID + "," + HBillTypeID + ",'" + HViewName + "','" + HViewCaption + "'" +
               ",'" + HRemark + "'," + Convert.ToString(HStopflag ? 1 : 0) + "" +
                ",'" + HMakeTime + "','" + HMakeEmp + "','" + HModifyTime + "','" + HModifyEmp + "'" +
                ") ", ref DBUtility.ClsPub.sExeReturnInfo);
                    //修改上级为非末级代码
                    oCN.RunProc("Update Xt_DataDictionary_Table set HStopflag=0 where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo);
                    oCN.RunProc("Update Xt_DataDictionary_View set HStopflag=0 where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo);
                    oCN.Commit();
                }
                else
                {
                    oCN.BeginTran();
                    //主表
                    oCN.RunProc("Update Xt_DataDictionary_Table set " +
                    oCN.RunProc("Update Xt_DataDictionary_View set " +
                        " HModNameID= "+ HModNameID +
                        " HBillTypeID= " + HBillTypeID +
                        " HBillTypeID= " + HBillTypeID +
                        ",HViewName='" + HViewName + "'" +
                        ",HViewCaption='" + HViewCaption + "'" +
                        ",HRemark='" + HRemark + "'" +
                        ",HStopflag=" + Convert.ToString(HStopflag ? 1 : 0) +
                        ",HMakeTime='" + HMakeTime + "'" +
                        ",HMakeEmp='" + HMakeEmp + "'" +
                        ",HModifyTime='" + HModifyTime + "'" +
                        ",HModifyEmp='" + HModifyEmp + "'" +
                        ",HStopflag=" + Convert.ToString(HStopflag ? 1 : 0) +
                        //",HUpdater='" + HUpdater + "'" +
                        //",HUpdateDate= getdate()" +
                        ",HRemark= '" + HRemark + "' Where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo);