Inheritance: EntityBase
Esempio n. 1
0
        public override bool Equals(object obj)
        {
            ScmsPart another = obj as ScmsPart;

            if (another == null)
            {
                return(false);
            }
            else
            {
                return(this.Code == another.Code);
            }
        }
Esempio n. 2
0
 public virtual void UpdateScmsPart(ScmsPart entity)
 {
     entityDao.Update(entity);
 }
Esempio n. 3
0
 public virtual void CreateScmsPart(ScmsPart entity)
 {
     entityDao.Create(entity);
 }
Esempio n. 4
0
 public virtual void DeleteScmsPart(ScmsPart entity)
 {
     entityDao.Delete(entity);
 }
Esempio n. 5
0
        //[Transaction(TransactionMode.Requires)]
        private void ProcessItemOut(ScmsTableIndex scmsTableIndex)
        {
            IList<Item> itemList = GetTransferItem();
            if (itemList != null && itemList.Count > 0)
            {
                foreach (Item item in itemList)
                {
                    try
                    {
                        ScmsPart scmsPart = scmsPartMgr.LoadScmsPart(item.Code);
                        if (scmsPart == null)
                        {
                            scmsPart = new ScmsPart();
                            scmsPart.Code = item.Code;
                            scmsPart.Des = item.Description;
                            scmsPart.Uom = item.Uom.Code;
                            scmsPart.LastModifyDate = item.LastModifyDate;
                            scmsPart.LastModifyUser = item.LastModifyUser.Code;
                            scmsPart.Flag = MesDssConstants.SCMS_MES_FLAG_SCMS_UPDATED;
                            scmsPartMgr.CreateScmsPart(scmsPart);
                        }
                        else
                        {
                            scmsPart.Des = item.Description;
                            scmsPart.Uom = item.Uom.Code;
                            scmsPart.LastModifyDate = item.LastModifyDate;
                            scmsPart.LastModifyUser = item.LastModifyUser.Code;
                            scmsPart.Flag = MesDssConstants.SCMS_MES_FLAG_SCMS_UPDATED;
                            scmsPartMgr.UpdateScmsPart(scmsPart);
                        }

                        item.TransferFlag = false;
                        itemMgr.UpdateItem(item);
                    }
                    catch (Exception e)
                    {
                        log.Error(item.Code + " create exception", e);
                        continue;
                    }
                }
            }

            scmsTableIndexMgr.Complete(scmsTableIndex);
        }