/// <summary> /// 转换成pocos 实体 纯净的I_Material 没有导航属性,避免了自动生成有外键关系的Model /// </summary> /// <returns></returns> public I_Material ToPOCO() { I_Material poco = new I_Material() { ID = this.ID, Name = this.Name, MTypeID = this.MTypeID, Manufacturer = this.Manufacturer, Vendor = this.Vendor, Unit = this.Unit, Specification = this.Specification, QRCode = this.QRCode, Remark = this.Remark, CreatorName = this.CreatorName, CreatorDate = this.CreatorDate, PinYin = this.PinYin, IsActive = this.IsActive, RealPrice = this.RealPrice, AlarmCounts = this.AlarmCounts, MCode = this.MCode, OtherTypeID = this.OtherTypeID, GiveMedicineWay = this.GiveMedicineWay, LimitMaxPrice = this.LimitMaxPrice, SN = this.SN, FeeScale = this.FeeScale }; return(poco); }
public ActionResult MaterialDisable() { int id = Convert.ToInt32(Request.Form["id"]); bool disable = Convert.ToBoolean(Request.Form["disable"]); I_Material model = new I_Material(); model.IsActive = disable; model.ID = id; int res = new I_MaterialBLL().Modify(model, "IsActive"); string tInfo = ""; string finfo = ""; if (disable) { tInfo = "设置“<span style='color:darkgreen'>有效</span>”成功!"; finfo = "设置“<span style='color:darkgreen'>有效</span>”失败!"; } else { tInfo = "设置“<span style='color:red'>无效</span>”成功!"; finfo = "设置“<span style='color:red'>无效</span>”失败!"; } if (res > 0) return this.JsonResult(Utility.E_JsonResult.OK, tInfo, null, null); else return this.JsonResult(Utility.E_JsonResult.Error, finfo, null, null); }
/// <summary> /// 原始查询,传统sql语句执行方法 /// </summary> /// <returns></returns> //private static readonly IBaseDAL<II_MaterialDAL> mDAL = new IBaseDAL<II_MaterialDAL>; public object GetMaterialList(int pageindex,int pageSize, DateTime startTime, DateTime endTime, I_Material materialmodel) { return true; }