Example #1
0
        public SAL_OUTSTOCK__FEntity[] GetEntitys(string FBillNO)
        {
            List <SAL_OUTSTOCK__FEntity> lsof = new List <SAL_OUTSTOCK__FEntity>();

            SqlParameter[] Param = new SqlParameter[] { new SqlParameter("@FBillNo", FBillNO) };
            using (SqlDataReader sdrDetail = SqlHelper.ExecuteReader(strcon, CommandType.Text, "exec dbo.p_edb_GetEntitys @FBillNo", Param))
            {
                while (sdrDetail.Read())
                {
                    string sFOwnerID = "01";
                    string sFUnitID  = "Pcs";
                    string sFNumber  = sdrDetail["FNumber"].ToString();
                    SAL_OUTSTOCK_BD_MATERIAL sFMaterialID = new SAL_OUTSTOCK_BD_MATERIAL(sFNumber);
                    SAL_OUTSTOCK__FEntity    sof          = new SAL_OUTSTOCK__FEntity(sFOwnerID, sFUnitID, sFMaterialID);
                    sof.FUnitID.FNumber  = "Pcs";
                    sof.FBASEARQTY       = (sdrDetail["FQty"] == null || sdrDetail["FQty"].ToString() == "" ? "1" : sdrDetail["FQty"].ToString());
                    sof.FPriceUnitQty    = (sdrDetail["FQty"] == null || sdrDetail["FQty"].ToString() == "" ? "1" : sdrDetail["FQty"].ToString());
                    sof.FInventoryQty    = (sdrDetail["FQty"] == null || sdrDetail["FQty"].ToString() == "" ? "1" : sdrDetail["FQty"].ToString());
                    sof.FRealQty         = (sdrDetail["FQty"] == null || sdrDetail["FQty"].ToString() == "" ? "1": sdrDetail["FQty"].ToString());
                    sof.FPrice           = (sdrDetail["FPrice"].ToString() == "" || sdrDetail["FPrice"] == null ? 0 : decimal.Parse(sdrDetail["FPrice"].ToString()));
                    sof.FTaxNetPrice     = (sdrDetail["FPrice"].ToString() == "" || sdrDetail["FPrice"] == null ? 0 : decimal.Parse(sdrDetail["FPrice"].ToString()));
                    sof.FTaxPrice        = (sdrDetail["FPrice"].ToString() == "" || sdrDetail["FPrice"] == null ? 0 : decimal.Parse(sdrDetail["FPrice"].ToString()));
                    sof.FIsFree          = (sdrDetail["FPrice"].ToString() == "" || sdrDetail["FPrice"] == null || decimal.Parse(sdrDetail["FPrice"].ToString()) == 0 ? "true" :"false");
                    sof.F_PAEZ_Text3     = sdrDetail["FOut_tid"].ToString();
                    sof.FAmount          = decimal.Parse(sdrDetail["FAmount"].ToString());
                    sof.FAmount_LC       = decimal.Parse(sdrDetail["FAmount"].ToString());
                    sof.FAllAmount_LC    = decimal.Parse(sdrDetail["FAmount"].ToString());
                    sof.FAllAmount       = decimal.Parse(sdrDetail["FAmount"].ToString());
                    sof.FStockID.FNumber = sdrDetail["FStockID"].ToString(); //从中间表中取到的仓库值为1
                    lsof.Add(sof);
                }
            }
            return(lsof.ToArray());
        }
 /// <summary>
 /// 出库明细
 /// </summary>
 /// <param name="sFOwnerID">货主:FOwnerID  (必填项)</param>
 /// <param name="sFUnitID">库存单位:FUnitID  (必填项)</param>
 public SAL_OUTSTOCK__FEntity(string sFOwnerID, string sFUnitID, SAL_OUTSTOCK_BD_MATERIAL sFMaterialID)
 {
     FCustMatID = new SAL_OUTSTOCK_Sal_StoreMatMappingView();
     //FAuxPropId = new BD_FLEXSITEMDETAILV_FAuxPropId();
     FUnitID         = new SAL_OUTSTOCK_BD_UNIT();
     FUnitID.FNumber = sFUnitID;
     //FBomID = new SAL_OUTSTOCK_ENG_BOM();
     FOwnerID         = new SAL_OUTSTOCK_BOS_ItemClass();
     FOwnerID.FNumber = sFOwnerID;
     FMaterialID      = sFMaterialID;
     //FLot = new SAL_OUTSTOCK_BD_BatchMainFile();
     //FTaxCombination = new SAL_OUTSTOCK_BD_TAXMIX();
     //FExtAuxUnitId = new SAL_OUTSTOCK_BD_UNIT();
     FStockID         = new SAL_OUTSTOCK_BD_STOCK();
     FStockID.FNumber = "CK001";
     //FStockLocID = new BD_FLEXVALUESDETAIL_FStockLocID();
     //FStockStatusID = new SAL_OUTSTOCK_BD_StockStatus();
     //FSalUnitID = new SAL_OUTSTOCK_BD_UNIT();
     //FEOwnerSupplierId = new SAL_OUTSTOCK_BD_Supplier();
     //FESettleStoreomerId = new SAL_OUTSTOCK_BD_Storeomer();
     //FPriceListEntry = new SAL_OUTSTOCK_BD_SAL_PriceList();
     //FTaxDetailSubEntity = new SAL_OUTSTOCK__FTaxDetailSubEntity[] { new SAL_OUTSTOCK__FTaxDetailSubEntity() };
     //FSerialSubEntity = new SAL_OUTSTOCK__FSerialSubEntity[] { new SAL_OUTSTOCK__FSerialSubEntity() };
 }