public override bool Equals(object obj) { ScmsMaterialBarcode another = obj as ScmsMaterialBarcode; if (another == null) { return(false); } else { return(this.HuId == another.HuId); } }
public virtual void UpdateScmsMaterialBarcode(ScmsMaterialBarcode entity) { entityDao.Update(entity); }
public virtual void DeleteScmsMaterialBarcode(ScmsMaterialBarcode entity) { entityDao.Delete(entity); }
//[Transaction(TransactionMode.Requires)] private void ProcessHuOut(ScmsTableIndex scmsTableIndex) { IList<Hu> huList = GetTransferHu(); if (huList != null && huList.Count > 0) { foreach (Hu hu in huList) { try { ScmsMaterialBarcode materialBarcode = scmsMaterialBarcodeMgr.LoadScmsMaterialBarcode(hu.HuId); if (materialBarcode == null) { materialBarcode = new ScmsMaterialBarcode(); materialBarcode.Flag = MesDssConstants.SCMS_MES_FLAG_SCMS_UPDATED; materialBarcode.HuId = hu.HuId; materialBarcode.ItemCode = hu.Item.Code; materialBarcode.ItemDesc = hu.Item.Desc1; materialBarcode.Qty = Convert.ToInt32(hu.Qty); scmsMaterialBarcodeMgr.CreateScmsMaterialBarcode(materialBarcode); } hu.TransferFlag = false; huMgr.UpdateHu(hu); } catch (Exception e) { log.Error(hu.HuId + " create exception", e); continue; } } } scmsTableIndexMgr.Complete(scmsTableIndex); }