Esempio n. 1
0
        /// <summary>
        /// 把数据行转换为Dispatchlists对象
        /// </summary>
        /// <param name="row"></param>
        /// <returns></returns>
        public static DispatchLists ConvertToDispatchLists(DataRow row)
        {
            DispatchLists dispatchLists = new DispatchLists();

            dispatchLists.DLID    = Cast.ToInteger(row["DLID"]);
            dispatchLists.AutoID  = Cast.ToInteger(row["AutoID"]);
            dispatchLists.cDLCode = Cast.ToString(row["cDLCode"]);
            dispatchLists.iSOsID  = Cast.ToInteger(row["iSOsID"]);
            dispatchLists.iDLsID  = Cast.ToInteger(row["iDLsID"]);
            dispatchLists.cSoCode = Cast.ToString(row["cSoCode"]);

            dispatchLists.cWhCode = Cast.ToString(row["cWhCode"]);
            dispatchLists.cWhName = Cast.ToString(row["cWhName"]);
            //存货
            dispatchLists.cInvCode   = Cast.ToString(row["cInvCode"]);
            dispatchLists.cInvName   = Cast.ToString(row["cInvName"]);
            dispatchLists.cInvStd    = Cast.ToString(row["cInvStd"]);
            dispatchLists.cBatch     = Cast.ToString(row["cBatch"]);
            dispatchLists.cMassUnit  = Cast.ToInteger(row["cMassUnit"]);
            dispatchLists.iMassDate  = Cast.ToInteger(row["iMassDate"]);
            dispatchLists.cinvm_unit = Cast.ToString(row["cinvm_unit"]);
            //日期
            dispatchLists.dMDate            = Cast.ToDateTime(row["dMDate"]);
            dispatchLists.dVDate            = Cast.ToDateTime(row["dVDate"]);
            dispatchLists.iExpiratDateCalcu = Cast.ToInteger(row["iExpiratDateCalcu"]);
            dispatchLists.dExpirationdate   = Cast.ToDateTime(row["dExpirationdate"]);
            dispatchLists.cExpirationdate   = Cast.ToString(row["cExpirationdate"]);

            dispatchLists.iQuotedPrice = Cast.ToDouble(row["iQuotedPrice"]);
            //原币
            dispatchLists.iUnitPrice    = Cast.ToDouble(row["iUnitPrice"]);
            dispatchLists.iTaxUnitPrice = Cast.ToDouble(row["iTaxUnitPrice"]);
            dispatchLists.iMoney        = Cast.ToDouble(row["iMoney"]);
            dispatchLists.iTax          = Cast.ToDouble(row["iTax"]);
            dispatchLists.iDisCount     = Cast.ToDouble(row["iDisCount"]);
            dispatchLists.iSum          = Cast.ToDouble(row["iSum"]);

            dispatchLists.iNatUnitPrice = Cast.ToDouble(row["iNatUnitPrice"]);
            dispatchLists.iNatMoney     = Cast.ToDouble(row["iNatMoney"]);
            dispatchLists.iNatTax       = Cast.ToDouble(row["iNatTax"]);
            dispatchLists.iNatSum       = Cast.ToDouble(row["iNatSum"]);
            dispatchLists.iNatDisCount  = Cast.ToDouble(row["iNatDisCount"]);

            dispatchLists.iTaxRate = Cast.ToDouble(row["iTaxRate"]);
            //数量
            dispatchLists.iQuantity    = Cast.ToDouble(row["iQuantity"]);
            dispatchLists.iNum         = Cast.ToDouble(row["iNum"]);
            dispatchLists.fOutQuantity = Cast.ToDouble(row["fOutQuantity"]);
            dispatchLists.fOutNum      = Cast.ToDouble(row["fOutNum"]);
            //单价金额
            dispatchLists.fSaleCost  = Cast.ToDouble(row["fSaleCost"]);
            dispatchLists.fSalePrice = Cast.ToDouble(row["fSalePrice"]);

            dispatchLists.iSettleNum      = Cast.ToDouble(row["iSettleNum"]);
            dispatchLists.iSettleQuantity = Cast.ToDouble(row["iSettleQuantity"]);
            dispatchLists.bSettleAll      = Cast.ToBoolean(row["bSettleAll"]);
            dispatchLists.cFree1          = Cast.ToString(row["cFree1"]);
            dispatchLists.cFree2          = Cast.ToString(row["cFree2"]);
            dispatchLists.iTB             = Cast.ToInteger(row["iTB"]);
            dispatchLists.KL      = Cast.ToDouble(row["KL"]);
            dispatchLists.KL2     = Cast.ToDouble(row["KL2"]);
            dispatchLists.bIsSTQc = Cast.ToBoolean(row["bIsSTQc"]);
            dispatchLists.bGsp    = Cast.ToBoolean(row["bGsp"]);

            dispatchLists.bCosting     = Cast.ToBoolean(row["bCosting"]);
            dispatchLists.iInvExchRate = Cast.ToDouble(row["iInvExchRate"]);

            //订单行号
            dispatchLists.iorderrowno = Cast.ToInteger(row["iorderrowno"]);
            return(dispatchLists);
        }