private StoreManagerInformationViewModel SetInformationModel(StoreManager curSM)
        {
            StoreManagerInformationViewModel model = new StoreManagerInformationViewModel();
            
            // Manager Information
            model.Manager = new ManagerInformation();

            model.Manager.Name = curSM.Name;

            model.Manager.Username = curSM.Username;
            model.Manager.Password = curSM.Password;

            model.Manager.NameOfStore = curSM.NameOfStore;
            model.Manager.ManagerPhone = curSM.ManagerPhone;

            model.Manager.Address = curSM.Address;
            model.Manager.Address2 = curSM.Address2;

            model.Manager.Phone = curSM.Phone;
            model.Manager.Phone2 = curSM.Phone2;

            model.Manager.City = curSM.City.Name;
            model.Manager.Country = curSM.Country;

            model.Manager.EmailAlert = curSM.EmailAlert;
            model.Manager.EmailBill = curSM.EmailBill;

            model.Manager.NameOfCompany = curSM.NameOfCompany;
            model.Manager.VATNumber = curSM.VATNumber;

            // List StoreUser Information
            StoreUser[] arrStoreUser = StoreUserBUS.GetList(curSM.Id);
            List<UserInformation> lstUser = new List<UserInformation>();

            foreach (StoreUser u in arrStoreUser)
            {
                UserInformation newUserPhone = new UserInformation();
                
                newUserPhone.Email = u.Email;
                newUserPhone.LastTransaction = "...";
                newUserPhone.Name = u.Name;
                newUserPhone.Password = u.Password;
                newUserPhone.Phone = u.Phone;
                newUserPhone.PINStore = u.PINStore;
                newUserPhone.Status = u.StoreUserState.Code + " - " + u.StoreUserState.Description;

                lstUser.Add(newUserPhone);
            }

            model.ArrUser = lstUser.ToArray();

            return model;
        }
 public ActionResult AskToBePartner(StoreManager model)
 {
     return View();
 }
        private StoreManagerDashboardViewModel SetDashBoardModel(StoreManager curSM)
        {
            StoreManagerDashboardViewModel model = new StoreManagerDashboardViewModel();
            model.Id = curSM.Id;
            model.Name = curSM.Name;
            model.Status = StoreManagerStateBUS.GetCode((int)curSM.StatusId);
            model.TotalLastMonthAmount = StoreManagerBUS.GetTotalLastMonthAmount(curSM.Id);
            model.TotalTransaction = StoreManagerBUS.GetTotalLastMonthTransaction(curSM.Id);

            if (curSM.LastCollectDate != null)
            {
                model.LastCollectDate = (DateTime)curSM.LastCollectDate;
            }
            return model;
        }
 /// <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);
 }
 /// <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;
 }
 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();
 }
        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;
        }