Example #1
0
 public JsonResult DeleteProvider(string id)
 {
     bool bl = new StockBusiness().UpdateProviderStatus(id, EnumStatus.Delete, OperateIP, CurrentUser.UserID);
     JsonDictionary.Add("status", bl);
     return new JsonResult
     {
         Data = JsonDictionary,
         JsonRequestBehavior = JsonRequestBehavior.AllowGet
     };
 }
Example #2
0
 /// <summary>
 /// 审核上架
 /// </summary>
 /// <param name="ids"></param>
 /// <returns></returns>
 public JsonResult AuditPurchase(string ids)
 {
     bool bl = new StockBusiness().AuditStorageIn(ids, CurrentUser.UserID, OperateIP, CurrentUser.AgentID, CurrentUser.ClientID);
     JsonDictionary.Add("Status", bl);
     return new JsonResult
     {
         Data = JsonDictionary,
         JsonRequestBehavior = JsonRequestBehavior.AllowGet
     };
 }
Example #3
0
        /// <summary>
        ///  删除单据
        /// </summary>
        /// <param name="docid"></param>
        /// <returns></returns>
        public JsonResult DeletePurchase(string docid)
        {
            var bl = new StockBusiness().DeleteDoc(docid, CurrentUser.UserID, OperateIP, CurrentUser.ClientID);
            JsonDictionary.Add("Status", bl);

            return new JsonResult
            {
                Data = JsonDictionary,
                JsonRequestBehavior = JsonRequestBehavior.AllowGet
            };
        }
Example #4
0
 public JsonResult AuditOverflowDoc(string docid)
 {
     int result = 0;
     string errinfo = "";
     var bl = new StockBusiness().AuditOverflowDoc(docid, CurrentUser.UserID, OperateIP, CurrentUser.ClientID, ref result, ref errinfo);
     JsonDictionary.Add("result", result);
     JsonDictionary.Add("errinfo", errinfo);
     return new JsonResult
     {
         Data = JsonDictionary,
         JsonRequestBehavior = JsonRequestBehavior.AllowGet
     };
 }
Example #5
0
        /// <summary>
        /// 更换入库仓库和货位
        /// </summary>
        /// <param name="autoid"></param>
        /// <param name="wareid"></param>
        /// <param name="depotid"></param>
        /// <returns></returns>
        public JsonResult UpdateStorageDetailWare(string autoid, string wareid, string depotid)
        {
            var bl = new StockBusiness().UpdateStorageDetailWare(autoid, wareid, depotid, CurrentUser.UserID, OperateIP, CurrentUser.ClientID);
            JsonDictionary.Add("Status", bl);

            return new JsonResult
            {
                Data = JsonDictionary,
                JsonRequestBehavior = JsonRequestBehavior.AllowGet
            };
        }
Example #6
0
        public JsonResult SavaProviders(string entity)
        {
            JavaScriptSerializer serializer = new JavaScriptSerializer();
            ProvidersEntity model = serializer.Deserialize<ProvidersEntity>(entity);

            string id = "";
            if (string.IsNullOrEmpty(model.ProviderID))
            {
                id = new StockBusiness().AddProviders(model.Name, model.Contact, model.MobileTele, "", model.CityCode, model.Address, model.Remark, CurrentUser.UserID, CurrentUser.AgentID, CurrentUser.ClientID);
            }
            else
            {
                bool bl = new StockBusiness().UpdateProvider(model.ProviderID, model.Name, model.Contact, model.MobileTele, "", model.CityCode, model.Address, model.Remark, CurrentUser.UserID, CurrentUser.AgentID, CurrentUser.ClientID);
                if (bl)
                {
                    id = model.ProviderID;
                }
            }
            JsonDictionary.Add("ID", id);
            return new JsonResult
            {
                Data = JsonDictionary,
                JsonRequestBehavior = JsonRequestBehavior.AllowGet
            };
        }
Example #7
0
 public JsonResult GetProviderDetail(string id)
 {
     var model = new StockBusiness().GetProviderByID(id);
     JsonDictionary.Add("model", model);
     return new JsonResult
     {
         Data = JsonDictionary,
         JsonRequestBehavior = JsonRequestBehavior.AllowGet
     };
 }
Example #8
0
        public JsonResult UpdateStorageDetailBatch(string docid, string autoid, string batch)
        {
            var bl = new StockBusiness().UpdateStorageDetailBatch(docid, autoid, batch, CurrentUser.UserID, OperateIP, CurrentUser.ClientID);
            JsonDictionary.Add("status", bl);

            return new JsonResult
            {
                Data = JsonDictionary,
                JsonRequestBehavior = JsonRequestBehavior.AllowGet
            };
        }
Example #9
0
        public JsonResult InvalidStorageDoc(string docid)
        {
            var bl = new StockBusiness().InvalidDoc(docid, CurrentUser.UserID, OperateIP, CurrentUser.ClientID);
            JsonDictionary.Add("status", bl);

            return new JsonResult
            {
                Data = JsonDictionary,
                JsonRequestBehavior = JsonRequestBehavior.AllowGet
            };
        }
 public JsonResult AuditPurchase(string docid, int doctype, int isover, string details, string remark)
 {
     int result = 0;
     string errinto = "";
     bool bl = new StockBusiness().AuditStorageIn(docid, doctype, isover, details, remark, CurrentUser.UserID, OperateIP, CurrentUser.AgentID, CurrentUser.ClientID, ref result, ref errinto);
     JsonDictionary.Add("status", bl);
     return new JsonResult
     {
         Data = JsonDictionary,
         JsonRequestBehavior = JsonRequestBehavior.AllowGet
     };
 }