Ejemplo n.º 1
0
        public static bool IsUseForeignMoney(string BiddingEmitCode)
        {
            BiddingReturn return2 = new BiddingReturn();

            return2.BiddingEmitCode = BiddingEmitCode;
            DataTable biddingReturns = return2.GetBiddingReturns();

            foreach (DataRow row in biddingReturns.Select())
            {
                Cash_Message message = new Cash_Message();
                message.CashMessageTypeCode = row["BiddingReturnCode"].ToString();
                DataTable table2 = message.GetCash_Messages();
                if (table2.Rows.Count != 0)
                {
                    Cash_Detail detail = new Cash_Detail();
                    detail.Cash_MessageCode = table2.Rows[table2.Rows.Count - 1]["CashMessageCode"].ToString();
                    DataTable table3 = detail.GetCash_Details();
                    foreach (DataRow row2 in table3.Select())
                    {
                        if (Convert.ToDecimal(row2["ExchangeRate"]) != 1M)
                        {
                            return(true);
                        }
                    }
                }
            }
            return(false);
        }
Ejemplo n.º 2
0
        public static string GetCashMoneyByBiddingReturnCode(string BiddingReturnCode)
        {
            Cash_Message message = new Cash_Message();
            Cash_Detail  detail  = new Cash_Detail();

            message.CashMessageTypeCode = BiddingReturnCode;
            DataTable table  = message.GetCash_Messages();
            DataTable table2 = new DataTable();

            if (table.Rows.Count != 0)
            {
                detail.Cash_MessageCode = table.Rows[table.Rows.Count - 1]["CashMessageCode"].ToString();
                table2 = detail.GetCash_Details();
            }
            string text = "";

            if (table2 != null)
            {
                foreach (DataRow row in table2.Select())
                {
                    text = (text + row["Cash"].ToString() + "&nbsp") + row["MoneyType"].ToString() + "<br>";
                }
            }
            return(text);
        }
Ejemplo n.º 3
0
        private DataTable GetDetailCost()
        {
            this.GetTotalCost();
            Cash_Detail detail = new Cash_Detail();

            detail.Cash_MessageCode = this._CashMessageCode.ToString();
            this._DetailCost        = detail.GetCash_Details();
            return(this._DetailCost);
        }
Ejemplo n.º 4
0
    /// <summary>
    /// 读取信息
    /// </summary>
    /// <returns></returns>
    private void GetCostDetail()
    {
        RmsPM.BLL.Cash_Message cashMessage = new RmsPM.BLL.Cash_Message();
        cashMessage.CashMessageTypeCode = this.CashMessageTypeCode;
        cashMessage.CashMessageType     = "回标";
        DataTable dt = cashMessage.GetCash_Messages();

        RmsPM.BLL.Cash_Detail cd = new RmsPM.BLL.Cash_Detail();
        if (dt.Rows.Count != 0)
        {
            cd.Cash_MessageCode = dt.Rows[dt.Rows.Count - 1]["CashMessageCode"].ToString();
            this.CashTable      = cd.GetCash_Details();
        }
        else
        {
            this.CashTable = cd.GetCash_Details();
            this.CashTable.Clear();
        }
    }
Ejemplo n.º 5
0
        public static ContractDefaultValue GetContractDefaultValue(string Code)
        {
            ContractDefaultValue value2  = new ContractDefaultValue();
            BiddingMessage       message = new BiddingMessage();

            message.BiddingMessageCode = Code;
            value2.BiddingCode         = message.BiddingCode;
            value2.ContractName        = message.ContractName;
            value2.ContractNumber      = message.ContractNember;
            value2.ContractRemark      = message.Remark;
            value2.ContractType        = message.ContractType;
            value2.SupplierCode        = message.Supplier;
            Bidding bidding = new Bidding();

            bidding.BiddingCode  = message.BiddingCode;
            value2.Mostly        = bidding.Accessory == "1";
            value2.ObligateMoney = bidding.ObligateMoney;
            value2.ProjectCode   = bidding.ProjectCode;
            value2.UnitCode      = bidding.BiddingRemark1;
            DataRow[]      rowArray   = bidding.GetBiddingReturn().Select("BiddingReturnCode in (" + message.BiddingReturnCode + "'')");
            BiddingMoney[] moneyArray = new BiddingMoney[rowArray.Length];
            int            index      = 0;
            decimal        num2       = 0M;

            foreach (DataRow row in rowArray)
            {
                BiddingDtl dtl = new BiddingDtl();
                dtl.BiddingDtlCode = row["BiddingDtlCode"].ToString();
                BiddingMoney money = new BiddingMoney();
                money.CostCode          = dtl.CostCode;
                money.CostBudgetSetCode = dtl.CostBudgetSetCode;
                money.PBSCode           = dtl.PBSCode;
                money.PBSType           = dtl.PBSType;
                string       text     = "";
                Cash_Message message2 = new Cash_Message();
                message2.CashMessageType     = "回标";
                message2.CashMessageTypeCode = row["BiddingReturnCode"].ToString();
                DataTable table2 = message2.GetCash_Messages();
                if (table2.Rows.Count > 0)
                {
                    text = table2.Rows[table2.Rows.Count - 1]["CashMessageCode"].ToString();
                }
                Cash_Detail detail = new Cash_Detail();
                detail.Cash_MessageCode = text;
                DataTable   table3      = detail.GetCash_Details();
                CashMoney[] moneyArray2 = new CashMoney[table3.Rows.Count];
                int         num3        = 0;
                decimal     num4        = 0M;
                foreach (DataRow row2 in table3.Select())
                {
                    CashMoney money2 = new CashMoney();
                    money2.MoneyCash    = row2["Cash"].ToString();
                    money2.MoneyType    = row2["MoneyType"].ToString();
                    money2.ExchangeRate = row2["ExchangeRate"].ToString();
                    money2.RMBTypeCash  = row2["RMB"].ToString();
                    moneyArray2[num3]   = money2;
                    num4 += ConvertRule.ToDecimal(money2.RMBTypeCash);
                    num3++;
                }
                money.CashMoneys   = moneyArray2;
                money.SumCashMoney = num4;
                moneyArray[index]  = money;
                num2 += money.SumCashMoney;
                index++;
            }
            value2.BiddingMoneys = moneyArray;
            value2.ContractMoney = num2;
            return(value2);
        }