public static BE.BankBranch Clone(this BE.BankBranch original) { BE.BankBranch target = new BE.BankBranch(); target.BankNumber = original.BankNumber; target.BankName = original.BankName; target.BranchNumber = original.BranchNumber; target.BranchAddress = original.BranchAddress; target.BranchCity = original.BranchCity; return(target); }
private void BankBranch_CB_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (this.BankBranch_CB.SelectedItem is BE.BankBranch) { BE.BankBranch branch = ((BE.BankBranch) this.BankBranch_CB.SelectedItem).GetCopy(); bank.BankName = branch.BankName; bank.BranchAddress = branch.BankName; bank.BranchCity = branch.BranchCity; bank.BranchNumber = branch.BranchNumber; } }