DAL 需要修改
WEB 需要修改
Model 需要修改
如果提示未生成存根 可能model没有定义
添加字段Test步骤
1 先web层添加字段Test
2 再sql中进行join执行关联
3 DAL层进行Test条件语句的添加 需要添加 string Test
if (!string.IsNullOrEmpty(Test))
{
where.And(d => d.Test== Test);
}
}
d.Test 表示 把数据库中的表定义为d d中的Test字段
注意: 表示视图中的 <>不带view开头表示表
var data = new
{
rows = from d in ListData
select new
{
ConTypeName = Kiloway.Utilities.EnumHelper.GetEnumDesc<Kiloway.Utilities.KW_Keys.ConType>(Convert.ToInt32(d.ConType)),
OpenCardName = Kiloway.Utilities.EnumHelper.GetEnumDesc<Kiloway.Utilities.KW_Keys.OpenCard>(Convert.ToInt32(d.OpenCard)),
d.ClassNo,
d.CardTypeNo,
d.CardTypeName,
d.SonClassNo,
d.Pinyin,
d.InTime,
d.PeerPerson,
d.UseBeginDate,
d.UseEndDate,
d.UseBeginTime,
d.UseEndTime,
d.UseWeek,
d.OpenCard,
d.OpenContent,
d.SaleBeginDate,
d.SaleEndDate,
d.SaleBeginTime,
d.SaleEndTime,
d.SaleMaxNum,
d.ConType,
d.InitialPrice,
d.ContinuePrice,
d.SupplementaryPrice,
d.ChangingPrice,
d.BackPrice,
d.UntiedPrice,
d.RechargeIntegra,
d.PayIntegra,
d.IsUpdatePrice,
d.IsLoss,
d.IsContinue,
d.IsFrozen,
d.IsTransfer,
d.IsReturn,
d.CheckAlcohol,
d.OperNo,
d.OperDate,
d.OpenPrice,
d.UseDay,
d.PayDiscount,
d.StopTime,
d.StopUser,
d.ClassName,
d.OperName,
d.StopUserName,
d.SonClassName,
d.Test(最新添加的字段)
},
这边需要添加数据库中字段Test
4 控制器 需要添加参数 string Test