Пример #1
0
        public void Load(int iID)
        {
            CDbBudgetPCN dbDt = new CDbBudgetPCN();
            string       tmpDat;

            tmpDat = dbDt.GetByID(iID);

            Clear();
            if (tmpDat.Length > 0)
            {
                LoadVals(tmpDat);
            }

            dbDt = null;
        }
Пример #2
0
        public void LoadWithData(int iID)
        {
            CDbBudgetPCN dbDt = new CDbBudgetPCN();
            string       tmpDat;

            tmpDat = dbDt.GetByID(iID);

            Clear();
            if (tmpDat.Length > 0)
            {
                LoadVals(tmpDat);
            }

            dbDt = null;

            base.PCNData = new dsPCN();

            SqlDataReader dr;
            DataRow       d;

            dr = CBBudgetPCNHour.GetListByPCN(iID);

            while (dr.Read())
            {
                d = base.PCNData.Tables["PCNHours"].NewRow();

                d["ID"]           = dr["ID"];
                d["PCNID"]        = dr["PCNID"];
                d["Code"]         = dr["Code"];
                d["WBS"]          = dr["WBS"];
                d["Description"]  = dr["Description"];
                d["Quantity"]     = dr["Quantity"];
                d["HoursPerItem"] = dr["HoursPerItem"];
                d["Rate"]         = dr["Rate"];
                d["SubtotalHrs"]  = dr["SubtotalHrs"];
                d["SubtotalDlrs"] = dr["SubtotalDlrs"];

                base.PCNData.Tables["PCNHours"].Rows.Add(d);
            }

            dr.Close();

            dr = CBBudgetPCNExpense.GetListByPCN(iID);

            while (dr.Read())
            {
                d = base.PCNData.Tables["PCNExpenses"].NewRow();

                d["ID"]          = dr["ID"];
                d["PCNID"]       = dr["PCNID"];
                d["Code"]        = dr["Code"];
                d["Description"] = dr["Description"];
                d["DeptGroup"]   = dr["DeptGroup"]; //****************************Added 9/22/2015
                d["DlrsPerItem"] = dr["DlrsPerItem"];
                d["NumItems"]    = dr["NumItems"];
                d["MUPerc"]      = dr["MUPerc"];
                d["MarkUp"]      = dr["MarkUp"];
                d["TotalCost"]   = dr["TotalCost"];

                base.PCNData.Tables["PCNExpenses"].Rows.Add(d);
            }

            dr.Close();
        }