public static DM_Intent_SubGroup GetDefault(int _id) { DM_Intent_SubGroup data = GetDefaultList(1).FirstOrDefault(p => p.DM_Intent_SubGroupID == _id); if (data == null) { data = new DM_Intent_SubGroup(); } return(data); }
public static void InitDefaultList(IList <DM_Intent_SubGroup> list_data) { _DefaultList = null; GetDefaultList(1); foreach (DM_Intent_SubGroup data in list_data) { DM_Intent_SubGroup checkdata = _DefaultList.FirstOrDefault(p => p.DM_Intent_SubGroupID == data.DM_Intent_SubGroupID); if (checkdata != null) { checkdata.DM_Intent_SubGroupDBID = data.DM_Intent_SubGroupDBID; checkdata.DM_Intent_SubGroupName = data.DM_Intent_SubGroupName; checkdata.DM_Intent_SubGroupDisable = data.DM_Intent_SubGroupDisable; } else { _DefaultList.Add(data); } } }