zoukankan      html  css  js  c++  java
  • 笔记

    IL :基础设施层 Logging , Validation , Exception , Data Access , Cache , File Handler , Email , Up Load,Query , Config配置和Base类可被各层调用

    RL :仓储层,是维护数据库的结构和数据储存的.供DAL调用.

    DAL : 数据访问层 DAL层不包括业务逻辑.DAL层内不允许水平调用

    BLL : 业务逻辑层BLL层内允许水平调用其它的BLL类,
    允许垂直向下调用属于自己的DAL类.两种调用方式都是基于接口注入的方式。

    SL : 服务层 它负责DTO和Entity之间的转换
    SL层内不允许水平调用,只能通过接口调用BLL层,不允许直接调用DAL层.

    UI : 界面 通常页面中的Ajax通过JQuery调用APIController来实现
    (不是直接调用Controller).


    WCF中新添加的DTO更新服务时获取不到,
    1.检查服务是否是通的
    2.是否在ISL SL层有使用这个DTO


    ///Lamda表达式New一个List
    resultModelList.DTOList =
    vresult.DTOList.Select(p => new ProductModelTagModel
    { FID = p.FID, Name = p.Name, ProductInfoID = p.ProductInfoID,
    IsDefaultModel = p.IsDefaultModel, Sequence = p.Sequence,
    Description = p.Description }).OrderBy(p => p.Sequence).ToList();

    //身份证正则中间模糊
    Regex.Replace(firstIDCard, @"(d{4})(d*)(d{3})", delegate (Match m) { return m.Groups[1].Value + "".PadLeft(m.Groups[2].Value.Length, '*') + m.Groups[3].Value; });

    //手机号正则中间模糊
    Regex.Replace(MobileNumber, @"(?im)(d{3})(d{4})(d{4})", "$1***$3");


    str.Split(new[] { "," }, StringSplitOptions.RemoveEmptyEntries);
    切割字符串,去除空字符


    $('#editorDescription').summernote({
    lang: "zh-CN",
    height: 100,
    callbacks: {
    onImageUpload: function (files) {
    var num = parseInt(Math.random() * (10 - 1)) + 1;
    OSSImagesManage.uploadImages(files[0], $("#FID").val(), num, this);
    },
    onChange: function () {
    var editContent = $('#editorDescription').summernote('code');
    $('#Description').val(editContent).change();
    }
    }, toolbar: [
    ['fontname', ['fontname']],
    ['color', ['bold', 'color']],
    ['para', ['ul', 'ol', 'paragraph']]
    ]
    });


    中文URL传值时乱码问题
    encodeURI(url); //先转码

    var reg = new RegExp("(^|&)" + "name" + "=([^&]*)(&|$)");
    var r = window.location.search.substr(1).match(reg);
    if (r != null)
    var param = decodeURI(r[2]); //解码
    $("#input_demand").val(param);


    //UEditor 限制 最大长度
    SubmitBid.Editor = UE.getEditor('editorAdvantage', {
    wordCount:false
    maximumWords:500
    });

    $('#editorDescription').summernote('code', data.form.Description)

    @(new HtmlString(@ViewBag.OperationButton))将Html字符串转为html

    @Html.Raw()也可以

    setTimeout("history.go(-1);", 1000);

    data-bind="text:com.fmoney(data.form.SellingPrice,2)"

    setTimeout('ProductBiddingDetail.Refresh()', 1000);

    Json字符串转换为集合对象
    JavaScriptSerializer Serializer = new JavaScriptSerializer();
    List<PaymentData> objs = Serializer.Deserialize<List<PaymentData>>(data.PaymentJson);

  • 相关阅读:
    [PHP] ::class的具体作用
    [linux] 查看所有的系统用户
    [PHP] composer install和composer update的区别
    [PHP] 解决composer install报错: it could not be found in any version, there may be a typo in the package name
    [git] git中origin的含义
    [git] 打标签命令
    [git] git clone指定分支代码
    [git]git中分支的概念
    [PHP] 对象和引用
    [正则]正则表达式里面的?: ?! ?= ?<=
  • 原文地址:https://www.cnblogs.com/opts/p/7026607.html
Copyright © 2011-2022 走看看