public ActionResult DataLoad()
        {
            try
            {
                string        vender       = Request.Form["vender"].ToString();
                string        facturer     = Request.Form["facturer"].ToString();
                string        isActive     = Request.Form["isActive"].ToString();
                string        MaterialType = Request.Form["MaterialType"].ToString();
                List <string> mTypeList    = UserOperateContext.Current.getMaterialTypeList(MaterialType);
                string        MaterialID   = Request.Form["MaterialID"].ToString();

                //获取页容量
                int rows = int.Parse(Request.Form["rows"]);
                //获取请求的页码
                int page = int.Parse(Request.Form["page"]);
                //返回总行数
                int total = 0;

                var list = new I_MaterialBLL().GetMaterialList(page, rows, ref total, facturer, vender, isActive, mTypeList, MaterialID);
                return(Json(new { total = total, rows = list }, "appliction/json", JsonRequestBehavior.AllowGet));
            }

            catch (Exception e)
            {
                Dictionary <string, string> dict = new Dictionary <string, string>();
                dict.Add("InfoID", "0");
                dict.Add("InfoMessage", e.Message);
                return(this.Json(dict));
            }
        }
        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));
            }
        }
Esempio n. 3
0
        /// <summary>
        /// 获取仓库基本信息,ID 和Name,用于物资来源,物资去向下拉框的选项
        /// </summary>
        /// <returns></returns>
        public ActionResult GetStorage()
        {
            I_MaterialBLL dBLL   = new I_MaterialBLL();
            var           result = dBLL.GetStorage();

            return(Json(result));
        }
 public ActionResult GetMaterialList()
 {
     try
     {
         var list = new I_MaterialBLL().GetMaterialList();
         return(this.Json(list));
     }
     catch
     {
         return(this.Json(""));
     }
 }
 public ActionResult GetMeasure(string measureType)
 {
     try
     {
         var list = new I_MaterialBLL().GetMeasureListBy(measureType);
         return(this.Json(list));
     }
     catch
     {
         return(this.Json(""));
     }
 }
Esempio n. 6
0
        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));
            }
        }
Esempio n. 7
0
        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));
            }
        }
Esempio n. 9
0
        public ActionResult DataLoad()

        // int page, int rows, string order, string sort, DateTime startTime, DateTime endTime, string deliveryType,
        //string deliveryCode, string entryStorageCode, string operatorName, string mName, string receivingStoreID, string consigneeName, string mCode)

        {
            DateTime startTime        = Convert.ToDateTime(Request.Form["startTime"]);
            DateTime endTime          = Convert.ToDateTime(Request.Form["endTime"]);
            string   deliveryType     = Request.Form["deliveryType"].ToString();
            string   deliveryCode     = Request.Form["deliveryCode"].ToString();
            string   entryStorageCode = Request.Form["entryStorageCode"].ToString();
            string   operatorName     = Request.Form["operatorName"].ToString();
            string   mName            = Request.Form["mName"].ToString();
            string   receivingStoreID = Request.Form["receivingStoreID"].ToString();
            string   consigneeName    = Request.Form["consigneeName"].ToString();
            string   mCode            = Request.Form["mCode"].ToString();

            //获取页容量
            int rows = int.Parse(Request.Form["rows"]);
            //获取请求的页码
            int page = int.Parse(Request.Form["page"]);

            try
            {
                I_MaterialBLL dBLL = new I_MaterialBLL();
                var           list = dBLL.GetDeliveryOrder(page, rows, startTime, endTime, deliveryType,
                                                           deliveryCode, entryStorageCode, operatorName, mName, receivingStoreID, consigneeName, mCode);

                return(this.Json(list, "appliction/json", JsonRequestBehavior.AllowGet));
            }
            catch (Exception ex)
            {
                Dictionary <string, string> dict = new Dictionary <string, string>();
                dict.Add("InfoID", "0");
                dict.Add("InfoMessage", ex.Message);
                return(this.Json(dict));
            }
        }