示例#1
0
 public AgentEditVM(ModelsShared.Models.Agent item)
 {
     this.CitySourceView = Common.ResourcesBase.GetMainWindowViewModel().CityCollection.SourceView;
     this.Address        = item.Address;
     this.ContactName    = item.ContactName;
     this.Email          = item.Email;
     this.Handphone      = item.Handphone;
     this.Id             = item.Id;
     this.Name           = item.Name;
     this.Phone          = item.Phone;
     this.CityID         = item.CityID;
     this.NPWP           = item.NPWP;
 }
        public CitiesAgentCanAccessVM(ModelsShared.Models.Agent selectedItem)
        {
            CloseWindowCommand = new CommandHandler {
                CanExecuteAction = x => true, ExecuteAction = CloseWindowAction
            };
            this.selectedItem = selectedItem;
            this.AgentName    = selectedItem.Name;

            if (selectedItem.Cityagentcanaccess == null)
            {
                selectedItem.Cityagentcanaccess = new List <CityAgentCanAccess>();
            }
            this.CitiesView = new List <Models.CityAgentCanAccessView>();
            GetCitiesAgentCanAccess();
        }