/// <summary> /// Configures the view. /// </summary> void ConfigureView() { this.EdgesForExtendedLayout = UIRectEdge.None; var menuBtn = new UIBarButtonItem(UIImage.FromBundle("Menu"), UIBarButtonItemStyle.Plain, MenuClicked); this.NavigationItem.LeftBarButtonItem = menuBtn; IBNotesTbl.RegisterNibForCellReuse(NotesCell.Nib, NotesCell.Key); IBNotesTbl.TableFooterView = new UIView(); IBNotesTbl.EstimatedRowHeight = HeightConstants.CellHeight70; this.NavigationItem.Title = IosUtils.LocalizedString.sharedInstance.GetLocalizedString("LSNotesTitle", ""); this.NavigationItem.BackBarButtonItem = new UIBarButtonItem("", UIBarButtonItemStyle.Plain, null, null); var createBtn = new UIBarButtonItem(UIImage.FromBundle("Add"), UIBarButtonItemStyle.Plain, EditClicked); this.NavigationItem.RightBarButtonItem = createBtn; //IosUtils.Utility.setLeftPadding(IBEntityTxt); //IosUtils.Utility.setLeftPadding(IBAccountCodeTxt); //IosUtils.Utility.setLeftPadding(IBFromDateTxt); //IosUtils.Utility.setLeftPadding(IBToDateTxt); IBEntityTxt.InputView = IBEntityPicker; IBEntityTxt.InputAccessoryView = IBEntityDoneBar; IBAccountCodeTxt.InputView = IBAccountCodePicker; IBAccountCodeTxt.InputAccessoryView = IBAccountCodeDoneBar; IBDateTimePicker.Mode = UIDatePickerMode.Date; IBFromDateTxt.InputView = IBDateTimePicker; IBFromDateTxt.InputAccessoryView = IBDateTimeDoneBar; IBToDateTxt.InputView = IBDateTimePicker; IBToDateTxt.InputAccessoryView = IBDateTimeDoneBar; SetupLanguageString(); }
async void GetNotes() { if (IosUtils.IosUtility.IsReachable()) { IosUtils.IosUtility.showProgressHud(""); try { var res = await WebServiceMethods.ShowNotes(EntityCode.CompCode, AccountCode.AccountCode, IBFromDateTxt.Text, IBToDateTxt.Text); InvokeOnMainThread(() => { if (res != null) { notes = res; if (notes.Count == 0) { IBEmptyLbl.Hidden = false; } else { IBEmptyLbl.Hidden = true; } } else { IosUtils.IosUtility.showAlertWithInfo(IosUtils.LocalizedString.sharedInstance.GetLocalizedString("LSErrorTitle", "LSErrorTitle"), IosUtils.LocalizedString.sharedInstance.GetLocalizedString("LSUnknownError", "LSErrorTitle")); } IBNotesTbl.ReloadData(); }); } catch (Exception e) { IosUtils.IosUtility.showAlertWithInfo(IosUtils.LocalizedString.sharedInstance.GetLocalizedString("LSErrorTitle", "LSErrorTitle"), e.Message); } IosUtils.IosUtility.hideProgressHud(); } }
void ReleaseDesignerOutlets() { if (IBAccountCodeDoneBar != null) { IBAccountCodeDoneBar.Dispose(); IBAccountCodeDoneBar = null; } if (IBAccountCodePicker != null) { IBAccountCodePicker.Dispose(); IBAccountCodePicker = null; } if (IBAccountCodeTitleLbl != null) { IBAccountCodeTitleLbl.Dispose(); IBAccountCodeTitleLbl = null; } if (IBAccountCodeTxt != null) { IBAccountCodeTxt.Dispose(); IBAccountCodeTxt = null; } if (IBaccountDoneBtn != null) { IBaccountDoneBtn.Dispose(); IBaccountDoneBtn = null; } if (IBDateTimeDoneBar != null) { IBDateTimeDoneBar.Dispose(); IBDateTimeDoneBar = null; } if (IBDateTimeDoneBtn != null) { IBDateTimeDoneBtn.Dispose(); IBDateTimeDoneBtn = null; } if (IBDateTimePicker != null) { IBDateTimePicker.Dispose(); IBDateTimePicker = null; } if (IBEmptyLbl != null) { IBEmptyLbl.Dispose(); IBEmptyLbl = null; } if (IBEntityCodeTiltleLbl != null) { IBEntityCodeTiltleLbl.Dispose(); IBEntityCodeTiltleLbl = null; } if (IBEntityDoneBar != null) { IBEntityDoneBar.Dispose(); IBEntityDoneBar = null; } if (IBEntityDoneBtn != null) { IBEntityDoneBtn.Dispose(); IBEntityDoneBtn = null; } if (IBEntityPicker != null) { IBEntityPicker.Dispose(); IBEntityPicker = null; } if (IBEntityTxt != null) { IBEntityTxt.Dispose(); IBEntityTxt = null; } if (IBFromDateTxt != null) { IBFromDateTxt.Dispose(); IBFromDateTxt = null; } if (IBNotesTbl != null) { IBNotesTbl.Dispose(); IBNotesTbl = null; } if (IBSearchBtn != null) { IBSearchBtn.Dispose(); IBSearchBtn = null; } if (IBToDateTxt != null) { IBToDateTxt.Dispose(); IBToDateTxt = null; } if (IBToLbl != null) { IBToLbl.Dispose(); IBToLbl = null; } }