コード例 #1
0
ファイル: Donate.xaml.cs プロジェクト: muhaym/BloodDonate
        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");
            }
        }
コード例 #2
0
ファイル: RollImageNews.xaml.cs プロジェクト: jjg0519/OA
        public RollImageNews()
        {
            InitializeComponent();
            servers = new BasicServices();
            client  = servers.PlatformClient;

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

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

            RegisterEvent();
        }
コード例 #6
0
ファイル: NewsServices.cs プロジェクト: jjg0519/OA
        public NewsServices()
        {
            servers        = new BasicServices();
            client         = servers.PlatformClient;
            callBackClient = servers.CallBackClient;
            publicWS       = new Saas.Tools.PublicInterfaceWS.PublicServiceClient();

            RegisterServices();
        }
コード例 #7
0
 public void Cleanup()
 {
     _refdateTimer.Tick -= _refdateTimer_Tick;
     _refdateTimer.Stop();
     _refdateTimer = null;
     //非双工客户端
     client = null;
     //基础服务通讯
     services = null;
 }
コード例 #8
0
ファイル: NewsShow.xaml.cs プロジェクト: jjg0519/OA
 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);
 }
コード例 #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();
            }
        }
コード例 #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);
            }
        }
コード例 #11
0
 public AdminController(AdminServices AdminServices, BasicServices BasicServices)
 {
     _adminServices = AdminServices;
     _basicServices = BasicServices;
 }
コード例 #12
0
ファイル: HomeController.cs プロジェクト: mdivani/MobileStore
 public HomeController(BasicServices BasicServices)
 {
     _basicServices = BasicServices;
 }