本文整理汇总了C#中IRegionManager.GetAll方法的典型用法代码示例。如果您正苦于以下问题:C# IRegionManager.GetAll方法的具体用法?C# IRegionManager.GetAll怎么用?C# IRegionManager.GetAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IRegionManager
的用法示例。
在下文中一共展示了IRegionManager.GetAll方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Start
static void Start()
{
try
{
MyClass mc = new MyClass();
string connStr = ConfigurationManager.ConnectionStrings["FuelEntities"].ConnectionString;
_regionManager = new RegionManager(connStr);
_azsManager = new AZSManager(connStr);
_fuelManager = new FuelManager(connStr);
string fn = "1";
string an = "1";
string rn = "1";
decimal pr = 1;
var regions = _regionManager.GetAll();
var azs = _azsManager.GetAll();
var fuel = _fuelManager.GetAll();
var res =
from f in fuel
join a in azs
on f.AZSid equals a.id
join r in regions
on a.RegionId equals r.id
select new
{
Name = f.F_Name,
AName = a.AZS_Name,
Region = r.RegionName,
Price = f.F_Price
};
foreach (var r in res)
{
Console.WriteLine(r.Name + "->" + r.AName + "->" + r.Region + "->" + r.Price);
fn = r.Name;
an = r.AName;
rn = r.Region;
pr = Convert.ToDecimal(r.Price);
}
Console.WriteLine(fn + " " + an + " " + rn + " " + pr);
mc.fuel_N = fn;
mc.azs_N = an;
mc.region_N = rn;
mc.PRICE = pr;
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
示例2: Main
static void Main(string[] args)
{
string connStr = ConfigurationManager.ConnectionStrings["FuelEntities"].ConnectionString;
_regionManager = new RegionManager(connStr);
_AZSManager = new AZSManager(connStr);
_FuelManager = new FuelinAZSManager(connStr);
var regions = _regionManager.GetAll();
var AZSes = _AZSManager.GetAll();
var fuel = _FuelManager.GetAll();
}