Esempio n. 1
0
        public static string getRes(ConnectionConfig connConfig, XmlDocument xdoc, HttpRequest Request)
        {
            string     sendData  = xdoc.DocumentElement.OuterXml;
            string     str2      = Request[("userId")];
            string     str3      = "";
            string     str4      = "";
            DBOperator @operator = connConfig.getDBOperator();

            @operator.Open();
            IDbCommand myComm = @operator.Connection.CreateCommand();

            myComm.Connection = (@operator.Connection);
            string      strSql = "SELECT FCQ_ORG.vpath,FCQ_ORG.java_dotnet FROM FCQ_BUG_USER INNER JOIN FCQ_ORG ON FCQ_BUG_USER.org_name = FCQ_ORG.org_name WHERE FCQ_BUG_USER.item_name = FCQ_ORG.item_name and FCQ_BUG_USER.fcbug_user_id = '" + str2 + "'";
            IDataReader reader = @operator.exeSql(strSql);

            if (reader.Read())
            {
                str3 = reader.GetString(0);
                str4 = reader.GetString(1);
            }
            reader.Close();
            string str9 = "/ebsys/eformaspx/webbill.aspx";

            if ((str4 != "") && (str4 != ".net版"))
            {
                str9 = "/servlet/WebBill";
            }
            Logger.debug(str3 + str9 + "?key=readDomainRes xml=" + sendData);
            string str8 = CellNo.domainRun(str3 + str9 + "?key=readDomainRes", sendData);

            Logger.debug("content:" + str8);
            string str6 = "";

            if (str8.Length <= 0)
            {
                return("从数据库中没有取到资源内容!");
            }
            IDbTransaction transaction = null;

            transaction        = @operator.Connection.BeginTransaction();
            myComm.Transaction = (transaction);
            try
            {
                str6 = new MaxNo(connConfig, xdoc).getRecnum1("RES", myComm);
                Logger.debug("resId=" + str6);
                myComm.CommandText = ("insert into fcq_bug_res (res_id,res_text) values ('" + str6 + "','" + str8.Replace("'", "''") + "')");
                myComm.ExecuteNonQuery();
                transaction.Commit();
                myComm.Dispose();
                @operator.Close();
            }
            catch (Exception exception)
            {
                try
                {
                    transaction.Rollback();
                }
                catch (Exception)
                {
                }
                Logger.debug(exception.StackTrace);
                throw exception;
            }
            finally
            {
                try
                {
                    @operator.Close();
                }
                catch (Exception)
                {
                }
            }
            return(str6);
        }
Esempio n. 2
0
 public WebDesign(ConnectionConfig connConfig, XmlDocument xdoc, HttpRequest req)
 {
     this.connectionConfig_0 = connConfig;
     this.xmlDocument_0      = xdoc;
     this.httpRequest_0      = req;
 }