コード例 #1
0
ファイル: Modal.cs プロジェクト: thongvo/myfiles
        public static async Task<bool> deleteListAccount(List<int> listSelectedAccountID)
        {
            if (listSelectedAccountID == null || listSelectedAccountID.Count() < 1)
                return false;

            var dbController = new CMController.DatabaseController();

            var msg = UC_AddressBook.ResourcesStringLoader.GetString("Dialog-Message-ask_delete_selected_account");
            var valueReturn = await Modals.UIConfirmPopup.ShowAsyncConfirmPopup(msg);
            if (valueReturn == PopupResult.Yes)
            {
                return dbController.DeleteAccountList(listSelectedAccountID);
            }
            return false;
        }
コード例 #2
0
ファイル: Dialog.cs プロジェクト: thongvo/myfiles
        public static async Task<bool> deleteListEmptyAccount(List<int> listAffectedAccountID)
        {
            if (listAffectedAccountID == null || listAffectedAccountID.Count() < 1)
                return false;

            var dbController = new CMController.DatabaseController();
            var listEmptyAccountId = listAffectedAccountID.Where(n => dbController.GetContactCountByAccountId(n) == 0).ToList();

            if (listEmptyAccountId != null && listEmptyAccountId.Count() > 0)
            {
                var msg = UC_AddressBook.ResourcesStringLoader.GetString("DIALOG-Message-ask_delete_empty_account");
                var valueReturn = await Dialogs.UIConfirmDialog.showConfirmDialog(msg);
                if (valueReturn == 1)
                {
                    return dbController.DeleteAccountList(listEmptyAccountId);
                }
            }
            return false;
        }