public static BranchCard CreateBranchCard(SystemCard systemCard) { var branchCard = new BranchCard(); branchCard.ID = systemCard.ID; branchCard.Action = systemCard.Action; branchCard.CardName = systemCard.CardName; return branchCard; }
public static ShowCard CreateShowCard(SystemCard systemCard, IEnumerable<Branch> branches) { var showCard = new ShowCard(); showCard.ID = systemCard.ID; showCard.CardName = systemCard.CardName; showCard.Action = systemCard.Action; showCard.BranchId = systemCard.BranchId; var branch = branches.FirstOrDefault(x => x.ID == showCard.BranchId); if (!branch.Null()) { showCard.BranchName = branch.Title; } return showCard; }