Example #1
0
        async void Handle_Clicked(object sender, System.EventArgs e)
        {
            if (await CrossConnectivity.Current.IsRemoteReachable("http://www.google.com"))
            {
                var Donor = new Donors();
                Donor.Group        = Group.SelectedItem as string;
                Donor.Name         = Name.Text;
                Donor.MobileNumber = Mobile.Text;
                if (place != null)
                {
                    Donor.Latitude  = place.Coordinates.Latitude;
                    Donor.Longitude = place.Coordinates.Longitude;
                }
                if (string.IsNullOrWhiteSpace(Donor.Group))
                {
                    await DisplayAlert("Error", "Group not mentioned", "OK");
                }
                var res = await BasicServices.AddBloodAsync(Donor);

                if (res.data)
                {
                    await DisplayAlert("Success", res.Message, "OK");
                }
                else
                {
                    await DisplayAlert("Error", res.Message, "OK");
                }
            }
            else
            {
                await DisplayAlert("Error", "No Internet", "OK");
            }
        }
Example #2
0
        public RollImageNews()
        {
            InitializeComponent();
            servers = new BasicServices();
            client  = servers.PlatformClient;

            InitTop();
        }
Example #3
0
 public NewsServices()
 {
     servers    = new BasicServices();
     client     = servers.PlatformClient;
     publicWS   = new Saas.Tools.PublicInterfaceWS.PublicServiceClient();
     fileClient = new Saas.Tools.NewFileUploadWS.UploadServiceClient();
     RegisterServices();
 }
Example #4
0
        private void RegiestServices()
        {
            if (services == null)
            {
                services = new BasicServices();
            }

            client = services.PlatformClient;
        }
Example #5
0
        /// <summary>
        /// 展示新闻界面
        /// </summary>
        public NewsView()
        {
            InitializeComponent();
            services = new BasicServices();
            client   = services.PlatformClient;
            //ctrUpload.MaxSize = 512000;

            RegisterEvent();
        }
Example #6
0
        public NewsServices()
        {
            servers        = new BasicServices();
            client         = servers.PlatformClient;
            callBackClient = servers.CallBackClient;
            publicWS       = new Saas.Tools.PublicInterfaceWS.PublicServiceClient();

            RegisterServices();
        }
Example #7
0
 public void Cleanup()
 {
     _refdateTimer.Tick -= _refdateTimer_Tick;
     _refdateTimer.Stop();
     _refdateTimer = null;
     //非双工客户端
     client = null;
     //基础服务通讯
     services = null;
 }
Example #8
0
 public NewsShow()
 {
     InitializeComponent();
     rtbContent.HideHeadToolbars();
     services = new BasicServices();
     publicWS = new Saas.Tools.PublicInterfaceWS.PublicServiceClient();
     client   = services.PlatformClient;
     client.GetNewsModelByIDCompleted += new EventHandler <GetNewsModelByIDCompletedEventArgs>(client_GetNewsModelByIDCompleted);
     publicWS.GetContentCompleted     += new EventHandler <Saas.Tools.PublicInterfaceWS.GetContentCompletedEventArgs>(publicWS_GetContentCompleted);
 }
Example #9
0
        private void RegiestServices()
        {
            if (services == null)
            {
                services = new BasicServices();
            }

            client         = services.PlatformClient;
            callbackClient = services.CallBackClient;
            if (callbackClient != null)
            {
                callbackClient.ReceiveReceived += new EventHandler <ReceiveReceivedEventArgs>(CallBackClient_ReceiveReceived);
                callbackClient.LoginCompleted  += new EventHandler <System.ComponentModel.AsyncCompletedEventArgs>(CallBackClient_LoginCompleted);
                callbackClient.LoginAsync();
            }
        }
Example #10
0
        public RollNewsViewModel()
        {
            if (services == null)
            {
                services = new BasicServices();
            }
            client = services.PlatformClient;

            if (client != null)
            {
                //client.GetNewsListByParamsCompleted += new EventHandler<GetNewsListByParamsCompletedEventArgs>(client_GetNewsListByParamsCompleted);
                //client.GetNewsListByParamsAsync("0|1", 10, "1");
                client.GetNewsListByEmployeeIDCompleted += new EventHandler <GetNewsListByEmployeeIDCompletedEventArgs>(client_GetNewsListByEmployeeIDCompleted);
                //client.GetNewsListByEmployeeIDAsync("0|1", 10, "1", SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID);
            }
        }
Example #11
0
 public AdminController(AdminServices AdminServices, BasicServices BasicServices)
 {
     _adminServices = AdminServices;
     _basicServices = BasicServices;
 }
Example #12
0
 public HomeController(BasicServices BasicServices)
 {
     _basicServices = BasicServices;
 }