Exemplo n.º 1
0
 public static BranchCard CreateBranchCard(SystemCard systemCard)
 {
     var branchCard = new BranchCard();
     branchCard.ID = systemCard.ID;
     branchCard.Action = systemCard.Action;
     branchCard.CardName = systemCard.CardName;
     return branchCard;
 }
Exemplo n.º 2
0
 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;
 }