Exemplo n.º 1
0
 public static IBusinessLogicLayerPX GetUniqueInstance()
 {
     if (uniqueInstance == null)
     {
         uniqueInstance = new BusinessLogicLayerPXTest();
     }
     return(uniqueInstance);
 }
Exemplo n.º 2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Create your application here
            SetContentView(Resource.Layout.OrderList);

            bll = BLLBuilder.GetBLLClass();
        }
Exemplo n.º 3
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            // Get our button from the layout resource,
            // and attach an event to it
            //Button button = FindViewById<Button>(Resource.Id.myButton);

            //button.Click += delegate { button.Text = string.Format("{0} clicks!", count++); };

            logicConnection = BLLBuilder.GetBLLClass();
        }
Exemplo n.º 4
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Set our view from the "order" layout resource
            SetContentView(Resource.Layout.OrderLayout);

            // Create your application here
            bll = BLLBuilder.GetBLLClass();

            orderId = Intent.GetStringExtra("OrderId");

            if (orderId == null)
            {
                this.Finish();
            }

            // Create your application here
            bll = BLLBuilder.GetBLLClass();
        }
Exemplo n.º 5
0
        /// <summary>
        /// Checks the authentication.
        /// </summary>
        /// <param name="getResponse">Function to get the response from the server.</param>
        /// <param name="proc">Function to execute if the user is authenticated.</param>
        /// <exception cref="UnauthorizedAccessException">If user is not authenticated.</exception>
        /// TODO only throw exception when user is not authenticate (only one status code)
        public static void CheckAuthentication(GetResponse getResponse, AuthorizedProcedure proc, IBusinessLogicLayerPX bll)
        {
            var res = getResponse();

            var resultMessage = new { message = "" };

            var str = res.Content.ReadAsStringAsync().Result;

            resultMessage = JsonConvert.DeserializeAnonymousType(res.Content.ReadAsStringAsync().Result, resultMessage);

            if (!res.IsSuccessStatusCode)
            {
                bll.ResetUser();
                throw new UnauthorizedAccessException(resultMessage.message);
            }
            else
            {
                proc(res);
            }
        }