public void upload_LastMoney_ConsumeType() { Symbol.Data.IDataQuery <m_lm_ConsumeType_Input> q = _dataContext.CreateQuery <m_lm_ConsumeType_Input>("select [name],[order],[isOut] from [ConsumeType] where [UserId]=" + Program.CurrentUser.Id + " order by [Order],[Id]"); int count = Program.LastMoney.import(q.ToList()); if (Program.LastMoney.lastResult.success) { Symbol.Forms.ProgramHelper.ShowInformation("同步成功,共 {0} 条消费选项!", count); } else { Symbol.Forms.ProgramHelper.ShowInformation(Program.LastMoney.lastMessage); } }
public void upload_LastMoney_FundsLog() { Symbol.Data.IDataQuery <m_lm_MoneyRecord_Import> q = _dataContext.CreateQuery <m_lm_MoneyRecord_Import>("select [t0].*,[t1].[Name] as [ConsumeTypeName],(toDate_long([CreateDateLong])) as [CreateDate],(toDate_long([ByDateLong])) as [ByDate] from [FundsLog] as [t0] left join [ConsumeType] as [t1] on [t1].[Id]=[t0].[ConsumeTypeId] where [t0].[UserId]=@p1 and [SourceId] like @p2", Program.CurrentUser.Id, "funds_%"); int count = Program.LastMoney.import(q.ToList()); if (Program.LastMoney.lastResult.success) { Symbol.Forms.ProgramHelper.ShowInformation("同步成功,共 {0} 条账目!", count); } else { Symbol.Forms.ProgramHelper.ShowInformation(Program.LastMoney.lastMessage); } }
public FundsLog FindFundsLog(long id) { Symbol.Data.IDataQuery <FundsLog> q = _dataContext.CreateQuery <FundsLog>("select [t0].*,[t1].[Name] as [ConsumeTypeName],(toDate_long([CreateDateLong])) as [CreateDate],(toDate_long([ByDateLong])) as [ByDate] from [FundsLog] as [t0] left join [ConsumeType] as [t1] on [t1].[Id]=[t0].[ConsumeTypeId] where [t0].[id]=@p1 and [t0].[UserId]=" + Program.CurrentUser.Id, id); return(q.FirstOrDefault()); }