public void Update() { SQLiteAccessHelper.Update <SMSTime>(new SMSTime() { Id = 1, GetDateTime = TimeHelper.GetTimeStamp(DateTime.Now) }); }
public string FindAllBankPhone() { TableQuery <CreditCard> list = SQLiteAccessHelper.FindList <CreditCard>(1, 20); if (list.Count() == 0) { return(null); } string str = ""; int i = 0; foreach (var item in list) { if (i != 0) { str += ","; } else { i++; } str += item.BankPhone; } return(str); }
public int Find(string shortNumber, string bankName) { var model = SQLiteAccessHelper.Find <CreditCard>(x => x.CardNumber.Contains(shortNumber) && x.BankName == bankName); if (model != null) { return(model.Id); } return(0); }
public decimal Statistics(int cardId, DateTime start, DateTime end) { var data = SQLiteAccessHelper.FindList <Bill>().Where(x => x.CreditCarkId == cardId && x.AddTime >= start && x.AddTime <= end); decimal money = 0; foreach (var item in data) { money += item.Money; } return(money); }
private async Task Clear_OnClicked(object sender, EventArgs e) { var b = await DisplayAlert("提示", "确定删除所有数据?", "确定", "取消"); if (b) { MessageList.BillList.Clear(); CreditCardList.CreditCard.Clear(); SQLiteAccessHelper.DeleteTable(); } }
public bool Add(Bill model) { CreditCardDAL billDAL = new CreditCardDAL(); int id = billDAL.Find(model.ShortNumber, model.BankType); if (id != 0) { model.CreditCarkId = id; SQLiteAccessHelper.Add <Bill>(model); return(true); } return(false); }
public string FindTimeStamp() { var data = SQLiteAccessHelper.Find <SMSTime>(x => x.Id == 1); if (data == null) { Add(new SMSTime() { GetDateTime = TimeHelper.GetTimeStamp(DateTime.Now) }); return(TimeHelper.GetTimeStamp(DateTime.Now.Date.AddDays(-60))); } else { Update(); return(data.GetDateTime); } }
public async Task OnListItemSelected(object sender, SelectedItemChangedEventArgs e) { var text = e.SelectedItem as string; if (text == null) { return; } switch (text) { case "使用流程": await DisplayAlert("使用流程", "1、添加信用卡,信用卡号和银行还有银行发送消费短信的号码(一般是95之类的)这三个必须正确才能获取到短信。\r\n2、App会获取短信。\r\n3、可以查看消费短信和信用卡的统计。\r\n4、暂时只支持招商、广发、交行、民生、华夏、中信银行短信识别,其他银行未测试。", "确定"); break; case "声明": await DisplayAlert("声明", "本App所有的数据都保存在本地,不会和服务器交互,如果卸载或者删除数据都无法恢复数据,添加信用卡默认只获取近两个月的短信", "确定"); break; case "建议与反馈": await Navigation.PushAsync(new Feedback()); break; case "清除数据": var b = await DisplayAlert("提示", "确定删除所有数据?", "确定", "取消"); if (b) { MessageList.BillList.Clear(); CreditCardList.CreditCard.Clear(); SQLiteAccessHelper.DeleteTable(); } break; case "版本": await DisplayAlert("版本", "信用卡笔记 V1.1.0", "确定"); break; } listView.SelectedItem = null; }
public Bill Find(int id) { return(SQLiteAccessHelper.Find <Bill>(x => x.Id == id)); }
public void DeleteAll() { SQLiteAccessHelper.DeleteAll <CreditCard>(); }
public int Delete(int id) { return(SQLiteAccessHelper.Delete <CreditCard>(id)); }
public TableQuery <CreditCard> FindList(int pageIndex, int pageSize) { TableQuery <CreditCard> query = SQLiteAccessHelper.FindList <CreditCard>((pageIndex - 1) * pageSize, pageSize).OrderByDescending <DateTime>(x => x.AddTime); return(query); }
public TableQuery <Bill> FindList(int pageIndex, int pageSize) { TableQuery <Bill> query = SQLiteAccessHelper.FindList <Bill>(pageIndex, pageSize).OrderByDescending <DateTime>(x => x.AddTime); return(query); }
public CreditCard Find(string cardNumber) { return(SQLiteAccessHelper.Find <CreditCard>(x => x.CardNumber == cardNumber)); }
public CreditCard Find(int id) { return(SQLiteAccessHelper.Find <CreditCard>(x => x.Id == id)); }
public int Update(CreditCard model) { return(SQLiteAccessHelper.Update <CreditCard>(model)); }
public int Add(CreditCard model) { return(SQLiteAccessHelper.Add <CreditCard>(model)); }
public int Update(Bill model) { return(SQLiteAccessHelper.Update <Bill>(model)); }
public int Delete(int id) { return(SQLiteAccessHelper.Delete <Bill>(id)); }
public int Add(SMSTime model) { return(SQLiteAccessHelper.Add <SMSTime>(model)); }
public void DeleteAll() { SQLiteAccessHelper.DeleteAll <Bill>(); }