public async Task LoadStakeholderList()
        {
            try {
                var result = await APIRequest.Instance.GetLoadStakeholderList(new StakeholderListRequestModel {
                    CustomerEntityID = GlobalVariables.CustomerEntityID,
                    UserLoginID      = GlobalVariables.UserLoginID
                });

                if (result != null)
                {
                    StakeholderListResponseModel responseModelList = JsonConvert.DeserializeObject <StakeholderListResponseModel> (result);

                    SQLiteDatabase.Instance.InsertStakHolderDetails(responseModelList);
                }
            } catch (Exception ex) {
            }
        }
Beispiel #2
0
        public bool InsertStakHolderDetails(StakeholderListResponseModel stakeholderListResponseModel)
        {
            try {
                database.CreateTable <StakeholderListModel> ();

                try {
                    database.DeleteAll <StakeholderListModel> ();
                } catch {
                }

                if (stakeholderListResponseModel.StakeholderList != null)
                {
                    foreach (StakeholderListModel cm in stakeholderListResponseModel.StakeholderList)
                    {
                        database.Insert(cm);
                    }
                }

                return(true);
            } catch (Exception ex) {
                return(false);
            }
        }