Beispiel #1
0
 public AssetsLiabilitiesController()
 {
     assetsLiabilitiesB = new AssetsLiabilitiesB();
     categoriesB        = new CategoriesB();
     subCategoriesB     = new SubCategoriesB();
     accountB           = new AccountsB();
     userB = new UsersB();
 }
Beispiel #2
0
 public SalesController()
 {
     categoriesB        = new CategoriesB();
     subCategoriesB     = new SubCategoriesB();
     accountB           = new AccountsB();
     userB              = new UsersB();
     saleB              = new SalesB();
     assetsLiabilitiesB = new AssetsLiabilitiesB();
     clientsB           = new ClientsB();
     productsB          = new ProductsB();
     detailsB           = new DetailsB();
     invoicesB          = new InvoicesB();
     providersB         = new ProvidersB();
 }
Beispiel #3
0
        public IHttpActionResult Get(int id)
        {
            Users user = null;

            UsersB userB = new UsersB();

            user = userB.GetById(id);

            if (user == null)
            {
                return(Ok(false));
            }

            return(Ok(user));
        }
Beispiel #4
0
        public IHttpActionResult Get()
        {
            IList <Users> user = null;

            UsersB userB = new UsersB();

            user = userB.GetAll();

            if (user == null)
            {
                return(Ok(false));
            }

            return(Ok(user));
        }
Beispiel #5
0
        public App()
        {
            InitializeComponent();
            VersionTracking.Track();

            dbConnection = DependencyService.Get <ISQLite>().GetConnection();

            DeviceName   = DependencyService.Get <IDeviceInfo>().GetDeviceName();
            DeviceTypeID = DependencyService.Get <IDeviceInfo>().GetDeviceTypeID();
            AppVersion   = DependencyService.Get <IDeviceInfo>().GetAppVersion();
            OSVersion    = DependencyService.Get <IDeviceInfo>().GetOSVersion();

            UsersB      = new UsersB(dbConnection);
            EmbedTokenB = new EmbedTokenB(dbConnection);

            SecureStorage.SetAsync("AppID", "c771213b-070e-444b-b5d5-96abd042d923");
            SecureStorage.SetAsync("AppSecret", "kDO8WF5GuJo3u5qZKray_PZUE16M~b.fP-");
            SecureStorage.SetAsync("TenantID", "f47e4ba5-8a0e-4eaa-ac0b-5f12dee07155");


            if (CurrentUser != null)
            {
                if (CurrentUser.DeviceID == 0)
                {
                    MainPage = new Login();
                }
                else
                {
                    if (CurrentUser.DeviceStatus == DeviceStatus.Pending)
                    {
                        MainPage = new Confirmation();
                    }
                    else if (CurrentUser.DeviceStatus == DeviceStatus.Approved)
                    {
                        MainPage = new NavigationPage(new Reports());
                    }
                    else if (CurrentUser.DeviceStatus == DeviceStatus.Rejected)
                    {
                        MainPage = new Login();
                    }
                }
            }
            else
            {
                MainPage = new Login();
            }
        }
Beispiel #6
0
        public IHttpActionResult Post(Users users)
        {
            Users userCheck = null;

            UsersB userB = new UsersB();

            userCheck = userB.Check(users.Nickname, users.Password);

            switch (userCheck.ConfirmStatus)
            {
            case 200:
                return(Ok(userCheck));

            case 500:
                return(Ok(500));

            default:
                return(Ok(false));
            }
        }
Beispiel #7
0
 public LoginController()
 {
     userB = new UsersB();
     mailB = new MailsB();
 }
Beispiel #8
0
 public UsersController()
 {
     userB = new UsersB();
 }