Exemplo n.º 1
0
        private void writeUBC97_LRFD(XmlTextWriter xml, UBC97_LRFD obj)
        {
            string thDesign = obj.GetTHDesignName(obj.TimeHistoryDesign);
            string FrameType = "Ordinary MRF";
            string zone = obj.GetSeismicZoneName(obj.SeisZone);

            xml.WriteStartElement("THDesign");
            xml.WriteAttributeString("Name", thDesign);
            xml.WriteAttributeString("FrameType", FrameType);
            xml.WriteAttributeString("PatLLF", obj.PatLLF.ToString());
            xml.WriteAttributeString("SRatioLimit", obj.SRatioLimit.ToString());
            xml.WriteAttributeString("MaxIter", obj.MaxIter.ToString());
            xml.WriteAttributeString("PhiB", obj.PhiB.ToString());
            xml.WriteAttributeString("PhiC", obj.PhiC.ToString());
            xml.WriteAttributeString("PhiT", obj.PhiT.ToString());
            xml.WriteAttributeString("PhiV", obj.PhiV.ToString());
            xml.WriteAttributeString("PhiCA", obj.PhiCA.ToString());
            xml.WriteAttributeString("CheckDefl", CodeYN(obj.CheckDefl));
            xml.WriteAttributeString("DLRat", obj.DLRat.ToString());
            xml.WriteAttributeString("SDLAndLLRat", obj.SDLAndLLRat.ToString());
            xml.WriteAttributeString("LLRat", obj.LLRat.ToString());
            xml.WriteAttributeString("TotalRat", obj.TotalRat.ToString());
            xml.WriteAttributeString("NetRat", obj.NetRat.ToString());
            xml.WriteAttributeString("SeisZone", zone);
            xml.WriteAttributeString("ImpFactor", obj.ImpFactor.ToString());
            xml.WriteEndElement();
            steelCode = "UBC97-LRFD";
        }
Exemplo n.º 2
0
        private void store(OleDbConnection cn, UBC97_LRFD obj)
        {
            string thDesign = obj.GetTHDesignName(obj.TimeHistoryDesign);
            //string FrameType = obj.GetFrameTypeName(obj.FrameType);
            string FrameType = "Ordinary MRF";
            string zone = obj.GetSeismicZoneName(obj.SeisZone);
            string sql = "INSERT INTO [Preferences - Steel Design - UBC97-LRFD] " +
                    "(THDesign, FrameType, PatLLF, SRatioLimit, MaxIter, PhiB, PhiC, PhiT, PhiV, PhiCA, CheckDefl, DLRat, SDLAndLLRat, LLRat, TotalRat, NetRat, SeisZone, ImpFactor) VALUES " +
                    "(\"" + thDesign + "\", \"" + FrameType + "\", " + obj.PatLLF + ", " + obj.SRatioLimit + ", " + obj.MaxIter + ", " + obj.PhiB + ", " + obj.PhiC + ", " + obj.PhiT + ", " + obj.PhiV + ", " +
                    obj.PhiCA + ", " + CodeYN(obj.CheckDefl) + ", " + obj.DLRat + ", " + obj.SDLAndLLRat + ", " + obj.LLRat + ", " + obj.TotalRat + ", " + obj.NetRat + ", \"" + zone + "\", " + obj.ImpFactor + ");";

            new OleDbCommand(sql, cn).ExecuteNonQuery();

            sql = "UPDATE [Program Control] set SteelCode=\"UBC97-LRFD\" WHERE 1=1;";
            new OleDbCommand(sql, cn).ExecuteNonQuery();
        }