示例#1
0
        //gv绑定
        public void ListViewBind4()
        {
            string Str1 = " where ui_status='正常' and ui_lx='企业'";

            if (!string.IsNullOrEmpty(bm3.SelectedItem.Value))
            {
                if (bm3.SelectedItem.Value == "1000000")
                {
                    Str1 = Str1 + " and yn_bmglz='是'";
                }
                else
                {
                    Str1 = Str1 + " and ui_ssbm= '" + bm3.SelectedItem.Value + "' ";
                }
            }

            if (!string.IsNullOrEmpty(cxtj3.Text))
            {
                Str1 = Str1 + " AND (UI_ID LIKE '%" + hkdb.GetStr(cxtj3.Text) + "%' OR UI_DESC LIKE '%" + hkdb.GetStr(cxtj3.Text) + "%')";
            }
            AspNetPager4.RecordCount = (int)SqlHelper.ExecuteScalar("select count(*) from yh" + Str1);
            DataSet ds = SqlHelper.ExecuteDs("select ui_id,ui_desc,ui_sex,ui_lx,(case when yn_bmglz='是' then 'ch' else 'noch' end)as yn_bmglz,b.bm_mc,c.zwmc from yh a left outer JOIN BM b on (a.ui_ssbm=b.bm_id)left outer JOIN ZW c on (a.ui_zw=c.zwid)" + Str1 + "order by a.number", AspNetPager4.PageSize * (AspNetPager4.CurrentPageIndex - 1), AspNetPager4.PageSize);

            ListView4.DataSource = ds;
            ListView4.DataBind();
        }
示例#2
0
    private void FoodmenuShow()
    {
        // ListView1.DataSource = uc.ShowFoodMenu();
        // ListView1.DataBind();
        try
        {
            ListView1.DataSource = uc.GetfoodmenuSunday();
            ListView1.DataBind();

            ListView2.DataSource = uc.GetfoodmenuMonday();
            ListView2.DataBind();

            ListView3.DataSource = uc.GetfoodmenuTuesday();
            ListView3.DataBind();

            ListView4.DataSource = uc.GetfoodmenuWednesday();
            ListView4.DataBind();

            ListView5.DataSource = uc.GetfoodmenuThursday();
            ListView5.DataBind();

            ListView6.DataSource = uc.GetfoodmenuFriday();
            ListView6.DataBind();

            ListView7.DataSource = uc.GetfoodmenuSaturday();
            ListView7.DataBind();
        }
        catch (Exception ex)
        {
            string text = ex.Message.ToString();
            ScriptManager.RegisterStartupScript(this, typeof(Page), "Warning", "<script>showpoperror('" + text + "')</script>", false);
        }
    }
示例#3
0
        protected void Button5_Click(object sender, EventArgs e)
        {
            System.Web.UI.HtmlControls.HtmlTextArea textArea = (System.Web.UI.HtmlControls.HtmlTextArea)(form1.FindControl("experience"));
            String   experiences = textArea.Value;
            int      user        = Convert.ToInt32(Session["id"]);
            DateTime start_date  = Convert.ToDateTime(startDate.Text).Date;
            DateTime end_date    = Convert.ToDateTime(endDate.Text).Date;

            if (experience.Equals(""))
            {
                experiencesError.Text = "Ju lutem plotesoni fushen!";
            }
            else
            {
                if (start_date > end_date)
                {
                    experiencesError.Text = "Ju lutem jepni inputin e duhur";
                }
                else
                {
                    NormalUserDB.addExperience(experiences, start_date, end_date, user);
                    textArea.Value = "";
                    ListView4.DataBind();
                }
            }
            //DateTime start_date = DateTime.ParseExact(startDate.Text,"dd-MM-yyyy", null);
            //DateTime end_date = DateTime.ParseExact(endDate.Text, "dd-MM-yyyy", null);
        }
示例#4
0
    protected void lnkbtn1_Command(object sender, CommandEventArgs e)
    {
        double filepath = double.Parse(e.CommandName.ToString());

        cn = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True");
        cn.Open();
        string g = "select * from MobileWallpaper where id='" + filepath + "'";

        cmd = new SqlCommand(g, cn);
        // dr = cmd.ExecuteReader();
        da = new SqlDataAdapter(cmd);
        ds = new DataSet();
        da.Fill(ds);
        string path = ds.Tables[0].Rows[0][1].ToString();

        //string path = dr["image"].ToString();
        //  Response.Write(path);

        string   path1 = Server.MapPath(path);
        FileInfo file  = new FileInfo(path1);

        if (file.Exists)
        {
            file.Delete();
        }

        string gg = "delete from MobileWallpaper where id='" + filepath + "'";

        cmd = new SqlCommand(gg, cn);
        cmd.ExecuteNonQuery();

        cn.Close();
        Response.Write("<script>alert('Image Deleted Successfully')</script>");
        ListView4.DataBind();
    }
    public void fill_review()
    {
        int cnid = Convert.ToInt32(Request.QueryString["id"]);

        cmd.CommandText = "select * from  tblreview rw, tblcarver cv  where cv.cn_id=rw.cn_id and cv.vr_id='" + cnid + "' order by rw_id desc limit 2 ";
        dt = da.GetRecords(cmd);
        ListView4.DataSource = dt;
        ListView4.DataBind();
    }
示例#6
0
        private void BindProduct4()
        {
            DataTable dt = ProductService.SelectWoManLeft();

            if (dt != null && dt.Rows.Count != 0)
            {
                ListView4.DataSource = dt;
                ListView4.DataBind();
            }
        }
示例#7
0
 protected void ListView3_ItemCommand(object sender, ListViewCommandEventArgs e)
 {
     if (e.CommandName == "fahuo")
     {
         string orderid = e.CommandArgument.ToString();
         Oorder.updatestate(orderid, 2);
         ListView3.DataBind();
         ListView4.DataBind();
     }
 }
示例#8
0
        private void BindFosterTime()
        {
            DataTable dt = Bll.FosterService.SelectTopOne();

            if (dt != null && dt.Rows.Count > 0)
            {
                ListView4.DataSource = dt;
                ListView4.DataBind();
            }
        }
示例#9
0
        private void Bindhuju()
        {
            DataTable dt = BLL.CommodityManager.SelecthujuTop4();

            if (dt != null && dt.Rows.Count != 0)
            {
                ListView4.DataSource = dt;
                ListView4.DataBind();
            }
        }
示例#10
0
    private void GetReportData()
    {
        Database db        = new Database();
        Lang     lang      = new Lang();
        string   sqlSearch = "select * from Report where lang=@lang Order by id desc";

        db.AddParameter("@lang", lang.getCurrentLang());
        DataTable dt = db.ExecuteDataTable(sqlSearch);

        ListView4.DataSource = dt;
        ListView4.DataBind();
    }
示例#11
0
        protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
        {
            string Info_Id = GridView1.SelectedRow.Cells[0].Text;

            SqlDataAdapter da = new SqlDataAdapter(@"select * from sellers_price where good_id = '" + Info_Id + "' ", con);
            DataTable      dt = new DataTable();

            da.Fill(dt);

            Div2.Attributes.Add("style", "display:block;");
            Div3.Attributes.Add("style", "display:block;");
            ListView4.DataSource = dt;
            ListView4.DataBind();
        }
示例#12
0
 //评论
 protected void Button1_Click(object sender, EventArgs e)
 {
     if (Session["user"] != null)
     {
         if (TextBox1.Text.Trim() != "")
         {
             String str = "insert into discuss(comment,publishdate,userid,fileid) values('" + TextBox1.Text + "','" + DateTime.Now + "','" + userid + "'," + Request.QueryString["fileid"] + ")";
             try
             {
                 con.Open();
                 SqlCommand com = new SqlCommand(str, con);
                 if (com.ExecuteNonQuery() > 0)
                 {
                     Response.Write("<script>alert('评论成功')</script>");
                     ListView2.DataBind();
                     ListView4.DataBind();
                 }
                 else
                 {
                     Response.Write("<script>alert('评论失败')</script>");
                 }
             }
             catch (Exception ez)
             {
                 Response.Write("<script>alert('评论失败2')</script>");
             }
             finally
             {
                 con.Close();
             }
         }
         else
         {
             Response.Write("<script>alert('评论不能为空,请输入评论!!!')</script>");
         }
     }
     else
     {
         Response.Write("<script>alert('请登录后再评论!!!')</script>");
     }
 }
示例#13
0
 //绑定用户帖子下的评论
 protected void Bindnbc()
 {
     ListView4.DataSource = UserIndexBLL.BBScomt_ALL(Session["username"].ToString());
     ListView4.DataBind();
 }
示例#14
0
 protected void BtnMWdelete_Click(object sender, EventArgs e)
 {
     PanelMWinsert.Visible = false;
     PanelMWdelete.Visible = true;
     ListView4.DataBind();
 }
示例#15
0
文件: tushu.aspx.cs 项目: CHIclay/YUJ
 protected void shige()
 {
     ListView4.DataSource = BookManager.shige();
     ListView4.DataBind();
 }
示例#16
0
        public void getSource()
        {
            List <ListItems> columnList = new List <ListItems>();

            if (auth.CompleteAuthorization(Request.Url) == true)
            {
                dict = new DictionaryDB();
                var twitterCtx = new LinqToTwitter.TwitterContext(auth);

                var tweets = from t in twitterCtx.Status
                             where t.Type == StatusType.User && t.ScreenName == DropDownList1.SelectedValue && t.Count == Int32.Parse(tweetnum.SelectedValue)
                             select t;

                foreach (var tweetStatus in tweets)
                {
                    var listItem          = new ListItems();
                    List <UrlEntity> Urle = tweetStatus.Entities.UrlEntities;
                    foreach (var url in Urle)
                    {
                        if (!string.IsNullOrWhiteSpace(url.ExpandedUrl))
                        {
                            listItem.url = url.ExpandedUrl;
                        }
                    }
                    listItem.tweet = tweetStatus.Text;
                    listItem.date  = tweetStatus.CreatedAt;
                    if (!string.IsNullOrEmpty(dict.getTweetCategory(tweetStatus.Text)))
                    {
                        listItem.category = dict.getTweetCategory(tweetStatus.Text);
                    }
                    else
                    {
                        listItem.category = "Others";
                    }
                    columnList.Add(listItem);
                }

                ListView1.DataSource = columnList.AsQueryable().ToArray();
                ListView1.DataBind();

                if (tweets != null)
                {
                    var dictionaryword = dict.getDictionaryWords();
                    foreach (var tweetStatus in tweets)
                    {
                        foreach (string word in dictionaryword)
                        {
                            if (tweetStatus.Text.Contains(word) == true)
                            {
                                string category = dict.getWordCategory(word);
                                break;
                            }
                        }
                    }



                    #region Pie Charts (Home, Network, Desktop, Mobile, Others)
                    foreach (var tweetStatus in tweets)
                    {
                        if (!string.IsNullOrEmpty(dict.getTweetCategory(tweetStatus.Text)))
                        {
                            if (dict.getTweetCategory(tweetStatus.Text) == "Network")
                            {
                                NetworkList.Add(tweetStatus);
                                networkCategory++;
                                #region Network Pie Chart
                                if (dict.getSecTweetCategory(tweetStatus.Text) == "Emails")
                                {
                                    emailCategory++;
                                }
                                else if (dict.getSecTweetCategory(tweetStatus.Text) == "Online Game")
                                {
                                    OnlineCategory++;
                                }
                                else if (dict.getSecTweetCategory(tweetStatus.Text) == "Social Media")
                                {
                                    SocialCategory++;
                                }
                                else if (dict.getSecTweetCategory(tweetStatus.Text) == "Server")
                                {
                                    ServerCategory++;
                                }
                                else if (dict.getSecTweetCategory(tweetStatus.Text) == "Website")
                                {
                                    WebsiteCategory++;
                                }

                                else
                                {
                                    netotherCategory++;
                                }
                                #endregion
                            }
                            else if (dict.getTweetCategory(tweetStatus.Text) == "Desktop")
                            {
                                desktopCategory++;
                                DesktopList.Add(tweetStatus);
                                #region Desktop Pie Chart
                                if (dict.getSecTweetCategory(tweetStatus.Text) == "Com Hardware")
                                {
                                    DHCategory++;
                                }
                                else if (dict.getSecTweetCategory(tweetStatus.Text) == "Com Software")
                                {
                                    DSCategory++;
                                }
                                else if (dict.getSecTweetCategory(tweetStatus.Text) == "Operating System")
                                {
                                    OperatingCategory++;
                                }
                                else
                                {
                                    DeskOtherCategory++;
                                }
                                #endregion
                            }
                            else if (dict.getTweetCategory(tweetStatus.Text) == "Mobile")
                            {
                                mobileCategory++;
                                MobileList.Add(tweetStatus);
                                #region Mobile Pie Chart
                                if (dict.getSecTweetCategory(tweetStatus.Text) == "Telecommunication")
                                {
                                    telecomCategory++;
                                }
                                else if (dict.getSecTweetCategory(tweetStatus.Text) == "Hardware")
                                {
                                    MHCategory++;
                                }
                                else if (dict.getSecTweetCategory(tweetStatus.Text) == "Software")
                                {
                                    MSCategory++;
                                }
                                else if (dict.getSecTweetCategory(tweetStatus.Text) == "Platform")
                                {
                                    PlatformCategory++;
                                }
                                else
                                {
                                    MobOtherCategory++;
                                }
                                #endregion
                            }
                        }
                        else
                        {
                            otherCategory++;
                            OthersList.Add(tweetStatus);
                        }
                    }
                    #endregion

                    #region Home Categories (Segment)
                    if (networkCategory != 0)
                    {
                        DataPoint network = new DataPoint();
                        network.SetValueXY("Network", networkCategory);
                        Chart1.Series[0].Points.Add(network);
                        Chart1.Series["Series1"]["PieLabelStyle"] = "outside";
                        columnList.Clear();
                        foreach (var tweetStatus in NetworkList)
                        {
                            var listItem          = new ListItems();
                            List <UrlEntity> Urle = tweetStatus.Entities.UrlEntities;
                            foreach (var url in Urle)
                            {
                                if (!string.IsNullOrWhiteSpace(url.ExpandedUrl))
                                {
                                    listItem.url = url.ExpandedUrl;
                                }
                            }
                            listItem.tweet = tweetStatus.Text;
                            listItem.date  = tweetStatus.CreatedAt;
                            if (!string.IsNullOrEmpty(dict.getSecTweetCategory(tweetStatus.Text)))
                            {
                                listItem.category = dict.getSecTweetCategory(tweetStatus.Text);
                            }
                            else
                            {
                                listItem.category = "Others";
                            }
                            columnList.Add(listItem);
                        }
                        ListView2.DataSource = columnList.AsQueryable().ToArray();
                        ListView2.DataBind();
                    }
                    if (desktopCategory != 0)
                    {
                        DataPoint desktop = new DataPoint();
                        desktop.SetValueXY("Desktop", desktopCategory);
                        Chart1.Series[0].Points.Add(desktop);
                        Chart1.Series["Series1"]["PieLabelStyle"] = "outside";
                        columnList.Clear();
                        foreach (var tweetStatus in DesktopList)
                        {
                            var listItem          = new ListItems();
                            List <UrlEntity> Urle = tweetStatus.Entities.UrlEntities;
                            foreach (var url in Urle)
                            {
                                if (!string.IsNullOrWhiteSpace(url.ExpandedUrl))
                                {
                                    listItem.url = url.ExpandedUrl;
                                }
                            }
                            listItem.tweet = tweetStatus.Text;
                            listItem.date  = tweetStatus.CreatedAt;
                            if (!string.IsNullOrEmpty(dict.getSecTweetCategory(tweetStatus.Text)))
                            {
                                listItem.category = dict.getSecTweetCategory(tweetStatus.Text);
                            }
                            else
                            {
                                listItem.category = "Others";
                            }
                            columnList.Add(listItem);
                        }
                        ListView4.DataSource = columnList.AsQueryable().ToArray();
                        ListView4.DataBind();
                    }
                    if (mobileCategory != 0)
                    {
                        DataPoint mobile = new DataPoint();
                        mobile.SetValueXY("Mobile", mobileCategory);
                        Chart1.Series[0].Points.Add(mobile);
                        Chart1.Series["Series1"]["PieLabelStyle"] = "outside";
                        columnList.Clear();
                        foreach (var tweetStatus in MobileList)
                        {
                            var listItem          = new ListItems();
                            List <UrlEntity> Urle = tweetStatus.Entities.UrlEntities;
                            foreach (var url in Urle)
                            {
                                if (!string.IsNullOrWhiteSpace(url.ExpandedUrl))
                                {
                                    listItem.url = url.ExpandedUrl;
                                }
                            }
                            listItem.tweet = tweetStatus.Text;
                            listItem.date  = tweetStatus.CreatedAt;
                            if (!string.IsNullOrEmpty(dict.getSecTweetCategory(tweetStatus.Text)))
                            {
                                listItem.category = dict.getSecTweetCategory(tweetStatus.Text);
                            }
                            else
                            {
                                listItem.category = "Others";
                            }
                            columnList.Add(listItem);
                        }
                        ListView3.DataSource = columnList.AsQueryable().ToArray();
                        ListView3.DataBind();
                    }
                    if (otherCategory != 0)
                    {
                        DataPoint others = new DataPoint();
                        others.SetValueXY("Others", otherCategory);
                        Chart1.Series["Series1"]["PieLabelStyle"] = "outside";
                        Chart1.Series[0].Points.Add(others);
                        columnList.Clear();
                        foreach (var tweetStatus in OthersList)
                        {
                            var listItem          = new ListItems();
                            List <UrlEntity> Urle = tweetStatus.Entities.UrlEntities;
                            foreach (var url in Urle)
                            {
                                if (!string.IsNullOrWhiteSpace(url.ExpandedUrl))
                                {
                                    listItem.url = url.ExpandedUrl;
                                }
                            }
                            listItem.tweet = tweetStatus.Text;
                            listItem.date  = tweetStatus.CreatedAt;
                            if (!string.IsNullOrEmpty(dict.getSecTweetCategory(tweetStatus.Text)))
                            {
                                listItem.category = dict.getSecTweetCategory(tweetStatus.Text);
                            }
                            else
                            {
                                listItem.category = "Others";
                            }
                            columnList.Add(listItem);
                        }
                        ListView5.DataSource = columnList.AsQueryable().ToArray();
                        ListView5.DataBind();
                    }
                    #endregion

                    #region Network Categories (Segment)
                    if (emailCategory != 0)
                    {
                        DataPoint email = new DataPoint();
                        email.SetValueXY("Email", emailCategory);
                        Chart2.Series[0].Points.Add(email);
                        Chart2.Series["Series1"]["PieLabelStyle"] = "outside";
                    }
                    if (OnlineCategory != 0)
                    {
                        DataPoint onlinegame = new DataPoint();
                        onlinegame.SetValueXY("Online Game", OnlineCategory);
                        Chart2.Series[0].Points.Add(onlinegame);
                        Chart2.Series["Series1"]["PieLabelStyle"] = "outside";
                    }
                    if (SocialCategory != 0)
                    {
                        DataPoint social = new DataPoint();
                        social.SetValueXY("Social Media", SocialCategory);
                        Chart2.Series[0].Points.Add(social);
                        Chart2.Series["Series1"]["PieLabelStyle"] = "outside";
                    }
                    if (WebsiteCategory != 0)
                    {
                        DataPoint website = new DataPoint();
                        website.SetValueXY("Website", WebsiteCategory);
                        Chart2.Series[0].Points.Add(website);
                        Chart2.Series["Series1"]["PieLabelStyle"] = "outside";
                    }
                    if (ServerCategory != 0)
                    {
                        DataPoint server = new DataPoint();
                        server.SetValueXY("Server", ServerCategory);
                        Chart2.Series[0].Points.Add(server);
                        Chart2.Series["Series1"]["PieLabelStyle"] = "outside";
                    }
                    if (netotherCategory != 0)
                    {
                        DataPoint netother = new DataPoint();
                        netother.SetValueXY("Others", netotherCategory);
                        Chart2.Series[0].Points.Add(netother);
                        Chart2.Series["Series1"]["PieLabelStyle"] = "outside";
                    }
                    if (emailCategory == 0 && OnlineCategory == 0 && SocialCategory == 0 && WebsiteCategory == 0 && ServerCategory == 0 && netotherCategory == 0)
                    {
                        Chart2.Visible = false;
                    }
                    #endregion

                    #region Mobile Category (Segment)
                    if (telecomCategory != 0)
                    {
                        DataPoint telecom = new DataPoint();
                        telecom.SetValueXY("Telecom", telecomCategory);
                        Chart3.Series[0].Points.Add(telecom);
                        Chart3.Series["Series1"]["PieLabelStyle"] = "outside";
                    }

                    if (MHCategory != 0)
                    {
                        DataPoint mobhardware = new DataPoint();
                        mobhardware.SetValueXY("Hardware", MHCategory);
                        Chart3.Series[0].Points.Add(mobhardware);
                        Chart3.Series["Series1"]["PieLabelStyle"] = "outside";
                    }

                    if (MSCategory != 0)
                    {
                        DataPoint mobsoftware = new DataPoint();
                        mobsoftware.SetValueXY("Software", MSCategory);
                        Chart3.Series[0].Points.Add(mobsoftware);
                        Chart3.Series["Series1"]["PieLabelStyle"] = "outside";
                    }

                    if (PlatformCategory != 0)
                    {
                        DataPoint platform = new DataPoint();
                        platform.SetValueXY("Platform", PlatformCategory);
                        Chart3.Series[0].Points.Add(platform);
                        Chart3.Series["Series1"]["PieLabelStyle"] = "outside";
                    }

                    if (MobOtherCategory != 0)
                    {
                        DataPoint mobothers = new DataPoint();
                        mobothers.SetValueXY("Others", MobOtherCategory);
                        Chart3.Series[0].Points.Add(mobothers);
                        Chart3.Series["Series1"]["PieLabelStyle"] = "outside";
                    }

                    if (telecomCategory == 0 && MHCategory == 0 && MSCategory == 0 && PlatformCategory == 0 && MobOtherCategory == 0)
                    {
                        Chart3.Visible = false;
                    }
                    #endregion

                    #region Desktop Categories (Segment)
                    if (DHCategory != 0)
                    {
                        DataPoint DeskHardware = new DataPoint();
                        DeskHardware.SetValueXY("Hardware", DHCategory);
                        Chart4.Series[0].Points.Add(DeskHardware);
                        Chart4.Series["Series1"]["PieLabelStyle"] = "outside";
                    }

                    if (DSCategory != 0)
                    {
                        DataPoint DeskSoftware = new DataPoint();
                        DeskSoftware.SetValueXY("Software", DSCategory);
                        Chart4.Series[0].Points.Add(DeskSoftware);
                        Chart4.Series["Series1"]["PieLabelStyle"] = "outside";
                    }

                    if (OperatingCategory != 0)
                    {
                        DataPoint OS = new DataPoint();
                        OS.SetValueXY("Operating System", OperatingCategory);
                        Chart4.Series[0].Points.Add(OS);
                        Chart4.Series["Series1"]["PieLabelStyle"] = "outside";
                    }

                    if (DeskOtherCategory != 0)
                    {
                        DataPoint DeskOther = new DataPoint();
                        DeskOther.SetValueXY("Others", DeskOtherCategory);
                        Chart4.Series[0].Points.Add(DeskOther);
                        Chart4.Series["Series1"]["PieLabelStyle"] = "outside";
                    }

                    if (DHCategory == 0 && DSCategory == 0 && OperatingCategory == 0 && DeskOtherCategory == 0)
                    {
                        Chart4.Visible = false;
                    }
                    #endregion
                }
            }
            activate = "activated";
        }