本文整理汇总了C#中DataClasses1DataContext.sp_Getfxrates方法的典型用法代码示例。如果您正苦于以下问题:C# DataClasses1DataContext.sp_Getfxrates方法的具体用法?C# DataClasses1DataContext.sp_Getfxrates怎么用?C# DataClasses1DataContext.sp_Getfxrates使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataClasses1DataContext
的用法示例。
在下文中一共展示了DataClasses1DataContext.sp_Getfxrates方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetLatestfxrates
public P_fxrates[] GetLatestfxrates()
{
var db = new DataClasses1DataContext();
CultureInfo culture;
culture = new CultureInfo("en-Us", false);
var fxrates_update = GetfxratesLastUpdate();
string[] dt;
int? upd;
dt = fxrates_update[0].Day.Split('/');
upd = Convert.ToInt32(fxrates_update[0].Update);
int yyyy, mm, dd;
yyyy = Convert.ToInt32(dt[2]);
mm = Convert.ToInt32(dt[1]);
dd = Convert.ToInt32(dt[0]);
var datetime = new DateTime(yyyy, mm, dd);
var query = from temp in db.sp_Getfxrates(datetime, upd)
select new P_fxrates
{
ID = temp.ID.Value.ToString(),
Description = temp.Description,
BuyingRates = temp.BuyingRates,
SellingRates = temp.SellingRates,
SightBill = temp.SightBill,
Family = temp.Family.Trim(),
FamilyLong = temp.FamilyLong,
Bill_DD_TT = temp.Bill_DD_TT,
TT = temp.TT,
Update = temp.Update.Value.ToString(),
Ddate = temp.Date.Value.ToString("d/MM/yyyy", culture),
DTime = temp.Time
};
return query.ToArray();
}