示例#1
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            context.Response.Charset     = "utf-8";
            string    returnValue = String.Empty;
            String    AutoKind    = context.Request.QueryString["AutoKind"];
            String    keyWord     = context.Request.Params["query"];
            DataTable dt1         = null;

            switch (AutoKind)
            {
            case "GetUserName":
                returnValue = this.GetUserNameForAutoComplete(context);
                break;

            case "GetUserNameLog":
                returnValue = this.GetUserNameLogForAutoComplete(context);
                break;



            default:
                break;
            }

            context.Response.Write(returnValue);
            JConnect.CloseConnect();
        }
示例#2
0
    /// <summary>
    /// 系统升级
    /// </summary>
    public static void Upgrade()
    {
        String time1 = ConfigurationManager.AppSettings["gradeDate"];

        if (String.IsNullOrEmpty(time1) == false)
        {
            DateTime t1 = DateTime.Parse(time1);
            if (DateTime.Today <= t1)
            {
                JConnect conn1 = JConnect.GetConnect("DefaultConnstring");
                JCommand comm1 = new JCommand(conn1);
                comm1.CommandText = "select * from u_zc1 where 0=1";
                DataTable dt1 = comm1.SearchData(-1).Tables[0];

                //1--增加保证合同字段
                if (dt1.Columns.Contains("bzhtong") == false)
                {
                    String sql = "alter table u_zc1 add bzhtong nvarchar(200)";
                    comm1.CommandText = sql;
                    comm1.ExecuteNoQuery();
                }

                //2--抵押物
                if (dt1.Columns.Contains("dyw") == false)
                {
                    String sql = "alter table u_zc1 add dyw nvarchar(200)";
                    comm1.CommandText = sql;
                    comm1.ExecuteNoQuery();
                }

                //3--是否有抵押合同
                if (dt1.Columns.Contains("sfydyht") == false)
                {
                    String sql = "alter table u_zc1 add sfydyht nvarchar(200)";
                    comm1.CommandText = sql;
                    comm1.ExecuteNoQuery();
                }

                //4--对应抵押金额
                if (dt1.Columns.Contains("dyje") == false)
                {
                    String sql = "alter table u_zc1 add dyje nvarchar(200)";
                    comm1.CommandText = sql;
                    comm1.ExecuteNoQuery();
                }

                //5--抵押是否有效
                if (dt1.Columns.Contains("dysfyx") == false)
                {
                    String sql = "alter table u_zc1 add dysfyx nvarchar(200)";
                    comm1.CommandText = sql;
                    comm1.ExecuteNoQuery();
                }

                //6--抵押文件
                if (dt1.Columns.Contains("dywj") == false)
                {
                    String sql = "alter table u_zc1 add dywj nvarchar(200)";
                    comm1.CommandText = sql;
                    comm1.ExecuteNoQuery();
                }

                //7--抵押物评估报告
                if (dt1.Columns.Contains("dypgbg") == false)
                {
                    String sql = "alter table u_zc1 add dypgbg nvarchar(200)";
                    comm1.CommandText = sql;
                    comm1.ExecuteNoQuery();
                }


                JConnect.CloseConnect();
            }
        }
    }