private StoreManagerBaseViewModel[] SetArrayManagerBaseInfo(StoreManager[] arrStoreManager)
 {
     List<StoreManagerBaseViewModel> model = new List<StoreManagerBaseViewModel>();
     foreach (StoreManager sm in arrStoreManager)
     {
         StoreManagerBaseViewModel smbase = SetManagerBaseInfo(sm);          
         model.Add(smbase);                
     }
     return model.ToArray();
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the StoreManagers EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToStoreManagers(StoreManager storeManager)
 {
     base.AddObject("StoreManagers", storeManager);
 }
        private StoreManagerBaseViewModel SetManagerBaseInfo(StoreManager sm)
        {
            StoreManagerBaseViewModel smbase = new StoreManagerBaseViewModel();

            smbase.Id = sm.Id;
            smbase.Name = sm.Name;
            smbase.NameOfStore = sm.NameOfStore;
            smbase.Address = sm.Address;
            smbase.Town = sm.Town;
            smbase.Phone = sm.Phone;
            smbase.ManagerPhone = sm.ManagerPhone;
            smbase.Email = sm.EmailAlert;
            smbase.WebSite = sm.WebSite;

            smbase.Status = sm.StoreManagerState.Code.Trim() + " - " + sm.StoreManagerState.Name;
            smbase.StoreInternetAccessId = (int)sm.StoreInternetAccessId;//sm.InternetAccessRole.Code.Trim() + " - " + sm.InternetAccessRole.Name;
            
            if (sm.CreateDate == null) sm.CreateDate = new DateTime();
            smbase.CreateDate = (DateTime)sm.CreateDate;

            return smbase;
        }
 /// <summary>
 /// Create a new StoreManager object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 public static StoreManager CreateStoreManager(global::System.Int32 id)
 {
     StoreManager storeManager = new StoreManager();
     storeManager.Id = id;
     return storeManager;
 }