Ejemplo n.º 1
0
 public JsonResult GetCustomerSources()
 {
     var list = new SystemBusiness().GetCustomSources(CurrentUser.AgentID, CurrentUser.ClientID);
     JsonDictionary.Add("items", list);
     return new JsonResult
     {
         Data = JsonDictionary,
         JsonRequestBehavior = JsonRequestBehavior.AllowGet
     };
 }
Ejemplo n.º 2
0
 public ActionResult OrderStages(string id)
 {
     var model = new SystemBusiness().GetOrderProcessByID(id, CurrentUser.AgentID, CurrentUser.ClientID);
     if (string.IsNullOrEmpty(model.ProcessID))
     {
         return Redirect("/System/OrderProcess");
     }
     ViewBag.Model = model;
     ViewBag.Items = new SystemBusiness().GetOrderStages(id, CurrentUser.AgentID, CurrentUser.ClientID);
     return View();
 }
Ejemplo n.º 3
0
        public JsonResult GetTeams()
        {

            var list = new SystemBusiness().GetTeams(CurrentUser.AgentID).ToList();
            
            JsonDictionary.Add("items", list);
            return new JsonResult
            {
                Data = JsonDictionary,
                JsonRequestBehavior = JsonRequestBehavior.AllowGet
            };
        }
Ejemplo n.º 4
0
 /// <summary>
 /// 编辑货位状态
 /// </summary>
 /// <param name="id"></param>
 /// <param name="status"></param>
 /// <returns></returns>
 public JsonResult UpdateDepotSeatStatus(string id, int status)
 {
     bool bl = new SystemBusiness().UpdateDepotSeatStatus(id, (IntFactoryEnum.EnumStatus)status, CurrentUser.UserID, CurrentUser.ClientID);
     JsonDictionary.Add("Status", bl);
     return new JsonResult
     {
         Data = JsonDictionary,
         JsonRequestBehavior = JsonRequestBehavior.AllowGet
     };
 }
Ejemplo n.º 5
0
        /// <summary>
        /// 获取货位详情
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public JsonResult GetDepotByID(string id = "")
        {
            var model = new SystemBusiness().GetDepotByID(id);
            JsonDictionary.Add("Item", model);

            return new JsonResult
            {
                Data = JsonDictionary,
                JsonRequestBehavior = JsonRequestBehavior.AllowGet
            };
        }
Ejemplo n.º 6
0
 /// <summary>
 /// 获取货位列表
 /// </summary>
 /// <param name="keyWords"></param>
 /// <param name="pageSize"></param>
 /// <param name="pageIndex"></param>
 /// <param name="totalCount"></param>
 /// <returns></returns>
 public JsonResult GetDepotSeats(string wareid, string keyWords, int pageSize, int pageIndex, int totalCount)
 {
     int pageCount = 0;
     List<DepotSeat> list = new SystemBusiness().GetDepotSeats(keyWords, pageSize, pageIndex, ref totalCount, ref pageCount, CurrentUser.ClientID, wareid);
     JsonDictionary.Add("Items", list);
     JsonDictionary.Add("TotalCount", totalCount);
     JsonDictionary.Add("PageCount", pageCount);
     return new JsonResult
     {
         Data = JsonDictionary,
         JsonRequestBehavior = JsonRequestBehavior.AllowGet
     };
 }
Ejemplo n.º 7
0
 /// <summary>
 /// 删除仓库
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public JsonResult DeleteWareHouse(string id)
 {
     bool bl = new SystemBusiness().UpdateWareHouseStatus(id, IntFactoryEnum.EnumStatus.Delete, CurrentUser.UserID, CurrentUser.ClientID);
     JsonDictionary.Add("Status", bl);
     return new JsonResult
     {
         Data = JsonDictionary,
         JsonRequestBehavior = JsonRequestBehavior.AllowGet
     };
 }
Ejemplo n.º 8
0
 /// <summary>
 /// 根据ID获取仓库
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public JsonResult GetWareHouseByID(string id)
 {
     WareHouse model = new SystemBusiness().GetWareByID(id, CurrentUser.ClientID);
     JsonDictionary.Add("model", model);
     return new JsonResult
     {
         Data = JsonDictionary,
         JsonRequestBehavior = JsonRequestBehavior.AllowGet
     };
 }
Ejemplo n.º 9
0
 public JsonResult DeleteOrderProcess(string id)
 {
     int result = 0;
     bool bl = new SystemBusiness().DeleteOrderProcess(id, CurrentUser.UserID, OperateIP, CurrentUser.AgentID, CurrentUser.ClientID, ref result);
     JsonDictionary.Add("result", result);
     return new JsonResult
     {
         Data = JsonDictionary,
         JsonRequestBehavior = JsonRequestBehavior.AllowGet
     };
 }
Ejemplo n.º 10
0
        public JsonResult SaveOrderProcess(string entity)
        {
            JavaScriptSerializer serializer = new JavaScriptSerializer();
            OrderProcessEntity model = serializer.Deserialize<OrderProcessEntity>(entity);

            if (string.IsNullOrEmpty(model.ProcessID))
            {
                model.ProcessID = new SystemBusiness().CreateOrderProcess(model.ProcessName, model.ProcessType, model.CategoryType, model.PlanDays, model.IsDefault, CurrentUser.UserID, CurrentUser.UserID, CurrentUser.AgentID, CurrentUser.ClientID);
            }
            else
            {
                bool bl = new SystemBusiness().UpdateOrderProcess(model.ProcessID, model.ProcessName, model.PlanDays, CurrentUser.UserID, OperateIP, CurrentUser.AgentID, CurrentUser.ClientID);
                if (!bl)
                {
                    model.ProcessID = "";
                }

            }
            model.Owner = OrganizationBusiness.GetUserByUserID(CurrentUser.UserID, CurrentUser.AgentID);
            JsonDictionary.Add("model", model);
            return new JsonResult
            {
                Data = JsonDictionary,
                JsonRequestBehavior = JsonRequestBehavior.AllowGet
            };
        }
Ejemplo n.º 11
0
 public JsonResult GetOrderProcessByID(string id)
 {
     var model = new SystemBusiness().GetOrderProcessByID(id, CurrentUser.AgentID, CurrentUser.ClientID);
     JsonDictionary.Add("model", model);
     return new JsonResult
     {
         Data = JsonDictionary,
         JsonRequestBehavior = JsonRequestBehavior.AllowGet
     };
 }
Ejemplo n.º 12
0
 public JsonResult GetOrderProcess(int type = -1)
 {
     var list = new SystemBusiness().GetOrderProcess(CurrentUser.AgentID, CurrentUser.ClientID).ToList();
     if (type > 0)
     {
         JsonDictionary.Add("items", list.Where(m => m.ProcessType == type).ToList());
     }
     else
     {
         JsonDictionary.Add("items", list);
     }
     return new JsonResult
     {
         Data = JsonDictionary,
         JsonRequestBehavior = JsonRequestBehavior.AllowGet
     };
 }
Ejemplo n.º 13
0
        public JsonResult SaveCustomStage(string entity)
        {
            JavaScriptSerializer serializer = new JavaScriptSerializer();
            CustomStageEntity model = serializer.Deserialize<CustomStageEntity>(entity);

            int result = 0;

            if (string.IsNullOrEmpty(model.StageID))
            {
                model.StageID = new SystemBusiness().CreateCustomStage(model.StageName, model.Sort, "", CurrentUser.UserID, CurrentUser.AgentID, CurrentUser.ClientID, out result);
            }
            else
            {
                bool bl = new SystemBusiness().UpdateCustomStage(model.StageID, model.StageName, CurrentUser.UserID, OperateIP, CurrentUser.AgentID, CurrentUser.ClientID);
                if (bl)
                {
                    result = 1;
                }
            }
            JsonDictionary.Add("status", result);
            JsonDictionary.Add("model", model);
            return new JsonResult
            {
                Data = JsonDictionary,
                JsonRequestBehavior = JsonRequestBehavior.AllowGet
            };
        }
Ejemplo n.º 14
0
 public JsonResult GetLableColorByColorID(int colorid, int lableType)
 {
     var model = new SystemBusiness().GetLableColorColorID(CurrentUser.ClientID, colorid, lableType);
     JsonDictionary.Add("model", model);
     return new JsonResult
     {
         Data = JsonDictionary,
         JsonRequestBehavior = JsonRequestBehavior.AllowGet
     };
 }
Ejemplo n.º 15
0
        public JsonResult SaveTeam(string entity)
        {
            JavaScriptSerializer serializer = new JavaScriptSerializer();
            TeamEntity model = serializer.Deserialize<TeamEntity>(entity);

            if (string.IsNullOrEmpty(model.TeamID))
            {
                model.TeamID = new SystemBusiness().CreateTeam(model.TeamName, CurrentUser.UserID, CurrentUser.AgentID, CurrentUser.ClientID);
            }
            else
            {
                bool bl = new SystemBusiness().UpdateTeam(model.TeamID, model.TeamName, CurrentUser.UserID, OperateIP, CurrentUser.AgentID, CurrentUser.ClientID);
                if (!bl)
                {
                    model.TeamID = "";
                }
            }
            JsonDictionary.Add("model", model);
            return new JsonResult
            {
                Data = JsonDictionary,
                JsonRequestBehavior = JsonRequestBehavior.AllowGet
            };
        }
Ejemplo n.º 16
0
 public JsonResult GetAllWareHouses()
 {
     List<WareHouse> list = new SystemBusiness().GetWareHouses(CurrentUser.ClientID);
     JsonDictionary.Add("items", list);
     return new JsonResult
     {
         Data = JsonDictionary,
         JsonRequestBehavior = JsonRequestBehavior.AllowGet
     };
 }
Ejemplo n.º 17
0
        public JsonResult SaveOrderStage(string entity)
        {
            JavaScriptSerializer serializer = new JavaScriptSerializer();
            OrderStageEntity model = serializer.Deserialize<OrderStageEntity>(entity);

            int result = 0;

            if (string.IsNullOrEmpty(model.StageID))
            {
                model.StageID = new SystemBusiness().CreateOrderStage(model.StageName, model.Sort, model.Mark, model.MaxHours, "", model.ProcessID, CurrentUser.UserID, CurrentUser.AgentID, CurrentUser.ClientID, out result);

                model.Owner = OrganizationBusiness.GetUserByUserID(CurrentUser.UserID, CurrentUser.AgentID);
            }
            else
            {
                bool bl = new SystemBusiness().UpdateOrderStage(model.StageID, model.StageName, model.Mark, model.MaxHours, model.ProcessID, CurrentUser.UserID, OperateIP, CurrentUser.AgentID, CurrentUser.ClientID);
                if (bl)
                {
                    result = 1;
                }
            }
            
            JsonDictionary.Add("status", result);
            JsonDictionary.Add("model", model);
            return new JsonResult
            {
                Data = JsonDictionary,
                JsonRequestBehavior = JsonRequestBehavior.AllowGet
            };
        }
Ejemplo n.º 18
0
        /// <summary>
        /// 保存仓库
        /// </summary>
        /// <param name="ware"></param>
        /// <returns></returns>
        public JsonResult SaveWareHouse(string ware)
        {
            JavaScriptSerializer serializer = new JavaScriptSerializer();
            WareHouse model = serializer.Deserialize<WareHouse>(ware);

            string id = string.Empty;
            if (string.IsNullOrEmpty(model.WareID))
            {
                id = new SystemBusiness().AddWareHouse(model.WareCode, model.Name, model.ShortName, model.CityCode, model.Status.Value, model.DepotCode, model.DepotName, model.Description, CurrentUser.UserID, CurrentUser.ClientID);
            }
            else if (new SystemBusiness().UpdateWareHouse(model.WareID, model.WareCode, model.Name, model.ShortName, model.CityCode, model.Status.Value, model.Description, CurrentUser.UserID, CurrentUser.ClientID))
            {
                id = model.WareID;
            }


            JsonDictionary.Add("ID", id);
            return new JsonResult
            {
                Data = JsonDictionary,
                JsonRequestBehavior = JsonRequestBehavior.AllowGet
            };
        }
Ejemplo n.º 19
0
 public JsonResult UpdateOrderStageOwner(string id, string processid, string userid)
 {
     bool bl = new SystemBusiness().UpdateOrderStageOwner(id, processid, userid, CurrentUser.UserID, OperateIP, CurrentUser.AgentID, CurrentUser.ClientID);
     JsonDictionary.Add("status", bl);
     return new JsonResult
     {
         Data = JsonDictionary,
         JsonRequestBehavior = JsonRequestBehavior.AllowGet
     };
 }
Ejemplo n.º 20
0
        /// <summary>
        /// 保存货位
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public JsonResult SaveDepotSeat(string obj)
        {
            JavaScriptSerializer serializer = new JavaScriptSerializer();
            DepotSeat model = serializer.Deserialize<DepotSeat>(obj);

            string id = string.Empty;
            if (string.IsNullOrEmpty(model.DepotID))
            {
                id = new SystemBusiness().AddDepotSeat(model.DepotCode, model.WareID, model.Name, model.Status.Value, model.Description, CurrentUser.UserID, CurrentUser.ClientID);
            }
            else if (new SystemBusiness().UpdateDepotSeat(model.DepotID, model.DepotCode, model.Name, model.Status.Value, model.Description, CurrentUser.UserID, CurrentUser.ClientID))
            {
                id = model.WareID;
            }


            JsonDictionary.Add("ID", id);
            return new JsonResult
            {
                Data = JsonDictionary,
                JsonRequestBehavior = JsonRequestBehavior.AllowGet
            };
        }
Ejemplo n.º 21
0
 public JsonResult DeleteOrderType(string id)
 {
     bool bl = new SystemBusiness().DeleteOrderType(id, CurrentUser.UserID, OperateIP, CurrentUser.AgentID, CurrentUser.ClientID);
     JsonDictionary.Add("status", bl);
     return new JsonResult
     {
         Data = JsonDictionary,
         JsonRequestBehavior = JsonRequestBehavior.AllowGet
     };
 }
Ejemplo n.º 22
0
 /// <summary>
 /// 根据仓库获取货位
 /// </summary>
 /// <param name="wareid"></param>
 /// <returns></returns>
 public JsonResult GetDepotSeatsByWareID(string wareid)
 {
     List<DepotSeat> list = new SystemBusiness().GetDepotSeatsByWareID(wareid, CurrentUser.ClientID);
     JsonDictionary.Add("Items", list);
     return new JsonResult
     {
         Data = JsonDictionary,
         JsonRequestBehavior = JsonRequestBehavior.AllowGet
     };
 }
Ejemplo n.º 23
0
 public JsonResult UpdateOrderCategory(string categoryid, string pid, int status)
 {
     bool bl = new SystemBusiness().UpdateOrderCategory(categoryid, pid, status, CurrentUser.ClientID);
     JsonDictionary.Add("status", bl);
     return new JsonResult
     {
         Data = JsonDictionary,
         JsonRequestBehavior = JsonRequestBehavior.AllowGet
     };
 }
Ejemplo n.º 24
0
 /// <summary>
 /// 删除货位
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public JsonResult DeleteDepotSeat(string id)
 {
     bool bl = new SystemBusiness().DeleteDepotSeat(id, CurrentUser.UserID, CurrentUser.ClientID);
     JsonDictionary.Add("Status", bl);
     return new JsonResult
     {
         Data = JsonDictionary,
         JsonRequestBehavior = JsonRequestBehavior.AllowGet
     };
 }
Ejemplo n.º 25
0
        public JsonResult GetOrderCategorys()
        {

            var list = new SystemBusiness().GetOrderCategorys(CurrentUser.ClientID);
            JsonDictionary.Add("items", list);
            return new JsonResult
            {
                Data = JsonDictionary,
                JsonRequestBehavior = JsonRequestBehavior.AllowGet
            };
        }
Ejemplo n.º 26
0
 public JsonResult UpdateDepotSeatSort(string depotid, string wareid, int type)
 {
     bool bl = new SystemBusiness().UpdateDepotSeatSort(depotid, wareid, type);
     JsonDictionary.Add("status", bl);
     return new JsonResult
     {
         Data = JsonDictionary,
         JsonRequestBehavior = JsonRequestBehavior.AllowGet
     };
 }
Ejemplo n.º 27
0
 public JsonResult GetStageItems(string stageid)
 {
     var list = new SystemBusiness().GetCustomStageByID(stageid, CurrentUser.AgentID, CurrentUser.ClientID).StageItem;
     JsonDictionary.Add("items", list);
     return new JsonResult
     {
         Data = JsonDictionary,
         JsonRequestBehavior = JsonRequestBehavior.AllowGet
     };
 }