コード例 #1
0
ファイル: PersonMinMax.cs プロジェクト: 5509850/baumax
        public static bool IsIntersectByYearAndWorld(PersonMinMax a, PersonMinMax b)
        {
            if (a == null || b == null) throw new NullReferenceException();
            bool isintersect = false;

            if (a.ID != b.ID)// don't compare with self
            {
                if (a.Year == b.Year && a.Store_WorldID == b.Store_WorldID)
                {
                    isintersect = true;
                }
            }

            return isintersect;
        }
コード例 #2
0
        public static bool IsIntersectByYearAndWorld(PersonMinMax a, PersonMinMax b)
        {
            if (a == null || b == null)
            {
                throw new NullReferenceException();
            }
            bool isintersect = false;

            if (a.ID != b.ID)// don't compare with self
            {
                if (a.Year == b.Year && a.Store_WorldID == b.Store_WorldID)
                {
                    isintersect = true;
                }
            }

            return(isintersect);
        }
コード例 #3
0
ファイル: UCWorldMinMaxEntity.cs プロジェクト: 5509850/baumax
        public override bool Commit()
        {
            if (IsModified())
            {
                try
                {

                    PersonMinMax newentity = new PersonMinMax();
                    PersonMinMax.CopyTo(PersonMinMax, newentity);
                    newentity.Year = Year;
                    newentity.Max = PersonMax;
                    newentity.Min = PersonMin;
                    newentity = ClientEnvironment.PersonMinMaxService.SaveOrUpdate(newentity);
                    PersonMinMax.CopyTo(newentity, PersonMinMax);
                    Modified = true;
                }
                catch (Exception ex)
                {
                    XtraMessageBox.Show(ex.Message);
                    return false;
                }
            }
            return true;
        }