zoukankan      html  css  js  c++  java
  • easyUI MVC3一些注意的东东(2)

    一、验证输入是小数的方法:

      例子:

    <input id="Residualvalue" value="@Model.Residualvalue" class="easyui-numberbox" data-options="precision:2,required:true" />

    二、多个表的leftjoin

    例子:

     var q = from e in db.FA_Assert
                        join t in db.FA_AssertType on e.TypeID equals t.Id
                        join d in db.Sys_Department on e.BelongDepartmentID equals d.ID into td
                        from d in td.DefaultIfEmpty()
                        join u in db.Sys_User on e.KeeperID equals u.ID into tu from u in tu.DefaultIfEmpty()
                        join i in db.FA_DicItem on e.GetMethodID equals i.ID into ti from i in ti.DefaultIfEmpty()
                        join p in db.FA_DicItem on e.DepreciationMethodID equals p.ID into tp from p in tp.DefaultIfEmpty()
                        where e.TypeID ==id
                        orderby e.ID
                        select new
                        {
                            ID = e.ID,
                            AssocateID = e.AssocateID,
                            TypeName = t.Name ,
                            AssertName = e.AssertName,
                            GetMethodID = i.Dic_ItemName ,
                            OriginalValue = e.OriginalValue,
                            Count = e.Count,
                            GetDate = e.GetDate,
                            UsefulLife = e.UsefulLife,
                            DepreciationMethodID = e.DepreciationMethodID  ,
                            Residualvalue = e.Residualvalue,
                            BelongDepartmentID = d.DeptName ,
                            KeeperID = u.NickName ,
                            PicID = e.PicID,
                            BarCode = e.BarCode
                        };
  • 相关阅读:
    jquery
    模板库
    Luogu P1902 刺杀大使
    8.20模拟赛再次观光记
    Luogu P1122 最大子树和
    Luogu P1470 最长前缀 Longest Prefix
    8.18爆炸记
    Luogu P1388 算式
    Luogu P1103 书本整理
    8.17
  • 原文地址:https://www.cnblogs.com/zsanhong/p/2992840.html
Copyright © 2011-2022 走看看