void ParseBizHours(Period Hours, out biz_hours tBizTime) { tBizTime = null; if (Hours.close.day != Hours.open.day) { return; } tBizTime = new biz_hours(); tBizTime.day_of_week = Hours.open.day; tBizTime.start_time = Hours.open.time; tBizTime.end_time = Hours.close.time; }
private bool processBizHours(List <Period> tTime, ref merchant Merchant) { Merchant.biz_hours = new List <biz_hours>(); foreach (Period tPeriod in tTime) { biz_hours tHours = new biz_hours(); tHours.day_of_week = tPeriod.open.day; tHours.start_time = tPeriod.open.time; tHours.end_time = tPeriod.close.time; tHours.merchant_id = Merchant.id; Merchant.biz_hours.Add(tHours); } return(true); }