Пример #1
0
        public static DM_Intent_Request_SubGroup GetDefault(int _id)
        {
            DM_Intent_Request_SubGroup data = GetDefaultList(1).FirstOrDefault(p => p.DM_Intent_Request_SubGroupID == _id);

            if (data == null)
            {
                data = new DM_Intent_Request_SubGroup();
            }

            return(data);
        }
Пример #2
0
        public static void InitDefaultList(IList <DM_Intent_Request_SubGroup> list_data)
        {
            _DefaultList = null;
            GetDefaultList(1);

            foreach (DM_Intent_Request_SubGroup data in list_data)
            {
                DM_Intent_Request_SubGroup checkdata = _DefaultList.FirstOrDefault(p => p.DM_Intent_Request_SubGroupID == data.DM_Intent_Request_SubGroupID);
                if (checkdata != null)
                {
                    checkdata.DM_Intent_Request_SubGroupDBID    = data.DM_Intent_Request_SubGroupDBID;
                    checkdata.DM_Intent_Request_SubGroupName    = data.DM_Intent_Request_SubGroupName;
                    checkdata.DM_Intent_Request_SubGroupDisable = data.DM_Intent_Request_SubGroupDisable;
                }
                else
                {
                    _DefaultList.Add(data);
                }
            }
        }