コード例 #1
0
        public JsonResult GetDetail(Int32 ID)
        {
            List <T_OutStockDetailInfo> modelList = new List <T_OutStockDetailInfo>();
            string strError = "";

            tfunc_detail.GetModelListByHeaderID(ref modelList, ID, ref strError);
            return(Json(modelList, JsonRequestBehavior.AllowGet));
        }
コード例 #2
0
        public bool GetOutStockDetailForPrint(string strErpVoucherNo, ref T_OutStockInfo model, ref string strError)
        {
            try
            {
                if (string.IsNullOrEmpty(strErpVoucherNo))
                {
                    strError = "传入的ERP单号为空!";
                    return(false);
                }

                T_OutStock_DB tdb = new T_OutStock_DB();
                model = tdb.GetOutStockDetailForPrint(strErpVoucherNo);

                if (model == null)
                {
                    strError = "单号不存在!" + strErpVoucherNo;
                    return(false);
                }

                if (model.VoucherType == 24)
                {
                    if (string.IsNullOrEmpty(model.ShipDFlg) || model.ShipDFlg == "N")
                    {
                        strError = "单据不需要打印发货清单!" + strErpVoucherNo;
                        return(false);
                    }
                }

                List <T_OutStockDetailInfo> modelList = new List <T_OutStockDetailInfo>();
                T_OutStockDetail_Func       tfunc     = new T_OutStockDetail_Func();
                bool bSucc = tfunc.GetModelListByHeaderID(ref modelList, model.ID, ref strError);
                if (bSucc == false)
                {
                    return(false);
                }

                if (string.IsNullOrEmpty(model.ShipPFlg) || model.ShipPFlg == "N")
                {
                    modelList.ForEach(t => t.Price  = 0);
                    modelList.ForEach(t => t.Amount = 0);
                }

                model.lstDetail = modelList;

                return(true);
            }
            catch (Exception ex)
            {
                strError = ex.Message;
                return(false);
            }
        }
コード例 #3
0
        public bool GetAllT_OutStockDetailByHeaderID(ref List <T_OutStockDetailInfo> modelList, int headerID, ref string strError)
        {
            T_OutStockDetail_Func tfunc = new T_OutStockDetail_Func();

            return(tfunc.GetModelListByHeaderID(ref modelList, headerID, ref strError));
        }