public ActionResult DeleteCheckData() { int id = WebUtil.GetFormValue<int>("id",0); CheckDataEntity entity = new CheckDataEntity(); entity.Where(a => a.ID == id); CheckDataProvider provider = new CheckDataProvider(); int line = provider.DeleteCheckData(entity); if (line > 0) { this.ReturnJson.AddProperty("Key", "1000"); } return Content(this.ReturnJson.ToString()); }
/// <summary> /// 获得盘点盘差信息 /// </summary> /// <param name="orderNum"></param> /// <param name="pageInfo"></param> /// <returns></returns> public List<CheckDataEntity> GetCheckDifList(string orderNum, ref PageInfo pageInfo) { CheckDataEntity entity = new CheckDataEntity(); entity.IncludeAll(); entity.Where(a => a.OrderNum == orderNum); entity.OrderBy(a => a.ID, EOrderBy.ASC); int rowCount = 0; List<CheckDataEntity> listResult = this.CheckData.GetList(entity,pageInfo.PageSize,pageInfo.PageIndex,out rowCount); pageInfo.PageCount = rowCount; return listResult; }
/// <summary> /// 获取盘点单据Excel数据 /// </summary> /// <returns></returns> public List<CheckDataEntity> GetCheckOrder(string orderNum) { CheckDataEntity entity = new CheckDataEntity(); entity.IncludeAll(); entity.Where(a => a.OrderNum == orderNum); List<CheckDataEntity> listResult = this.CheckData.GetList(entity); return listResult; }
/// <summary> /// 修改盘点差异表中盘点的数据 /// </summary> /// <returns></returns> public int UpdateCheckInfoNum(CheckDataEntity entity) { entity.IncludeFirstQty(true); entity.Where(a => a.OrderNum == entity.OrderNum) .And(a => a.LocalNum == entity.LocalNum) .And(a => a.StorageNum == entity.StorageNum) .And(a => a.ProductNum == entity.ProductNum) .And(a => a.BarCode == entity.BarCode) .And(a=>a.BatchNum==entity.BatchNum) ; int line = this.CheckData.Update(entity); return line; }