public Task <int> DeleteItem(RegEntity id)
 {
     lock (locker)
     {
         return(database.DeleteAsync(id));
     }
 }
        public async void getWebRemote(string device_id)
        {
            try
            {
                DEVICE_ID = device_id;

                string    userURLName = "";
                RegEntity userDetail  = await App.Database.GetItemFirst();

                if (userDetail != null)
                {
                    userURLName = userDetail.Url;
                }

                string url_name = userURLName;
                webView.HeightRequest = 1000;
                webView.WidthRequest  = 1000;
                string remote_url = "http://" + url_name + ".cloudschool.management/itcrm/admin/remoteZ/Ex?device=" + device_id;

                webView.Source = remote_url;
            }
            catch (Exception e)
            {
                Debug.WriteLine(e.Message);
            }
        }
Esempio n. 3
0
        public async void LoadCred()
        {
            RegEntity userDetail = await App.Database.GetItemFirst();

            if (userDetail != null)
            {
                TxtUrl.Text = userDetail.Url;
            }
        }
Esempio n. 4
0
        public async void getSchoolName()
        {
            RegEntity userDetail = await App.Database.GetItemFirst();

            if (userDetail != null)
            {
                school_name = userDetail.school_name;

                api_url = userDetail.CompleteUrl;
            }
        }
Esempio n. 5
0
        public async void SaveCred()
        {
            RegEntity userDetail = await App.Database.GetItemFirst();

            if (userDetail == null)
            {
                RegEntity OReg = new RegEntity();
                OReg.Url         = TxtUrl.Text;
                OReg.CompleteUrl = "https://" + TxtUrl.Text + ".cloudschool.management";
                //await DisplayAlert("App.school_name", App.school_name, "ok");
                OReg.school_name = App.school_name;
                await App.Database.SaveItem(OReg);
            }
        }
 public Task <int> SaveItem(RegEntity item)
 {
     lock (locker)
     {
         if (item.ID != 0)
         {
             //Update Item
             return(database.UpdateAsync(item));
             //return item.ID;
         }
         else
         {
             //Insert item
             return(database.InsertAsync(item));
         }
     }
 }