| | |
| | | //å代ç ç¨äº æ¿æ¢åé¡¹ç® |
| | | public string HOldNumber; |
| | | public List<Model.ClsGy_MatePriceSup_Model> DetailColl = new List<Model.ClsGy_MatePriceSup_Model>(); |
| | | public Model.ClsGy_MatePriceSup_Model oModel = new Model.ClsGy_MatePriceSup_Model(); |
| | | |
| | | |
| | | |
| | |
| | | try |
| | | { |
| | | oCn.BeginTran(); |
| | | //æå
¥å表 |
| | | foreach (Model.ClsGy_MatePriceSup_Model oSub in DetailColl) |
| | | { |
| | | oCn.RunProc("Insert into Gy_MatePriceSup " + |
| | | " (HInterID,HEntryID,HMaterID,HRelationID" + |
| | | //æå
¥è¡¨ |
| | | //foreach (Model.ClsGy_MatePriceSup_Model oSub in DetailColl) |
| | | //{ |
| | | // oCn.RunProc("Insert into Gy_MatePriceSup " + |
| | | // " (HInterID,HEntryID,HMaterID,HRelationID" + |
| | | // ",HUnitID,HBeginQty,HEndQty,HCurID,HType" + |
| | | // ",HPrice,HBeginDate,HEndDate,HUsed,HRemark,HMaker,HMakeDate)" + |
| | | // " values(" + oSub.HInterID.ToString() + "," + oSub.HEntryID.ToString() + "," + oSub.HMaterID.ToString() + "," + oSub.HRelationID.ToString() + |
| | | // "," + oSub.HUnitID.ToString() + "," + oSub.HBeginQty.ToString() + "," + oSub.HEndQty.ToString() + "," + oSub.HCurID.ToString() + ",'" + oSub.HType + "'" + |
| | | // "," + oSub.HPrice.ToString() + ",'" + "GETDATE()" + "','" + "GETDATE()" + "'," + Convert.ToString(oSub.HUsed ? 1 : 0) + ",'" + oSub.HRemark + "','" + oSub.HMaker + "','" + oSub.HMakeDate + "') "); |
| | | //} |
| | | oCn.RunProc("Insert into " + MvarItemKey + " " + |
| | | " (HInterID,HEntryID,HMaterID,HRelationID" + |
| | | ",HUnitID,HBeginQty,HEndQty,HCurID,HType" + |
| | | ",HPrice,HBeginDate,HEndDate,HUsed,HRemark,HMaker,HMakeDate)" + |
| | | " values(" + oSub.HInterID.ToString() + "," + oSub.HEntryID.ToString() + "," + oSub.HMaterID.ToString() + "," + oSub.HRelationID.ToString() + |
| | | "," + oSub.HUnitID.ToString() + "," + oSub.HBeginQty.ToString() + "," + oSub.HEndQty.ToString() + "," + oSub.HCurID.ToString() + ",'" + oSub.HType + "'" + |
| | | "," + oSub.HPrice.ToString() + ",'" + oSub.HBeginDate + "','" + oSub.HEndDate + "'," + Convert.ToString(oSub.HUsed ? 1 : 0) + ",'" + oSub.HRemark + "','" + oSub.HMaker + "','" + oSub.HMakeDate + "') "); |
| | | } |
| | | ",HPrice,HBeginDate,HEndDate,HUsed,HRemark,HMaker,HMakeDate) " + |
| | | " values(" + oModel.HInterID.ToString() + "," + oModel.HEntryID.ToString() + "," + oModel.HMaterID.ToString() + "," + oModel.HRelationID.ToString() + |
| | | "," + oModel.HUnitID.ToString() + "," + oModel.HBeginQty.ToString() + "," + oModel.HEndQty.ToString() + "," + oModel.HCurID.ToString() + ",'" + oModel.HType + "'" + |
| | | "," + oModel.HPrice.ToString() + ",'" + oModel.HBeginDate + "','" + oModel.HEndDate + "'," + oModel.HUsed + ",'" + oModel.HRemark + "','" + oModel.HMaker + "','" + oModel.HMakeDate + "') "); |
| | | //ä¿®æ¹ä¸çº§ä¸ºéæ«çº§ä»£ç |
| | | //oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | |
| | | try |
| | | { |
| | | oCn.BeginTran(); |
| | | DeleteByID(sItemID); //å é¤è®°å½ |
| | | //æå
¥è¡¨ |
| | | foreach (Model.ClsGy_MatePriceSup_Model oSub in DetailColl) |
| | | { |
| | | oCn.RunProc("Insert into Gy_MatePriceSup " + |
| | | " (HInterID,HEntryID,HMaterID,HRelationID" + |
| | | ",HUnitID,HBeginQty,HEndQty,HCurID,HType" + |
| | | ",HPrice,HBeginDate,HEndDate,HUsed,HRemark,HMaker,HMakeDate)" + |
| | | " values(" + oSub.HInterID.ToString() + "," + oSub.HEntryID.ToString() + "," + oSub.HMaterID.ToString() + "," + oSub.HRelationID.ToString() + |
| | | "," + oSub.HUnitID.ToString() + "," + oSub.HBeginQty.ToString() + "," + oSub.HEndQty.ToString() + "," + oSub.HCurID.ToString() + ",'" + oSub.HType + "'" + |
| | | "," + oSub.HPrice.ToString() + ",'" + oSub.HBeginDate + "','" + oSub.HEndDate + "'," + Convert.ToString(oSub.HUsed ? 1 : 0) + ",'" + oSub.HRemark + "','" + oSub.HMaker + "','" + oSub.HMakeDate + "') "); |
| | | } |
| | | oCn.RunProc("Update " + MvarItemKey + " set " + |
| | | " HPrice='" + oModel.HPrice + "'" + |
| | | ",HRemark='" + oModel.HRemark + "'" + |
| | | ",HMaterID=" + oModel.HMaterID.ToString() + |
| | | ",HUnitID=" + oModel.HUnitID.ToString() + |
| | | ",HCurID=" + oModel.HCurID.ToString() + |
| | | " Where HItemID=" + sItemID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //DeleteByID(sItemID); //å é¤è®°å½ |
| | | ////æå
¥è¡¨ |
| | | //foreach (Model.ClsGy_MatePriceSup_Model oSub in DetailColl) |
| | | //{ |
| | | // oCn.RunProc("Insert into Gy_MatePriceSup " + |
| | | // " (HInterID,HEntryID,HMaterID,HRelationID" + |
| | | // ",HUnitID,HBeginQty,HEndQty,HCurID,HType" + |
| | | // ",HPrice,HBeginDate,HEndDate,HUsed,HRemark,HMaker,HMakeDate)" + |
| | | // " values(" + oSub.HInterID.ToString() + "," + oSub.HEntryID.ToString() + "," + oSub.HMaterID.ToString() + "," + oSub.HRelationID.ToString() + |
| | | // "," + oSub.HUnitID.ToString() + "," + oSub.HBeginQty.ToString() + "," + oSub.HEndQty.ToString() + "," + oSub.HCurID.ToString() + ",'" + oSub.HType + "'" + |
| | | // "," + oSub.HPrice.ToString() + ",'" + oSub.HBeginDate + "','" + oSub.HEndDate + "'," + Convert.ToString(oSub.HUsed ? 1 : 0) + ",'" + oSub.HRemark + "','" + oSub.HMaker + "','" + oSub.HMakeDate + "') "); |
| | | //} |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | |
| | | { |
| | | MvarItemKey = "Gy_MatePriceSup"; |
| | | MvarReportTitle = "éè´ä»·æ ¼èµæè®¾ç½®"; |
| | | oModel = new Model.ClsGy_MatePriceSup_Model(); |
| | | } |
| | | } |
| | | } |