| | |
| | | ds = oCN.RunProcReturn(sql, "h_v_Gy_EquipFileMainList"); |
| | | } |
| | | |
| | | //if (ds.Tables[0].Rows.Count != 0 || ds != null) |
| | | //{ |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | //} |
| | | //else |
| | | //{ |
| | | //objJsonResult.code = "0"; |
| | | //objJsonResult.count = 0; |
| | | //objJsonResult.Message = "无数据"; |
| | | //objJsonResult.data = null; |
| | | //return objJsonResult; |
| | | //} |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | return objJsonResult; |
| | | } |
| | | DLL.ClsGy_EquipFileMain oBill = new DLL.ClsGy_EquipFileMain(); |
| | | if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) |
| | | ds = oCN.RunProcReturn("select * from Gy_EquipFileBillMain where HInterID=" + HItemID, "Gy_EquipFileBillMain"); |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | if (int.Parse(ds.Tables[0].Rows[0]["HBillStatus"].ToString()) > 1) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "单据当前处于不能删除状态!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | oCN.RunProc("Delete From Gy_EquipFileBillMain where HInterID=" + lngBillKey); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | |
| | | string HLogo = list[0].HLogo; //√ varchar(50) //品牌 |
| | | int HSellSupID = list[0].HSellSupID; // √ int //供应商(Gy_Supplier) |
| | | int HMakeSupID = list[0].HMakeSupID; // int //制造商 (Gy_Supplier) |
| | | string HMainSourceFlag = list[0].HMainSourceFlag; //varchar(10) //是否主生产设备(否,是) |
| | | string HMacAddress = list[0].HMacAddress; // varchar(50) //数采物理地址 |
| | | string HMaker = msg4; |
| | | string HMakeDate = DateTime.Now.Date.ToString(); |
| | | int HEquipDotCheckRuleInterID = list[0].HEquipDotCheckRuleInterID; |
| | |
| | | oCN.RunProc("Insert into Gy_EquipFileBillMain " + |
| | | " (hbillno,HEquipFileNumber,HEquipFileNo,HName,HModel,HModel2,HMaterID,HUnitID,HOutComDate" + |
| | | ",HOutComNo,HDeptID,HUseEmpID,HRepairEmpID,HAddress,HSetupDate,HStartupDate,HStatus," + |
| | | "HEquipFileTypeID,HProNum,HBarCode,HWorkArea,HLogo,HSellSupID,HMakeSupID,hbilltype,HDate,HYear,HMaker,HMakeDate,HEquipMaintainRuleInterID,HEquipDotCheckRuleInterID,HSourceID) " + |
| | | "HEquipFileTypeID,HProNum,HBarCode,HWorkArea,HLogo,HSellSupID,HMakeSupID,hbilltype,HDate,HYear,HMaker,HMakeDate,HEquipMaintainRuleInterID,HEquipDotCheckRuleInterID,HSourceID,HMainSourceFlag,HMacAddress) " + |
| | | " Values('" + hbillno + "','" + HEquipFileNumber + "','" + HEquipFileNo + "','" + HName + "','" + HModel + "','" + HModel2 + "'," + HMaterID + "," + HUnitID + |
| | | ",'" + HOutComDate + "','" + HOutComNo + "'," + HDeptID + "," + HUseEmpID + "," + HRepairEmpID + ",'" + HAddress + |
| | | "','" + HSetupDate + "','" + HStartupDate + "','" + HStatus + "'," + HEquipFileTypeID + ",'" + HProNum + |
| | | "','" + HBarCode + "','" + HWorkArea + "','" + HLogo + "'," + HSellSupID + "," + HMakeSupID + ",'3308','" + HDate + "','" + HYear + "','" + HMaker + "','" + HMakeDate + "','" + HEquipMaintainRuleInterID + "','" + HEquipDotCheckRuleInterID +"'," + HSourceID + ")", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | "','" + HBarCode + "','" + HWorkArea + "','" + HLogo + "'," + HSellSupID + "," + HMakeSupID + ",'3308','" + HDate + "','" + HYear + "','" + HMaker + "','" + HMakeDate + "','" + HEquipMaintainRuleInterID + "','" + HEquipDotCheckRuleInterID +"'," + HSourceID + ",'" + HMainSourceFlag + "','" + HMacAddress + "')", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //修改上级为非末级代码 |
| | | oCN.Commit(); |
| | | objJsonResult.code = "1"; |
| | |
| | | string HLogo = list[0].HLogo; //√ varchar(50) //品牌 |
| | | int HSellSupID = list[0].HSellSupID; // √ int //供应商(Gy_Supplier) |
| | | int HMakeSupID = list[0].HMakeSupID; // int //制造商 (Gy_Supplier) |
| | | string HMainSourceFlag = list[0].HMainSourceFlag; //varchar(10) //是否主生产设备(否,是) |
| | | string HMacAddress = list[0].HMacAddress; // varchar(50) //数采物理地址 |
| | | string HUpDater = msg4; |
| | | string HUpDateDate = DateTime.Now.Date.ToString(); |
| | | int HEquipDotCheckRuleInterID = list[0].HEquipDotCheckRuleInterID; |
| | |
| | | ",HLogo='" + HLogo + "'" + |
| | | ",HSellSupID=" + HSellSupID + |
| | | ",HMakeSupID= " + HMakeSupID + |
| | | ",HUpDater= '" + HUpDater + "'" + |
| | | ",HUpDater= '" + HUpDater + "'" + |
| | | ",HUpDateDate= '" + HUpDateDate + "'" + |
| | | ",HEquipDotCheckRuleInterID='" + HEquipDotCheckRuleInterID + "'" + |
| | | ",HEquipMaintainRuleInterID='" + HEquipMaintainRuleInterID + "'" + |
| | | ",HSourceID='" + HSourceID + "'" + |
| | | ",HMainSourceFlag= '" + HMainSourceFlag + "'" + |
| | | ",HMacAddress= '" + HMacAddress + "'" + |
| | | " Where HInterID=" + HInterID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //修改子项目代码 |
| | | //oCN.RunProc("exec h_p_Gy_UpdateNumber Gy_RepairCheck,'" + HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo); |