Exemple #1
0
        /// <summary>
        /// 根据唯一编号删除入库单
        /// </summary>
        /// <returns></returns>
        public ActionResult DeleteSingle()
        {
            string CompanyID = WebUtil.GetFormValue <string>("CompanyID", string.Empty);
            string SnNum     = WebUtil.GetFormValue <string>("SnNum", string.Empty);

            InStorageEntity entity = new InStorageEntity();

            entity.CompanyID = CompanyID;
            entity.SnNum     = SnNum;

            Bill <InStorageEntity, InStorDetailEntity> bill = new InStorageOrder(CompanyID);
            string returnValue = bill.Delete(entity);

            DataResult result = new DataResult();

            if (EnumHelper.GetEnumDesc <EReturnStatus>(EReturnStatus.Success) == returnValue)
            {
                result.Code    = (int)EResponseCode.Success;
                result.Message = "入库单删除成功";
            }
            else
            {
                result.Code    = (int)EResponseCode.Exception;
                result.Message = "入库单删除失败";
            }
            return(Content(JsonHelper.SerializeObject(result)));
        }
 public ActionResult Delete()
 {
     string orderNum = WebUtil.GetFormValue<string>("OrderNum", string.Empty);
     if (!orderNum.IsEmpty())
     {
         Bill<InStorageEntity, InStorDetailEntity> bill = new InStorageOrder();
         InStorageEntity entity = new InStorageEntity();
         entity.OrderNum = orderNum;
         string returnValue = bill.Delete(entity);
         this.ReturnJson.AddProperty("d", returnValue);
     }
     return Content(this.ReturnJson.ToString());
 }
        public ActionResult Delete()
        {
            string orderNum = WebUtil.GetFormValue <string>("OrderNum", string.Empty);

            if (!orderNum.IsEmpty())
            {
                Bill <InStorageEntity, InStorDetailEntity> bill = new InStorageOrder();
                InStorageEntity entity = new InStorageEntity();
                entity.OrderNum = orderNum;
                string returnValue = bill.Delete(entity);
                this.ReturnJson.AddProperty("d", returnValue);
            }
            return(Content(this.ReturnJson.ToString()));
        }
 public ActionResult DeleteBatch([ModelBinder(typeof(JsonBinder <List <string> >))] List <string> list)
 {
     if (!list.IsNullOrEmpty())
     {
         foreach (string orderNum in list)
         {
             Bill <InStorageEntity, InStorDetailEntity> bill = new InStorageOrder();
             InStorageEntity entity = new InStorageEntity();
             entity.OrderNum = orderNum;
             string returnValue = bill.Delete(entity);
             this.ReturnJson.AddProperty("d", returnValue);
         }
     }
     return(Content(this.ReturnJson.ToString()));
 }
 public ActionResult DeleteBatch([ModelBinder(typeof(JsonBinder<List<string>>))] List<string> list)
 {
     if (!list.IsNullOrEmpty())
     {
         foreach (string orderNum in list)
         {
             Bill<InStorageEntity, InStorDetailEntity> bill = new InStorageOrder();
             InStorageEntity entity = new InStorageEntity();
             entity.OrderNum = orderNum;
             string returnValue = bill.Delete(entity);
             this.ReturnJson.AddProperty("d", returnValue);
         }
     }
     return Content(this.ReturnJson.ToString());
 }