本文整理汇总了C#中TYPE.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# TYPE.ToString方法的具体用法?C# TYPE.ToString怎么用?C# TYPE.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TYPE
的用法示例。
在下文中一共展示了TYPE.ToString方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetCommentOfStore
public async void GetCommentOfStore(TYPEGET typeGet, TYPE type=0)
{
string lastId = "";
int storeId = MediateClass.KiotVM.SelectedStore.StoreId;
if (typeGet == TYPEGET.MORE)
{
if (CommentLstOfStore.Count != 0)
{
if (type == TYPE.OLD)
lastId = CommentLstOfStore.Min(x => x.Id).ToString();
else
lastId = CommentLstOfStore.Max(x => x.Id).ToString();
}
}
else
lastId = "-1";
IDictionary<string, string> param = new Dictionary<string, string>
{
{"storeId" , storeId.ToString()},
{"commentId" , lastId},
{"type" , type.ToString()}
};
if(lastId != "")
await SendData(typeGet, type, param);
}
示例2: LoadMoreMarket
public async void LoadMoreMarket(string name, TYPEGET type, TYPE isOld = 0)
{
string lastId = "";
if (type == TYPEGET.MORE)
{
if (MarketItemList.Count != 0)
{
if (isOld == TYPE.OLD)
lastId = MarketItemList.Min(x => x.MarketId).ToString();
else
lastId = MarketItemList.Max(x => x.MarketId).ToString();
}
}
else
lastId = "-1";
IDictionary<string, string> param = new Dictionary<string, string>
{
{"id" , lastId},
{"name" , name},
{"type" , isOld.ToString()}
};
if(lastId != "")
await SendData(type, isOld, param);
}
示例3: LoadMoreStore
public async void LoadMoreStore(TYPEGET typeGet,TYPE type=0)
{
string lastId = "";
int marketId = MediateClass.MarketVM.SelectedMarket.MarketId;
if (typeGet == TYPEGET.MORE)
{
if (KiosList.Count != 0)
{
if (type == TYPE.OLD)
lastId = KiosList.Min(x => x.StoreId).ToString();
else
lastId = KiosList.Max(x => x.StoreId).ToString();
}
}
else
lastId = "-1";
IDictionary<string, string> param = new Dictionary<string, string>
{
{"marketId", marketId.ToString()},
{"storeId" , lastId},
{"type" , type.ToString()}
};
if(lastId != "")
await SendData(typeGet, type, param);
}
示例4: LoadMoreSale
public async void LoadMoreSale(string title, TYPEGET type, TYPE isOld=0)
{
string lastId = "";
if (type == TYPEGET.MORE)
{
if (SaleList.Count != 0)
{
if (isOld == TYPE.OLD)
lastId = SaleList.Min(x => x.SaleId).ToString();
else
lastId = SaleList.Max(x => x.SaleId).ToString();
}
}
else
lastId = "-1";
IDictionary<string, string> param = new Dictionary<string, string>
{
{"id" , lastId},
{"title" , title},
{"type" , isOld.ToString()}
};
if(lastId != "")
await SendData(type, isOld, param);
}
示例5: GetNewProductList
public async void GetNewProductList(TYPEGET typeGet, TYPE type = TYPE.OLD)
{
try
{
JArray result = new JArray();
int lastId = -1;
if (typeGet == TYPEGET.MORE)
{
if (NewProductList.Count != 0)
{
if (type == TYPE.OLD)
lastId = NewProductList.Min(x => x.ProductId);
else
lastId = NewProductList.Max(x => x.ProductId);
}
}
IDictionary<string, string> param = new Dictionary<string, string>
{
{"typeProduct" , type.ToString()},
{"productId" , lastId.ToString()}
};
if (Utilities.Helpers.NetworkHelper.Instance.HasInternetConnection)
{
if (!isResponse)
{
isResponse = true;
var response = await App.MobileService.InvokeApiAsync("ProductStatistics", HttpMethod.Get, param);
result = JArray.Parse(response.ToString());
ObservableCollection<Product> more = result.ToObject<ObservableCollection<Product>>();
if (typeGet == TYPEGET.START)
{
NewProductList = more;
}
else
{
if (type == TYPE.OLD)
{
foreach (var item in more)
{
NewProductList.Add(item);
}
}
else
{
for (int i = 0; i < more.Count; i++)
{
NewProductList.Insert(i, more[i]);
}
}
}
}
}
}
catch (Exception ex)
{
await new MessageDialog(ex.Message.ToString(), "Load Product").ShowAsync();
}
finally
{
isResponse = false;
}
}
示例6: GetProductsOfStore
public async void GetProductsOfStore(TYPEGET typeGet, TYPE type=0)
{
string lastId = "-1";
int storeId = MediateClass.KiotVM.SelectedStore.StoreId;
if (typeGet == TYPEGET.MORE)
{
if (ProductsOfStore.Count != 0)
{
if (type == TYPE.OLD)
lastId = ProductsOfStore.Min(x => x.ProductId).ToString();
else
lastId = ProductsOfStore.Max(x => x.ProductId).ToString();
}
}
IDictionary<string, string> param = new Dictionary<string, string>
{
{"storeId" , storeId.ToString()},
{"productId" , lastId},
{"type" , type.ToString()}
};
if(lastId != "")
await PassDataOfStore(typeGet, type, param);
}
示例7: LoadMoreProduct
public async void LoadMoreProduct(TYPEGET type, TYPE isOld=0)
{
string lastId = "-1";
if (type == TYPEGET.MORE)
{
if (ProductList.Count != 0)
{
if (isOld == TYPE.OLD)
lastId = ProductList.Min(x => x.ProductId).ToString();
else
lastId = ProductList.Max(x => x.ProductId).ToString();
}
}
IDictionary<string, string> param = new Dictionary<string, string>
{
{"id" , lastId},
{"type" , isOld.ToString()}
};
await SendData(type, isOld, param);
}