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)); } }
public ActionResult MeasureEdit() { string sDetailInfo = Request.Form["sMaterialInfo"].ToString(); I_Material model = JsonHelper.GetJsonInfoBy <I_Material>(sDetailInfo); if (model.RealPrice == null) { model.RealPrice = 0; } ; int res = new I_MaterialBLL().Modify(model, "Name", "MTypeID", "Manufacturer", "Vendor", "MCode", "Unit", "Specification", "RealPrice", "Remark", "AlarmCounts", "PinYin", "FeeScale", "LimitMaxPrice", "GiveMedicineWay", "SN", "OtherTypeID", "IsActive"); if (res > 0) { return(this.JsonResult(Utility.E_JsonResult.OK, "修改成功!", null, null)); } else { return(this.JsonResult(Utility.E_JsonResult.Error, "修改失败", null, null)); } }
public ActionResult MeasureAdd() { string sDetailInfo = Request.Form["sMaterialInfo"].ToString(); I_Material info = JsonHelper.GetJsonInfoBy <I_Material>(sDetailInfo); if (info.RealPrice == null) { info.RealPrice = 0; } ; int res = new I_MaterialBLL().Add(info); if (res > 0) { return(this.JsonResult(Utility.E_JsonResult.OK, "保存成功!", null, null)); } else { return(this.JsonResult(Utility.E_JsonResult.Error, "保存失败", null, null)); } }
public ActionResult MaterialAdd() { string sDetailInfo = Request.Form["sMaterialInfo"].ToString(); I_Material info = JsonHelper.GetJsonInfoBy <I_Material>(sDetailInfo); //info.IsActive = true; info.CreatorDate = DateTime.Now; info.CreatorName = UserOperateContext.Current.Session_UsrInfo.Name; // info.OtherTypeID = "NULLTYPE"; //info.FeeScale=1; //info.LimitMaxPrice = 1000; int res = new I_MaterialBLL().Add(info); if (res > 0) { return(this.JsonResult(Utility.E_JsonResult.OK, "保存成功!", null, null)); } else { return(this.JsonResult(Utility.E_JsonResult.Error, "保存失败", null, null)); } }
//分页 public static int TurnPage(ref List<M_Material> Obj, int Page, int PageSize, ref string ErrMsg) { I_Material I = (D_Material)SimpleFactory.CreateObject(DBType.Material); return I.TurnPage(ref Obj, Page, PageSize, ref ErrMsg); }
//查询单个(查ID) public static int Select(ref M_Material Obj, int ID, ref string ErrMsg) { I_Material I = (D_Material)SimpleFactory.CreateObject(DBType.Material); return I.Select(ref Obj, ID, ref ErrMsg); }
//更新单个(查ID) public static int Update(M_Material Obj, ref string ErrMsg) { I_Material I = (D_Material)SimpleFactory.CreateObject(DBType.Material); return I.Update(Obj, ref ErrMsg); }
//插入多个 public static int Insert(ref List<M_Material> Obj, ref string ErrMsg) { I_Material I = (D_Material)SimpleFactory.CreateObject(DBType.Material); return I.Insert(ref Obj, ref ErrMsg); }
//删除单个(查ID) public static int Delete(int ID, ref string ErrMsg) { I_Material I = (D_Material)SimpleFactory.CreateObject(DBType.Material); return I.Delete(ID, ref ErrMsg); }
/// <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); }