public void RetryEvent(Object sender, EventArgs e) { try { internetCheck.IsVisible = false; RetryVariable.IsVisible = false; GetConnection(); }catch (Exception ex) { DisplayAlert("", ExceptionManagement.LogException(ex), "Ok"); } }
public void VerifyEvent(Object sender, EventArgs e) { try { chargeGroceryAmount(); api.JobCompilation(trolliId); api.TrolliVerifyFinancialInfo(trolliId); Navigation.PushAsync(new RatingAndReviewForSmartBuyer(trolliId, smartBuyerId)); } catch (Exception ex) { DisplayAlert("", ExceptionManagement.LogException(ex), "Ok"); } }
protected override void OnAppearing() { try { base.OnAppearing(); LoadProfile(); ServiceSelect(); } catch (Exception ex) { DisplayAlert("", ExceptionManagement.LogException(ex), "Ok"); } }
public async void GetRecord() { try { activIndicator.IsRunning = true; listView.ItemsSource = null; list = new List <TrollyCreation>(); Dictionary <string, object> userData = SharedUserData.getUserData; string globalClientId = Convert.ToString(userData["UniqueID"]); //Application.Current.Properties["phoneNumber"]; string url = ApiEndPoints.myTrolliesFind + globalClientId; string content = await _client.GetStringAsync(url); List <Dictionary <string, object> > posts = JsonConvert.DeserializeObject <List <Dictionary <string, object> > >(content); foreach (Dictionary <string, object> i in posts) { Dictionary <string, object> post = JsonConvert.DeserializeObject <Dictionary <string, object> >(Convert.ToString(i["properties"])); Dictionary <string, object> trollyData = JsonConvert.DeserializeObject <Dictionary <string, object> >(Convert.ToString(post["trollyDetail"])); string clientId = Convert.ToString(post["clientId"]); if (globalClientId == clientId) { TrollyCreation ob = new TrollyCreation() { clientId = Convert.ToString(post["clientId"]), trolliId = Convert.ToString(post["trolliId"]), createdDate = Convert.ToString(post["createdDate"]), deliveryDateTime = Convert.ToString(post["deliveryDateTime"]), lastModifiedDate = Convert.ToString(post["lastModifiedDate"]), status = Convert.ToString(post["status"]), trollyDetail = Convert.ToString(trollyData["value"]), trollyTitle = Convert.ToString(post["trollyTitle"]), assigneeId = Convert.ToString(post["assigneeId"]), clientNotificationId = Convert.ToString(post["clientNotificationId"]), SBNotificationId = Convert.ToString(post["SBNotificationId"]), stripeChargeId = Convert.ToString(post["stripeChargeId"]) }; list.Add(ob); } } listView.ItemsSource = list; activIndicator.IsRunning = false; } catch (Exception ex) { activIndicator.IsRunning = false; await DisplayAlert("", ExceptionManagement.LogException(ex), "Ok"); } }
public void ToggledHandler(object sender, ToggledEventArgs e) { try { Dictionary <string, object> userData = SharedUserData.getUserData; bool isOnlineSeeker = e.Value; if (globalValue) { string fullName = Convert.ToString(userData["fullName"]); string simNumber = Convert.ToString(userData["simNumber"]); IsJobOnlineSeeker bean = new IsJobOnlineSeeker { fullName = fullName, simNumber = simNumber, isJobSeeker = "false" }; ApiCalling callApi = new ApiCalling(); callApi.IsJobOnlineSeeker(bean); Application.Current.Properties["isOnlineJobSeeker"] = false; globalValue = false; // OneSignal.Current.SetSubscription(false); DisplayAlert("Notification Msg", "Notification Off", "Ok"); } else { string fullName = Convert.ToString(userData["fullName"]); string simNumber = Convert.ToString(userData["simNumber"]); IsJobOnlineSeeker bean = new IsJobOnlineSeeker { fullName = fullName, simNumber = simNumber, isJobSeeker = "true" }; ApiCalling callApi = new ApiCalling(); callApi.IsJobOnlineSeeker(bean); Application.Current.Properties["isOnlineJobSeeker"] = true; globalValue = true; // OneSignal.Current.SetSubscription(true); DisplayAlert("Notification Msg", "Notification On", "Ok"); } }catch (Exception ex) { DisplayAlert("", ExceptionManagement.LogException(ex), "Ok"); } }
public static IServiceCollection AddException(this IServiceCollection services, Action <ExceptionOptionsBuilder> action = null) { var builder = new ExceptionOptionsBuilder(); action?.Invoke(builder); var options = builder.Build(); var management = new ExceptionManagement(options); services.AddSingleton <IExceptionManagement>(management); services.AddMvc(x => { x.Filters.Add <ExceptionFilter>(); }); return(services); }
public SP_services(Proyect pr, CultureInfo cul) { _serialPort = new SerialPort(); _ports = SerialPort.GetPortNames(); _time = 0; _ts = GlobalParameters.DefaultTs; _res_man = new ResourceManager("PlantaPiloto.Resources.Res", typeof(MainForm).Assembly); _proyect = pr; _cul = cul; _db_services = new DB_services(_cul); _lastRow = new Proyect(); _saveFile = false; _exMg = new ExceptionManagement(_cul); }
public VarSelection(Proyect proyect, EnumVarSelection purpose, CultureInfo cultureInfo) { InitializeComponent(); _mainForm = new MainForm(); _res_man = new ResourceManager("PlantaPiloto.Resources.Res", typeof(MainForm).Assembly); _db_services = new DB_services(_cul); _proyect = proyect; _purpose = purpose; _cul = cultureInfo; _helpProvider = new HelpProvider(); _filesPath = GlobalParameters.FilesPath; _helpProvider.HelpNamespace = Path.Combine(_filesPath, "helpProyect.chm"); _exMg = new ExceptionManagement(_cul); }
static void Main(string[] args) { try { //English Assets ListAssets_Eng(); //French Assets ListAssets_Fre(); // Italian Assets ListAssets_Dut(); ListAssets_Ger(); ListAssets_Spa(); ListAssets_Jpn(); ListAssets_Chi(); } catch (System.Security.AccessControl.PrivilegeNotHeldException objPrivilegeNotHeldException) { ExceptionManagement.HandleException(objPrivilegeNotHeldException, "InHTMPrivilegeNotHeldException"); } catch (UnauthorizedAccessException objUnauthorizedAccessException) { ExceptionManagement.HandleException(objUnauthorizedAccessException, "InHTMUnauthorizedAccessException"); } catch (Exception objException) { ExceptionManagement.HandleException(objException, "InHTMAssetsIndex"); } /* Creates XML file with urls */ try { GenerateXmlForAll(); } catch (System.Security.AccessControl.PrivilegeNotHeldException objPrivilegeNotHeldException) { ExceptionManagement.HandleException(objPrivilegeNotHeldException, "InXMLPrivilegeNotHeldException"); } catch (UnauthorizedAccessException objUnauthorizedAccessException) { ExceptionManagement.HandleException(objUnauthorizedAccessException, "InXMLUnauthorizedAccessException"); } catch (Exception objException) { ExceptionManagement.HandleException(objException, "InXMLAssetsIndex"); } }
public void SaveEvent(object sender, EventArgs e) { try { string review = reviewText.Text; api.SmartBuyerRating(trolliId, userId, "" + rating, review); Navigation.PushAsync(new MenuPage()); check = false; } catch (Exception ex) { DisplayAlert("", ExceptionManagement.LogException(ex), "Ok"); } }
public ConfigForm(CultureInfo cul) { InitializeComponent(); _res_man = new ResourceManager("PlantaPiloto.Resources.Res", typeof(MainForm).Assembly); _proyect = new Proyect(); _db_services = new DB_services(_cul); _eagerLoading = 0; _helpProvider = new HelpProvider(); _filesPath = GlobalParameters.FilesPath; _configsPath = GlobalParameters.ConfigsPath; _helpProvider.HelpNamespace = Path.Combine(_filesPath, "helpProyect.chm"); _cul = cul; _exMg = new ExceptionManagement(_cul); _fileSaver = new FileSaver(); }
public void ChangeValueHandler(object Sender, SelectedItemChangedEventArgs e) { try { if (Size.Items[Size.SelectedIndex] == "Custom Cell") { SizeEntryChange = 1; SizeEntry.IsVisible = true; SizeEntry.Focus(); Size.IsVisible = false; } }catch (Exception ex) { DisplayAlert("", ExceptionManagement.LogException(ex), "Ok"); } }
public void MainMenuEvent(object sender, EventArgs e) { try { if (check) { api.ClientRating(trolliId, userId, "" + rating, ""); } Navigation.PushAsync(new MenuPage()); } catch (Exception ex) { DisplayAlert("", ExceptionManagement.LogException(ex), "Ok"); //Exception Class } }
public VarValuesForm(Proyect proyect, List <Variable> varsSelected, CultureInfo cultureInfo) { InitializeComponent(); _res_man = new ResourceManager("PlantaPiloto.Resources.Res", typeof(MainForm).Assembly); _db_services = new DB_services(_cul); _proyect = proyect; _varsSelected = varsSelected; _cul = cultureInfo; _helpProvider = new HelpProvider(); _filesPath = GlobalParameters.FilesPath; _helpProvider.HelpNamespace = Path.Combine(_filesPath, "helpProyect.chm"); _exMg = new ExceptionManagement(_cul); _timer = new System.Timers.Timer(5000); _timer.Enabled = false; _timer.Elapsed += new ElapsedEventHandler(this.FillDataGridTimer); }
public void EditHandler(Object sender, SelectedItemChangedEventArgs e) { try { b = (Button)sender; //Change var into Button AbsoluteLayout relative = (AbsoluteLayout)b.ParentView; //Change var into AbsoluteLayout /* SfAutoComplete viewEntry1 = (SfAutoComplete)relative.Children[2]; //Change var into SfAutoComplete * viewEntry1.IsVisible = true; * Entry viewEntry2 = (Entry)relative.Children[3]; //Change var into Entry * viewEntry2.IsVisible = true; * Button updateStoreBtn = (Button)relative.Children[4]; //Change var into Button * updateStoreBtn.IsVisible = true; */ Label labelStore1 = (Label)relative.Children[0]; //Change var into Label Label labelStore2 = (Label)relative.Children[1]; ////Change var into Label // labelStore2.IsVisible = false; updateStore = labelStore1.Text; updateStoreSuburb = labelStore2.Text; // autoComplete.Text = labelStore1.Text; autoComplete.Focus(); updateStoreName = labelStore1.Text; // storesSuburb.Text = labelStore2.Text; check = 1; addStore.Text = "Update Store"; mainGrid.Height = 1; listSection.TranslateTo(0, 0, 100); listSection1.TranslateTo(0, 0, 100); isListOpen = true; // viewEntry1.DataSource = data; } catch (Exception ex) { DisplayAlert("", ExceptionManagement.LogException(ex), "Ok"); } //listStore.IsVisible = true; // listStoreSuburb.IsVisible = true; }
public void Discard(Object sender, EventArgs e) { try { ObservableCollection <ListProduct> listProducts = SharedUserData.addProduct; string output = ""; foreach (ListProduct list in listProducts) { output += JsonConvert.SerializeObject(list) + ","; } DisplayAlert("", output, "ok"); }catch (Exception ex) { DisplayAlert("", ExceptionManagement.LogException(ex), "Ok"); } }
public int GetStates(string states) { try { if (states == "ACT") { return(0); } else if (states == "NSW") { return(1); } else if (states == "NT") { return(2); } else if (states == "QLD") { return(3); } else if (states == "SA") { return(4); } else if (states == "TAS") { return(5); } else if (states == "VIC") { return(6); } else if (states == "WA") { return(7); } return(-1); }catch (Exception ex) { //Exception Class DisplayAlert("", ExceptionManagement.LogException(ex), "Ok"); return(-1); } }
public void UpdateStoreList() { try { string store = ""; string storeItemCount = ""; int counter = 0; int length = listData.Count; listx = SharedUserData.addProduct; ObservableCollection <ListStores> lists = new ObservableCollection <ListStores>(); if (listx != null) { for (int i = 0; i < length; i++) { foreach (ListProduct listDatas in listx) { if (listData.ElementAt(i) == listDatas.store) { store = listDatas.store; counter++; } } storeItemCount = store + " (" + counter + " Items)"; counter = 0; ListStores update = new ListStores() { store = listData.ElementAt(i), storeSuburb = "(No Suburb)", storeDetail = storeItemCount }; lists.Add(update); } } listData = new List <string>(); SharedUserData.listStore = null; SharedUserData.listStore = lists; } catch (Exception ex) { DisplayAlert("", ExceptionManagement.LogException(ex), "Ok"); } }
public void Rate5Handler(object sender, EventArgs e) { try { rate5.IsVisible = false; fillRate1.IsVisible = true; fillRate2.IsVisible = true; fillRate3.IsVisible = true; fillRate4.IsVisible = true; fillRate5.IsVisible = true; ratingContain.Text = "Excellent"; rating = 5; }catch (Exception ex) { DisplayAlert("", ExceptionManagement.LogException(ex), "Ok"); } }
public void ItemSelected(object sender, SelectedItemChangedEventArgs e) { try { if (e.SelectedItem == null) { return; } TrollyCreation trollyDetail = e.SelectedItem as TrollyCreation; Navigation.PushAsync(new MyTrolliDetail(trollyDetail)); ((ListView)sender).SelectedItem = null; } catch (Exception ex) { DisplayAlert("", ExceptionManagement.LogException(ex), "Ok"); //Exception Class } }
public string GetItemsInJson() { try { ObservableCollection <ListProduct> listProducts = SharedUserData.addProduct; string output = ""; foreach (ListProduct list in listProducts) { output += JsonConvert.SerializeObject(list) + ","; } return(output); }catch (Exception ex) { DisplayAlert("", ExceptionManagement.LogException(ex), "Ok"); return(""); } }
public void CheckList() { try { if (SharedUserData.addProduct == null) { list = new ObservableCollection <ListProduct>(); } else { list = SharedUserData.addProduct; } } catch (Exception ex) { DisplayAlert("", ExceptionManagement.LogException(ex), "Ok"); } }
public void chargePenalty(string chargeId) { try { StripeConfiguration.SetApiKey("sk_test_Q5wSnyXL03yN0KpPaAMYttOb"); var chargeOptions = new ChargeCaptureOptions { Amount = 1000, }; var chargeService = new ChargeService(); Charge charge = chargeService.Capture(chargeId, chargeOptions, null); DisplayAlert("", "$10 will be charge on your account as penalty", "Ok"); }catch (Exception ex) { DisplayAlert("", ExceptionManagement.LogException(ex), "Ok"); } }
public bool EntryValidation() { try { bool check = true; string errorInfo = ""; if (autoComplete.Text == "") { check = false; errorInfo += "Item Name \n"; } if (Quantity.Text == "") { check = false; errorInfo += "Quantity \n"; } if (Size.SelectedIndex == -1) { check = false; errorInfo += "Item Size\n"; } if (Unit.SelectedIndex == -1) { check = false; errorInfo += "Item Unit\n"; } if (description.Text == "") { description.Text = " "; } if (check == false) { DisplayAlert("Following required values are missing", errorInfo, "Ok"); } return(check); }catch (Exception ex) { DisplayAlert("", ExceptionManagement.LogException(ex), "Ok"); return(false); } }
public bool CheckField() { try { if (trolliTitlex == "") { return(false); } else { return(true); } }catch (Exception ex) { DisplayAlert("", ExceptionManagement.LogException(ex), "Ok"); //Exception Class return(false); } }
public void NextButton(Object sender, EventArgs e) { string name = ""; string emailUser = ""; try { if (CheckTextField()) { name = fullName.Text; emailUser = email.Text; Navigation.PushAsync(new CompleteRegistration(phoneNumbers, name, emailUser, referralCodeVar)); } }catch (Exception ex) { DisplayAlert("", ExceptionManagement.LogException(ex), "Ok"); } }
public ChartForm() { InitializeComponent(); _mainForm = new MainForm(); _res_man = new ResourceManager("PlantaPiloto.Resources.Res", typeof(MainForm).Assembly); _variables = new List <Variable>(); _db_services = new DB_services(_cul); _proyect = new Proyect(); _sqlData = new List <List <Variable> >(); _sqlTime = new List <float>(); _timer = new System.Timers.Timer(2000); _timer.Enabled = false; _timer.Elapsed += new ElapsedEventHandler(this.LoadChartsTimer); _chartAmount = 100; _helpProvider = new HelpProvider(); _filesPath = GlobalParameters.FilesPath; _helpProvider.HelpNamespace = Path.Combine(_filesPath, "helpProyect.chm"); _exMg = new ExceptionManagement(_cul); }
public void ItemSelected(object sender, SelectedItemChangedEventArgs e) { try { if (e.SelectedItem == null) { return; } ListStores trollyDetail = e.SelectedItem as ListStores; Navigation.PushAsync(new MyJobItems(items, trollyDetail.store, itemsCount)); ((ListView)sender).SelectedItem = null; } catch (Exception ex) { DisplayAlert("", ExceptionManagement.LogException(ex), "Ok"); //Exception Class } }
protected override void OnAppearing() { try { listView.ItemsSource = null; listView.ItemsSource = SharedUserData.listStore; scheduleButtonEnable(); if (listView.ItemsSource == null) { // listValidationText.Text = "There is no Selected Stroes"; ListStores listData = new ListStores() { store = "Any Store", storeSuburb = "(No Suburb)", storeDetail = "Any Store (0 Items)" }; lists.Add(listData); SharedUserData.listStore = lists; listView.ItemsSource = null; listView.ItemsSource = SharedUserData.listStore; } else { // listValidationText.Text = ""; listView.ItemsSource = null; listView.ItemsSource = SharedUserData.listStore; } ItemsCount(); mainGrid.Height = 1; listSection.TranslateTo(0, 0, 100); listSection1.TranslateTo(0, 0, 100); base.OnAppearing(); }catch (Exception ex) { DisplayAlert("", ExceptionManagement.LogException(ex), "Ok"); } }
public void JobCompleted(Object sender, EventArgs e) { try { bool connect = CrossConnectivity.Current.IsConnected; if (connect) { Navigation.PushAsync(new EnterGroceryAmount(items, itemsCount)); } else { DisplayAlert("Uh Oh!", "It seems like you are not connected to internet. Retry once your connections is back", "Exit"); // internetCheck.IsVisible = true; // RetryVariable.IsVisible = true; } }catch (Exception ex) { DisplayAlert("", ExceptionManagement.LogException(ex), "Ok"); } }