コード例 #1
0
        public static string GenerateTemp(XmlElement service)
        {
            XmlHelper     h             = new XmlHelper(service);
            string        serviceAction = h.GetText("Action");
            ServiceAction action        = ServiceFactory.ConvertServiceAction(serviceAction);

            ITempGenerator t;

            if (action == ServiceAction.Select)
            {
                t = new SelectTempGenerator();
            }
            else if (action == ServiceAction.Delete)
            {
                t = new DeleteTempGenerator();
            }
            else if (action == ServiceAction.Insert)
            {
                t = new InsertTempGenerator();
            }
            else
            {
                t = new UpdateTempGenerator();
            }
            XmlElement e = t.Generate(service);

            return(XmlHelper.Format(e.OuterXml));
        }
コード例 #2
0
        public static string GenerateTemp(XmlElement service){
            XmlHelper h = new XmlHelper(service);
            string serviceAction = h.GetText("Action");
            ServiceAction action = ServiceFactory.ConvertServiceAction(serviceAction);

            ITempGenerator t;
            if (action == ServiceAction.Select)
                t = new SelectTempGenerator();
            else if (action == ServiceAction.Delete)
                t = new DeleteTempGenerator();
            else if (action == ServiceAction.Insert)
                t = new InsertTempGenerator();
            else
                t = new UpdateTempGenerator();
            XmlElement e =  t.Generate(service);
            return XmlHelper.Format(e.OuterXml);
        }