private static List <HouseTypeGroupStandardItem> Get(string constructionCode, int houseTypeGroupId, string planNo) { var items = new List <HouseTypeGroupStandardItem>(); var siyoCode = tbl_siyo_boss.GetSiyoCode(constructionCode, planNo); if (IsUsingNew(constructionCode, siyoCode)) { var newItems = HouseTypeGroupStandardItems_New.Get(houseTypeGroupId); newItems.ForEach(p => items.Add(Convert(p))); } else { var oldItems = HouseTypeGroupStandardItems_Old.Get(houseTypeGroupId); oldItems.ForEach(p => items.Add(Convert(p))); var isHotaru0 = BasicSpecificationDetail.IsISmartICubeISmileIPaletteIHead4(constructionCode, siyoCode); if (isHotaru0) { var hotaruItems = items.FindAll(p => p.ItemName == "House_ƒzƒ^ƒ‹"); hotaruItems.ForEach(p => p.Quantity = 0); } } return(items); }
public static List <HouseTypeGroupStandardItems_Old> Get(int houseTypeGroupId) { string sql = string.Empty; sql = @"SELECT * FROM HouseTypeGroupStandardItems_Old WHERE HouseTypeGroupId = " + houseTypeGroupId.ToString(); var db = HouseTypeGroupStandardItems_Old.GetDatabase(); return(db.ExecuteQuery <HouseTypeGroupStandardItems_Old>(sql)); }
private static HouseTypeGroupStandardItem Convert(HouseTypeGroupStandardItems_Old source) { var item = new HouseTypeGroupStandardItem(); item.HouseTypeGroupId = source.HouseTypeGroupId; item.ItemName = source.ItemName; item.Quantity = source.Quantity; item.UpdatedDateTime = source.UpdatedDateTime; return(item); }