本文整理汇总了C#中OrderType.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# OrderType.ToString方法的具体用法?C# OrderType.ToString怎么用?C# OrderType.ToString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OrderType
的用法示例。
在下文中一共展示了OrderType.ToString方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetLibraryList
public static async Task GetLibraryList(
Action<LibraryList> onSuccess,
Action<Error> onFail,
int channelId,
OrderType orderType = OrderType.LASTEST,
Dictionary<string, string> filters = null,
int pageCount = 1,
int pageSize = 20)
{
string methodName = "getLibraryList";
MGDataLoader<LibraryList> loader = new MGDataLoader<LibraryList>(CATEGORY, methodName);
loader.AddParameter("channelId", channelId.ToString());
loader.AddParameter("pageCount", pageCount.ToString());
loader.AddParameter("pageSize", pageSize.ToString());
loader.AddParameter("orderType", orderType.ToString());
if(filters != null)
{
foreach (KeyValuePair<string, string> kv in filters)
{
loader.AddParameter(kv.Key, kv.Value);
}
}
await loader.LoadDataAsync(onSuccess, onFail);
}
示例2: CreateOrder
public OrderCreateResponse CreateOrder(Currency currency, OrderType type, double amount, double? price)
{
NameValueCollection nvc = new NameValueCollection
{
{"type", type.ToString().ToLower()},
{"amount_int", (Math.Round(amount, 8)*100000000).ToString()}
};
if(price != null)
nvc.Add("price_int", (Math.Round((double)price,5)*100000).ToString());
return restClient.GetResponse<OrderCreateResponse>(String.Format("BTC{0}/money/order/add", currency.ToString()), Method.POST, nvc, AccessType.Private);
}
示例3: Query
public List<AppTempTransaction> Query(DateTime startdate, DateTime endDate, OrderType orderType)
{
string _orderType = orderType.ToString();
return _context.AppTempTransactions.Where(s => s.TransactionType ==_orderType && s.TransactionStatus==false).ToList();
}
示例4: Order
public Order(OrderType Type)
{
this.Build();
CurrentType = Type;
QSMain.CheckConnectionAlive();
string sql = "SELECT name, id FROM status WHERE usedtypes LIKE '%" + CurrentType.ToString() + "%'";
ComboWorks.ComboFillUniversal(comboStatus, sql, "{0}", null, 1, ComboWorks.ListMode.OnlyItems);
ComboWorks.ComboFillReference(comboMark, "marks", ComboWorks.ListMode.OnlyItems);
if(CurrentType == OrderType.install)
{
ComboWorks.ComboFillReference(comboManufacturer, "manufacturers", ComboWorks.ListMode.WithNo);
ComboWorks.ComboFillReference(comboStock, "stocks", ComboWorks.ListMode.WithNo);
}
else
{
labelGlass.Visible = labelManufacturer.Visible = comboManufacturer.Visible = labelStock.Visible =
comboStock.Visible = labelEurocode.Visible = entryEurocode.Visible = false;
}
//Загрузка списка стекл
sql = "SELECT id, name FROM glass";
MySqlCommand cmd = new MySqlCommand(sql, QSMain.connectionDB);
GlassInDB = new Dictionary<string, bool>();
using (MySqlDataReader rdr = cmd.ExecuteReader())
{
while(rdr.Read())
{
checksGlass.AddCheckButton(rdr["id"].ToString(), rdr["name"].ToString());
GlassInDB.Add(rdr["id"].ToString(), false);
}
}
//Загрузка списка услуг
ServiceListStore = new Gtk.ListStore (typeof(int), // 0 - service id
typeof(bool), // 1 - Активно
typeof(string), // 2 - Наименование
typeof(double), // 3 - Цена
typeof(long) // 4 - order_pay id
);
CellRendererToggle CellPay = new CellRendererToggle();
CellPay.Activatable = true;
CellPay.Toggled += onCellPayToggled;
Gtk.CellRendererSpin CellCost = new CellRendererSpin();
CellCost.Editable = true;
CellCost.Digits = 2;
Adjustment adjCost = new Adjustment(0,0,100000000,100,1000,0);
CellCost.Adjustment = adjCost;
CellCost.Edited += OnCostSpinEdited;
treeviewCost.AppendColumn ("", CellPay, "active", 1);
treeviewCost.AppendColumn ("Название", new CellRendererText(), "text", 2);
treeviewCost.AppendColumn ("Стоимость", CellCost, RenderPriceColumn);
((CellRendererToggle)treeviewCost.Columns[0].CellRenderers[0]).Activatable = true;
treeviewCost.Model = ServiceListStore;
treeviewCost.ShowAll();
sql = "SELECT id, name, price FROM services WHERE order_type = @order_type ORDER BY ordinal";
cmd = new MySqlCommand(sql, QSMain.connectionDB);
cmd.Parameters.AddWithValue("@order_type", CurrentType.ToString());
using (MySqlDataReader rdr = cmd.ExecuteReader())
{
while(rdr.Read())
{
ServiceListStore.AppendValues(rdr.GetInt32("id"),
false,
rdr.GetString("name"),
DBWorks.GetDouble(rdr, "price", 0),
(long)-1
);
}
}
}
示例5: Order
public Order(OrderType searchType)
{
base.SetPipeName("order");
base.SetPipeValue(searchType.ToString());
}
示例6: BeginPickTarget
public virtual void BeginPickTarget( Mobile from, OrderType order )
{
m_Mobile.DebugSay("Begin Pick Target; order = " + order.ToString());
bool isOwner = false;
bool isFriend = false;
if (m_Mobile is Soldier)
{
if (m_Mobile.Deleted || !from.InRange(m_Mobile, 14) || from.Map != m_Mobile.Map)
return;
if(Soldier.IsGovernmentSuperior(m_Mobile, (PlayerMobile)from))
isOwner = true;
}
else
{
if( m_Mobile.Deleted || !m_Mobile.Controlled|| !from.InRange( m_Mobile, 14 ) || from.Map != m_Mobile.Map)
return;
isOwner = (from == m_Mobile.ControlMaster);
isFriend = (!isOwner && m_Mobile.IsPetFriend( from ));
if (!isOwner && from is PlayerMobile)
isOwner = GroupInfo.IsGroupLeader(m_Mobile, from as PlayerMobile);
}
m_Mobile.DebugSay("BPT isOwner == " + isOwner.ToString());
if( !isOwner && !isFriend )
return;
else if( isFriend && order != OrderType.Follow && order != OrderType.Stay && order != OrderType.Stop )
return;
if ((order == OrderType.Transfer || order == OrderType.Friend || order == OrderType.Unfriend) && m_Mobile is Soldier)
return;
if( from.Target == null )
{
if( order == OrderType.Transfer )
from.SendLocalizedMessage( 502038 ); // Click on the person to transfer ownership to.
else if( order == OrderType.Friend )
from.SendLocalizedMessage( 502020 ); // Click on the player whom you wish to make a co-owner.
else if( order == OrderType.Unfriend )
from.SendLocalizedMessage( 1070948 ); // Click on the player whom you wish to remove as a co-owner.
from.Target = new AIControlMobileTarget( this, order );
}
else if( from.Target is AIControlMobileTarget )
{
AIControlMobileTarget t = (AIControlMobileTarget)from.Target;
if( t.Order == order )
t.AddAI( this );
}
}
示例7: AllowOrderTypeForRoute
public override bool AllowOrderTypeForRoute(string route, OrderType orderType)
{
l.Debug("AllowOrderTypeForRoute " + route + " " + orderType.ToString());
return true;
}
示例8: GetMyOrders
/// <summary>
/// Wrapper for the GetMyOrders member of the character type.
/// </summary>
/// <param name="orderType"></param>
/// <param name="typeID"></param>
/// <returns></returns>
public List<MyOrder> GetMyOrders(OrderType orderType, int typeID)
{
Tracing.SendCallback("Character.GetMyOrders", orderType, typeID);
return Util.GetListFromMethod<MyOrder>(this, "GetMyOrders", "myorder", orderType.ToString(), typeID.ToString());
}
示例9: GetMarketOrders
/// <summary>
/// Retrieve all market orders for the given typeID and given order type. Returns null if loading.
/// </summary>
/// <param name="typeID"></param>
/// <param name="orderType"></param>
/// <returns></returns>
public List<MarketOrder> GetMarketOrders(int typeID, OrderType orderType)
{
Tracing.SendCallback("GetMarketOrders", typeID, orderType);
return Util.GetListFromMethod<MarketOrder>(this, "GetMarketOrders", "marketorder", typeID.ToString(), orderType.ToString());
}