Ejemplo n.º 1
0
        private void writeUBC97_ASD(XmlTextWriter xml, UBC97_ASD 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("SeisZone", obj.SeisZone.ToString());
            xml.WriteAttributeString("LatFactor", obj.LatFactor.ToString());
            xml.WriteAttributeString("CheckDefl", obj.CheckDefl.ToString());
            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.WriteEndElement();
            steelCode = "UBC97-ASD";
        }
Ejemplo n.º 2
0
        private void store(OleDbConnection cn, UBC97_ASD 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-ASD] " +
                    "(THDesign, FrameType, PatLLF, SRatioLimit, MaxIter, SeisZone, LatFactor, CheckDefl, DLRat, SDLAndLLRat, LLRat, TotalRat, NetRat) VALUES " +
                    "(\"" + thDesign + "\", \"" + FrameType + "\", " + obj.PatLLF + ", " + obj.SRatioLimit + ", " + obj.MaxIter + ", \"" + zone + "\", " + obj.LatFactor + ", " + CodeYN(obj.CheckDefl) + ", " + obj.DLRat + ", " + obj.SDLAndLLRat + ", " + obj.LLRat + ", " + obj.TotalRat + ", " + obj.NetRat + ");";

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

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