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

            if (another == null)
            {
                return(false);
            }
            else
            {
                return(this.Bom == another.Bom && this.ItemCode == another.ItemCode);
            }
        }
Esempio n. 2
0
        private void ProcessMesBomDetailOut(ScmsTableIndex scmsTableIndex)
        {
            IList<MesBom> bomList = GetTransferBom();
            if (bomList != null && bomList.Count > 0)
            {
                foreach (MesBom mesBom in bomList)
                {
                    try
                    {
                        IList<MesBomDetail> scmsBomDetailList = mesBomDetailMgr.GetBomDetailList(mesBom);
                        if (scmsBomDetailList != null && scmsBomDetailList.Count > 0)
                        {
                            foreach (MesBomDetail mesBomDetail in scmsBomDetailList)
                            {
                                ScmsBom scmsBom = scmsBomMgr.LoadScmsBom(mesBomDetail.Bom.Code, mesBomDetail.Item.Code);
                                if (scmsBom == null)
                                {
                                    scmsBom = new ScmsBom();
                                    scmsBom.Bom = mesBomDetail.Bom.Code;
                                    scmsBom.Flag = mesBomDetail.IsActive ? MesDssConstants.SCMS_MES_FLAG_SCMS_UPDATED : MesDssConstants.SCMS_MES_FLAG_SCMS_DELETE;
                                    scmsBom.ItemCode = mesBomDetail.Item.Code;
                                    scmsBom.LastModifyDate = DateTime.Now;
                                    scmsBom.LastModifyUser = userMgr.GetMonitorUser().Code;
                                    scmsBom.Qty = mesBomDetail.RateQty;

                                    scmsBomMgr.CreateScmsBom(scmsBom);
                                }
                                else
                                {
                                    //DJIN 20120817
                                    scmsBom.Flag = mesBomDetail.IsActive || !mesBomDetail.EndDate.HasValue ? MesDssConstants.SCMS_MES_FLAG_SCMS_UPDATED : MesDssConstants.SCMS_MES_FLAG_SCMS_DELETE;
                                    scmsBom.LastModifyDate = DateTime.Now;
                                    scmsBom.LastModifyUser = userMgr.GetMonitorUser().Code;
                                    scmsBom.Qty = mesBomDetail.RateQty;

                                    scmsBomMgr.UpdateScmsBom(scmsBom);
                                }
                            }
                        }
                        mesBom.TransferFlag = false;

                        mesBomMgr.UpdateBom(mesBom);

                    }
                    catch (Exception e)
                    {
                        log.Error(mesBom.Code + " create exception", e);
                        continue;
                    }
                }
            }

            scmsTableIndexMgr.Complete(scmsTableIndex);
        }
Esempio n. 3
0
 public virtual void DeleteScmsBom(ScmsBom entity)
 {
     entityDao.Delete(entity);
 }
Esempio n. 4
0
 public virtual void UpdateScmsBom(ScmsBom entity)
 {
     entityDao.Update(entity);
 }
Esempio n. 5
0
 public virtual void CreateScmsBom(ScmsBom entity)
 {
     entityDao.Create(entity);
 }