Esempio n. 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //用户登录验证
            pyrc.zoneNet login = new pyrc.zoneNet();
            //login.tempsession();//测试用
            login.loginCheck();
            login.authority(1);

            SqlConnection sqlconn = new SqlConnection();
            sqlconn.ConnectionString = ConfigurationManager.ConnectionStrings["zoneNetConn"].ConnectionString;
            //临时id=用户编号+时间,用于附件上传
            Label1.Text = DateTime.Now.ToString("yyyyMMddHHmmss");
            //问题类别列表
            SqlDataAdapter sqldar = new SqlDataAdapter("select * from [optQuestion]", sqlconn);
            DataSet        Ds     = new DataSet();
            sqldar.Fill(Ds, "List");
            B02.DataSource     = Ds.Tables["List"].DefaultView;
            B02.DataTextField  = "Q01";
            B02.DataValueField = "Q00";
            sqlconn.Open();
            B02.DataBind();
            sqlconn.Close();
        }
    }
Esempio n. 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //用户登录验证
            pyrc.zoneNet login = new pyrc.zoneNet();
            //login.tempsession();//测试用
            login.loginCheck();
            login.authority(1);
        }
        string        connString = ConfigurationManager.ConnectionStrings["zoneNetConn"].ConnectionString;
        SqlConnection Sqlconn    = new SqlConnection(connString);
        int           id         = System.Int32.Parse(Request.QueryString["id"]);
        SqlCommand    cmd        = new SqlCommand();

        cmd.Connection  = Sqlconn;
        cmd.CommandText = "update TableInfo set I09=I09+1 where I00 = @id";
        cmd.Parameters.AddWithValue("@id", id);

        Sqlconn.Open();
        SqlDataReader reader = cmd.ExecuteReader(CommandBehavior.CloseConnection);

        reader.Close();

        cmd.CommandText = "select * from TableInfo where I00 = @id";
        Sqlconn.Open();
        reader = cmd.ExecuteReader(CommandBehavior.CloseConnection);
        if (reader.Read())
        {
            title1.InnerHtml  = reader["I02"].ToString();
            title2.InnerHtml  = string.Format("{0:d}", reader["I06"]) + "  人气:" + reader["I09"].ToString();
            content.InnerHtml = reader["I03"].ToString();
        }
        reader.Close();
    }
Esempio n. 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //用户登录验证
            pyrc.zoneNet login = new pyrc.zoneNet();
            //login.tempsession();//测试用
            login.loginCheck();
            login.authority(4);

            //根据参数判断是否执行删除操作
            if (Request.QueryString["m"] != null || Request.QueryString["id"] != null)
            {
                int           m       = System.Int32.Parse(Request.QueryString["m"]);
                int           id      = System.Int32.Parse(Request.QueryString["id"]);
                SqlConnection sqlConn = new SqlConnection();
                sqlConn.ConnectionString = ConfigurationManager.ConnectionStrings["zoneNetConn"].ConnectionString;
                if (m == 2)
                {
                    SqlCommand cmd = new SqlCommand("update TableUser set U17=0 where U00=" + id, sqlConn);
                    sqlConn.Open();
                    SqlDataReader read = cmd.ExecuteReader(CommandBehavior.CloseConnection);
                    read.Close();
                }
            }
            //绑定数据
            bindData();
        }
    }
Esempio n. 4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //用户登录验证
            pyrc.zoneNet login = new pyrc.zoneNet();
            //login.tempsession();//测试用
            login.loginCheck();
            login.authority(1);

            //资讯类别
            string        connString = ConfigurationManager.ConnectionStrings["zoneNetConn"].ConnectionString;
            SqlConnection Sqlconn    = new SqlConnection(connString);

            int        id  = System.Int32.Parse(Request.QueryString["id"]);
            SqlCommand cmd = new SqlCommand();
            cmd.Connection  = Sqlconn;
            cmd.CommandText = "select * from optInfoType where T00=@id";
            cmd.Parameters.AddWithValue("@id", id);
            Sqlconn.Open();
            SqlDataReader reader = cmd.ExecuteReader(CommandBehavior.CloseConnection);
            if (reader.Read())
            {
                infoType.InnerText = reader["T01"].ToString();
            }
            reader.Close();
            Sqlconn.Close();
            //绑定数据
            bindData();
        }
    }
Esempio n. 5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //用户登录验证
            pyrc.zoneNet login = new pyrc.zoneNet();
            //login.tempsession();//测试用
            login.loginCheck();
            login.authority(1);
            //资讯类别
            string        connString = ConfigurationManager.ConnectionStrings["zoneNetConn"].ConnectionString;
            SqlConnection Sqlconn    = new SqlConnection(connString);
            SqlCommand    cmd        = new SqlCommand();
            SqlDataReader reader;
            cmd.Connection = Sqlconn;

            cmd.CommandText = "select * from optInfoType where T00=1";
            Sqlconn.Open();
            reader = cmd.ExecuteReader(CommandBehavior.CloseConnection);
            if (reader.Read())
            {
                Em1.InnerText = reader["T01"].ToString();
                A1.HRef       = "info_list_more.aspx?id=" + reader["T00"].ToString();
            }
            reader.Close();

            cmd.CommandText = "select * from optInfoType where T00=2";
            Sqlconn.Open();
            reader = cmd.ExecuteReader(CommandBehavior.CloseConnection);
            if (reader.Read())
            {
                Em2.InnerText = reader["T01"].ToString();
                A2.HRef       = "info_list_more.aspx?id=" + reader["T00"].ToString();
            }
            reader.Close();

            cmd.CommandText = "select * from optInfoType where T00=3";
            Sqlconn.Open();
            reader = cmd.ExecuteReader(CommandBehavior.CloseConnection);
            if (reader.Read())
            {
                Em3.InnerText = reader["T01"].ToString();
                A3.HRef       = "info_list_more.aspx?id=" + reader["T00"].ToString();
            }
            reader.Close();

            cmd.CommandText = "select * from optInfoType where T00=4";
            Sqlconn.Open();
            reader = cmd.ExecuteReader(CommandBehavior.CloseConnection);
            if (reader.Read())
            {
                Em4.InnerText = reader["T01"].ToString();
                A4.HRef       = "info_list_more.aspx?id=" + reader["T00"].ToString();
            }
            reader.Close();
            //数据绑定
            bindData();
        }
    }
Esempio n. 6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         //用户登录验证
         pyrc.zoneNet login = new pyrc.zoneNet();
         login.loginCheck();
         login.authority(1);
         LoginName.InnerText = "欢迎您," + Session["user_name"].ToString();
     }
 }
Esempio n. 7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         //用户登录验证
         pyrc.zoneNet login = new pyrc.zoneNet();
         //login.tempsession();//测试用
         login.loginCheck();
         login.authority(1);
     }
 }
Esempio n. 8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         //用户登录验证
         pyrc.zoneNet login = new pyrc.zoneNet();
         //login.tempsession();//测试用
         login.loginCheck();
         login.authority(4);
         //类别列表
         SqlConnection sqlconn = new SqlConnection();
         sqlconn.ConnectionString = ConfigurationManager.ConnectionStrings["zoneNetConn"].ConnectionString;
         SqlDataAdapter sqldar = new SqlDataAdapter("select * from [optUserType] where A00<>4", sqlconn);//4为系统管理员
         DataSet        Ds     = new DataSet();
         sqldar.Fill(Ds, "List");
         U16.DataSource     = Ds.Tables["List"].DefaultView;
         U16.DataTextField  = "A01";
         U16.DataValueField = "A00";
         sqlconn.Open();
         U16.DataBind();
         sqlconn.Close();
         //根据参数判别是否加载数据
         if (Request.QueryString["id"] != null)
         {
             int id  = System.Int32.Parse(Request.QueryString["id"]);
             var cmd = new SqlCommand("select * from TableUser where U00=" + id, sqlconn);
             sqlconn.Open();
             SqlDataReader read = cmd.ExecuteReader(CommandBehavior.CloseConnection);
             if (read.Read())
             {
                 U16.SelectedValue = read["U16"].ToString();
                 U02.Text          = read["U02"].ToString();
                 //U03.Text = read["U03"].ToString();
                 U04.Text       = read["U04"].ToString();
                 U05.Text       = read["U05"].ToString();
                 U06.Text       = read["U06"].ToString();
                 U07.Text       = read["U07"].ToString();
                 U08.Text       = read["U08"].ToString();
                 U09.Text       = read["U09"].ToString();
                 U10.Text       = read["U10"].ToString();
                 U11.Text       = read["U11"].ToString();
                 U12.Text       = read["U12"].ToString();
                 U13.Text       = read["U13"].ToString();
                 U15.InnerText  = read["U15"].ToString();
                 U02.Enabled    = false;
                 U04.Enabled    = false;
                 U16.Enabled    = false;
                 Label1.Visible = true;
             }
             read.Close();
         }
     }
 }
Esempio n. 9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //用户登录验证
        pyrc.zoneNet login = new pyrc.zoneNet();
        //login.tempsession();//测试用
        login.loginCheck();
        login.authority(1);
        //根据参数判别是否加载数据
        if (Request.QueryString["id"] != null)
        {
            int           id      = System.Int32.Parse(Request.QueryString["id"]);
            SqlConnection sqlconn = new SqlConnection();
            sqlconn.ConnectionString = ConfigurationManager.ConnectionStrings["zoneNetConn"].ConnectionString;
            var cmd = new SqlCommand("SELECT * FROM TableApply left join optHandleState on TableApply.B08=optHandleState.C00 left join optQuestion on TableApply.B02=optQuestion.Q00 where B00=" + id, sqlconn);
            sqlconn.Open();
            SqlDataReader read = cmd.ExecuteReader(CommandBehavior.CloseConnection);
            if (read.Read())
            {
                if (read["C00"].ToString() == "1" || read["C00"].ToString() == "2")
                {
                    div2.Visible = false;
                }                                                                                           //1待办,1办理中,3完成
                Q01.Text      = read["Q01"].ToString();
                B03.Text      = read["B03"].ToString();
                B05.Text      = read["B05"].ToString();
                B04.InnerText = read["B04"].ToString();
                C01.Text      = read["C01"].ToString();
                B11.Text      = read["B07"].ToString();
                B10.InnerText = read["B10"].ToString();
            }
            read.Close();
            zoneNet1.ConnectionString = ConfigurationManager.ConnectionStrings["zoneNetConn"].ConnectionString;
            zoneNet1.SelectParameters.Clear();
            zoneNet1.SelectCommand = "SELECT * FROM [dbo].[TableUpfile] where F01=@id and F06=1 and F07=0 order by F00 asc";
            zoneNet1.SelectParameters.Add("id", System.TypeCode.Int32, id.ToString());
            Repeater1.DataSourceID = "zoneNet1";
            Repeater1.DataBind();

            zoneNet2.ConnectionString = ConfigurationManager.ConnectionStrings["zoneNetConn"].ConnectionString;
            zoneNet2.SelectParameters.Clear();
            zoneNet2.SelectCommand = "SELECT * FROM [dbo].[TableUpfile] where F01=@id and F06=1 and F07=1 order by F00 asc";
            zoneNet2.SelectParameters.Add("id", System.TypeCode.Int32, id.ToString());
            Repeater2.DataSourceID = "zoneNet2";
            Repeater2.DataBind();
        }
    }
Esempio n. 10
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //用户登录验证
            pyrc.zoneNet login = new pyrc.zoneNet();
            //login.tempsession();//测试用
            login.loginCheck();
            login.authority(4);

            //类别列表
            SqlConnection sqlconn = new SqlConnection();
            sqlconn.ConnectionString = ConfigurationManager.ConnectionStrings["zoneNetConn"].ConnectionString;
            SqlDataAdapter sqldar = new SqlDataAdapter("select * from [dbo].[optInfoType]", sqlconn);
            //sqldar.SelectCommand.CommandType = CommandType.Text;
            DataSet Ds = new DataSet();
            sqldar.Fill(Ds, "List");
            I01.DataSource     = Ds.Tables["List"].DefaultView;
            I01.DataTextField  = "T01";
            I01.DataValueField = "T00";
            sqlconn.Open();
            I01.DataBind();
            sqlconn.Close();
            //根据参数判别是否加载数据
            if (Request.QueryString["id"] != null)
            {
                int id  = System.Int32.Parse(Request.QueryString["id"]);
                var cmd = new SqlCommand("select * from TableInfo where I00=" + id, sqlconn);
                sqlconn.Open();
                SqlDataReader read = cmd.ExecuteReader(CommandBehavior.CloseConnection);
                if (read.Read())
                {
                    I01.SelectedValue = read["I01"].ToString();
                    I02.Text          = read["I02"].ToString();
                    I03.InnerText     = read["I03"].ToString();
                }
                read.Close();
            }
        }
    }
Esempio n. 11
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //用户登录验证
            pyrc.zoneNet login = new pyrc.zoneNet();
            //login.tempsession();//测试用
            login.loginCheck();
            login.authority(4);

            Text1.Value = DateTime.Now.AddMonths(-1).AddDays(1).ToShortDateString();
            Text2.Value = DateTime.Now.ToShortDateString();
            Text3.Value = DateTime.Now.AddMonths(-1).AddDays(1).ToShortDateString();
            Text4.Value = DateTime.Now.ToShortDateString();
            Text5.Value = DateTime.Now.AddMonths(-1).AddDays(1).ToShortDateString();
            Text6.Value = DateTime.Now.ToShortDateString();
            ShowData1(Text1.Value, Text2.Value, 1);
            ShowData1(Text1.Value, Text2.Value, 2);
            ShowData1(Text1.Value, Text2.Value, 3);
            ShowData1(Text1.Value, Text2.Value, 4);
            ShowData2(Text3.Value, Text4.Value);
            ShowData3(Text5.Value, Text6.Value);
        }
    }
Esempio n. 12
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         //用户登录验证
         pyrc.zoneNet login = new pyrc.zoneNet();
         //login.tempsession();//测试用
         login.loginCheck();
         login.authority(1);
         LoginName.InnerText = "欢迎您," + Session["user_name"].ToString();
         if (Session["user_type"].ToString() == "2")
         {
             dt1.Visible = true; dt3.Visible = true;
         }                                                                                      //工作人员菜单
         if (Session["user_type"].ToString() == "3")
         {
             dt2.Visible = true; dt4.Visible = true; dd1.Visible = true; dd2.Visible = true; dd3.Visible = true;
         }                                                                                                                                                  //业务管理员菜单
         if (Session["user_type"].ToString() == "4")
         {
             dt2.Visible = true; dt4.Visible = true; dd1.Visible = true; dd2.Visible = true; dd3.Visible = true;
         }                                                                                                                                                  //系统管理员菜单
     }
 }
Esempio n. 13
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //用户登录验证
            pyrc.zoneNet login = new pyrc.zoneNet();
            //login.tempsession();//测试用
            login.loginCheck();
            login.authority(4);

            //Label1为隐藏控件,用于传值到upfile.aspx
            Label1.Text = Request.QueryString["id"];
            //加载数据
            if (Request.QueryString["id"] != null)
            {
                int id = System.Int32.Parse(Request.QueryString["id"]);
                int m  = System.Int32.Parse(Request.QueryString["m"]);
                if (m == 1)
                {
                    Button1.Enabled = false; Button1.Visible = false; Button4.Visible = false; iframe1.Visible = false; exChange.Visible = false;
                }
                ;                                                                                                                                         //1:查看,0:编辑
                SqlConnection sqlconn = new SqlConnection();
                sqlconn.ConnectionString = ConfigurationManager.ConnectionStrings["zoneNetConn"].ConnectionString;
                //问题类别列表
                SqlDataAdapter sqldar = new SqlDataAdapter("select * from [optQuestion]", sqlconn);
                DataSet        Ds     = new DataSet();
                sqldar.Fill(Ds, "List");
                B02.DataSource     = Ds.Tables["List"].DefaultView;
                B02.DataTextField  = "Q01";
                B02.DataValueField = "Q00";
                sqlconn.Open();
                B02.DataBind();
                sqlconn.Close();

                var cmd = new SqlCommand("SELECT * FROM TableApply a left join optHandleState b on a.B08=b.C00 left join optQuestion c on a.B02=c.Q00 left join TableUser d on a.B01=d.U00 where B00=" + id, sqlconn);
                sqlconn.Open();
                SqlDataReader read = cmd.ExecuteReader(CommandBehavior.CloseConnection);
                if (read.Read())
                {
                    U05.Text          = read["U05"].ToString();
                    U04.Text          = read["U04"].ToString();
                    U06.Text          = read["U06"].ToString();
                    U07.Text          = read["U07"].ToString();
                    U08.Text          = read["U08"].ToString();
                    B02.SelectedValue = read["Q00"].ToString();
                    B03.Text          = read["B03"].ToString();
                    B05.Text          = read["B05"].ToString();
                    B04.InnerText     = read["B04"].ToString();
                    B10.InnerText     = read["B10"].ToString();
                    B12.InnerText     = read["B12"].ToString();
                }
                read.Close();
                //当前跟进
                var cmd1 = new SqlCommand("SELECT * FROM TableApply a left join (select D01, D03 from TableHandleState where D00 in (select max(D00) mD00 from TableHandleState group by D01)) e on a.B00 = e.D01 left join TableUser b on e.D03=b.U00  where B00 = " + id, sqlconn);
                sqlconn.Open();
                read = cmd1.ExecuteReader(CommandBehavior.CloseConnection);
                if (read.Read())
                {
                    D03.Text = read["U04"].ToString();
                }
                read.Close();

                zoneNet1.ConnectionString = ConfigurationManager.ConnectionStrings["zoneNetConn"].ConnectionString;
                zoneNet1.SelectParameters.Clear();
                zoneNet1.SelectCommand = "SELECT * FROM [dbo].[TableUpfile] where F01=@id and F06=1 and F07=0 order by F00 asc";
                zoneNet1.SelectParameters.Add("id", System.TypeCode.Int32, id.ToString());
                Repeater1.DataSourceID = "zoneNet1";
                Repeater1.DataBind();

                zoneNet2.ConnectionString = ConfigurationManager.ConnectionStrings["zoneNetConn"].ConnectionString;
                zoneNet2.SelectParameters.Clear();
                zoneNet2.SelectCommand = "SELECT * FROM [dbo].[TableUpfile] where F01=@id and F06=1 and F07=1 order by F00 asc";
                zoneNet2.SelectParameters.Add("id", System.TypeCode.Int32, id.ToString());
                Repeater2.DataSourceID = "zoneNet2";
                Repeater2.DataBind();

                zoneNet3.ConnectionString = ConfigurationManager.ConnectionStrings["zoneNetConn"].ConnectionString;
                zoneNet3.SelectParameters.Clear();
                zoneNet3.SelectCommand = "SELECT * FROM [dbo].[TableHandleState] a left join TableUser b on a.D02=b.U00 where D01=@id order by D00 asc";
                zoneNet3.SelectParameters.Add("id", System.TypeCode.Int32, id.ToString());
                Repeater3.DataSourceID = "zoneNet3";
                Repeater3.DataBind();

                //流转人列表
                SqlDataAdapter sqldar1 = new SqlDataAdapter("select * from [TableUser] where (U16=2 or U16=3) and U17=1", sqlconn);//U16:1=园区,2=内部,3=管理员;U17:1=有效
                DataSet        Ds1     = new DataSet();
                sqldar1.Fill(Ds1, "List");
                U00.DataSource     = Ds1.Tables["List"].DefaultView;
                U00.DataTextField  = "U04";
                U00.DataValueField = "U00";
                sqlconn.Open();
                U00.DataBind();
                sqlconn.Close();
            }
        }
    }