杂七杂八
namespace Rattan.ApiCode.Model.B2B { /// <summary> /// 创建日期:2017-09-01 /// 说 明:获取优惠券列表 - Request参数 /// </summary> public class GetCouponListRequestModel { /// <summary> /// 商家ID /// </summary> public int Consignor_Id { get; set; } /// <summary> /// 商品ID /// </summary> public string Product_Id { get; set; } /// <summary> /// 优惠券ID /// </summary> public long Coupon_Id { get; set; } /// <summary> /// 分页索引,从0开始 /// </summary> public int PageNumber { get; set; } /// <summary> /// 分页大小 /// </summary> public int PageSize { get; set; } /// <summary> /// 状态:已使用, 未使用, 已过期 /// </summary> [Display(Name = "状态")] public string Status { get; set; } /// <summary> /// 总价格 /// </summary> public List<CouponProductListModel> CouponProduct { get; set; } } public class CouponProductListModel { /// <summary> /// 总价 /// </summary> [Display(Name = "总价")] public decimal? TotalAmount { get; set; } /// <summary> /// 商品ID /// </summary> public string Product_Id { get; set; } } }
不想新建页面
namespace Rattan.ApiCode.Model.B2B{/// <summary>/// 创建日期:2017-09-01/// 说 明:获取优惠券列表 - Request参数/// </summary>public class GetCouponListRequestModel {/// <summary>/// 商家ID/// </summary>public int Consignor_Id { get; set; }/// <summary>/// 商品ID/// </summary>public string Product_Id { get; set; }
/// <summary>/// 优惠券ID/// </summary>public long Coupon_Id { get; set; }/// <summary>/// 分页索引,从0开始/// </summary>public int PageNumber { get; set; }/// <summary>/// 分页大小/// </summary>public int PageSize { get; set; }/// <summary>/// 状态:已使用, 未使用, 已过期/// </summary>[Display(Name = "状态")]public string Status { get; set; }/// <summary>/// 总价格/// </summary>public List<CouponProductListModel> CouponProduct { get; set; }
}public class CouponProductListModel{/// <summary>/// 总价/// </summary>[Display(Name = "总价")]public decimal? TotalAmount { get; set; }
/// <summary>/// 商品ID/// </summary>public string Product_Id { get; set; }
}
}
------------------------------------------------------------------------------------------------------------------------------不知道上面写的啥
---Replace 将多个字请为空
string City = index["CityName"].GetString().Replace("省", "").Replace("市", "").Replace("维吾尔自治区", "").Replace("特别行政区", "").Replace("壮族自治区", "").Replace("回族自治区", "").Replace("中国", "").Replace("自治区", "");
currentWorksheetldg.Cells[c, 22].Value = City;
---------------------------------------------------------------------------TrimStart将头部为xxx的删除,TrimEnd 将尾部为xxx的删除
string ConsigneeAddress = index["ConsigneeAddress"].GetString().TrimStart("中国".ToArray());
currentWorksheetldg.Cells[c, 20].Value = ConsigneeAddress;
-------------------------------------------------------------------------------------
string data = reqInfo.data; 传后台,解析
var dynamicData = JsonHelper.ConvertJson(data);
--------------------------------------------------------------------------------------vue 跳转页面
// 保存前事件
helper.onBeforeSave = function () {
debugger;
var Start = m_editor.getValue("TollStartTime");
var End = m_editor.getValue("TollEndTime");
if (Start > End) {
$.messager.show('收费到期日期不能早于收费开始日期', 'red')
return false;
}
}
------------------------------------------------------------jq 方法
var url = '/Outbound/Andong_PreOrder/ConvertWarehouseOrder';
var parmas = {
PreOrder_Id: PreOrder_Id
};
var callBack = function (data) {
if (data.Result) {
m_editor.reload();
$.messager.show(data.Msg);
} else {
$.messager.show(data.Msg, 'red');
}
}
helper.ajax(url, parmas, callBack);
------------------------------------------------------c#访问webcofnig 参数 <appSettings> <add key="ImageSize" value ="2097152" /> </appSettings>
ConfigurationManager.AppSettings["ImageSize"]
-------------------------------Json反序列化
object obj = JsonConvert.DeserializeObject(tokenall);
Newtonsoft.Json.Linq.JObject js = obj as Newtonsoft.Json.Linq.JObject;
string token = js.Last.First["token"].ToString();
------------------------------------------------------------------数组
double[] box = null;
List<double> db = new List<double>();
if ( themescount == 4)
{
sArray = item[Colums].ToString().Split(',');
for (int i = 3; i < item.ItemArray.Length; i++)
{
db.Add(double.Parse(item.ItemArray[i].ToString()));
}
box = db.ToArray();
}