protected void lvLastMessages_SelectedIndexChanging(object sender, ListViewSelectEventArgs e) { //Grab conversation ID from hidden field if (e.NewSelectedIndex > -1) { HiddenField hdfield = (HiddenField)lvLastMessages.Items[e.NewSelectedIndex].FindControl("hfConvID"); if (hdfield != null) { //Extract the conversation messages from conversation list item if (PMConversations != null) { List <Message> msgs = PMConversations.Where(c => c.ID.Equals(hdfield.Value)).First <Conversation>().Messages; rptMessages.DataSource = msgs; rptMessages.DataBind(); //Mark conversation as read TelligentService.MarkConversationRead(CurrentMember.ScreenName, hdfield.Value); Conversations = null; } } lvLastMessages.SelectedIndex = e.NewSelectedIndex; } BindConversations(false); }
/// <summary> /// Событие перед выбором детального шага /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void lvStep_SelectedIndexChanging(object sender, ListViewSelectEventArgs e) { this.SelectIndexStep = e.NewSelectedIndex; this.IDlvStep = ((ListView)sender).ClientID; lvBigStep.SelectedIndex = -1; lvBigStep.DataBind(); }
protected void lvIntl_SelectedIndexChanging(object sender, ListViewSelectEventArgs e) { ListViewItem item = lvIntl.Items[e.NewSelectedIndex]; Label subNo = (Label)item.FindControl("lblSubFileNo"); Label subNo1 = (Label)item.FindControl("lblSubFileNo1"); string SubFileNo = ""; if (subNo != null) { SubFileNo = subNo.Text.Trim(); } else if (subNo1 != null) { SubFileNo = subNo1.Text.Trim(); } con.ConnectionString = ConfigurationManager.ConnectionStrings["PATENTCN"].ConnectionString; System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-GB"); string sql = "select subFileNo,RequestDt,Country,Partner,PartnerNo,Type,Attorney,ApplicationNo,FilingDt," + "PublicationNo,PublicationDt,Status,SubStatus,PatentNo,PatentDt,Remark from international where fileno like '" + ddlFileNo.Text.Trim() + "' and subFileNo like '" + SubFileNo + "' order by subfileno"; SqlDataAdapter sda = new SqlDataAdapter(sql, con); DataTable dt = new DataTable(); sda.Fill(dt); dvIntl.DataSource = dt; dvIntl.DataBind(); con.Close(); }
protected void Pagos_ListView_SelectedIndexChanging(object sender, ListViewSelectEventArgs e) { // el datasource no guarda el where clause en viewstate ... string sqlServerWhereString = Session["FiltroForma"].ToString(); this.Pagos_EntityDataSource.Where = sqlServerWhereString; }
protected void lvNews_SelectedIndexChanging(object sender, ListViewSelectEventArgs e) { try { Label lblnID = (Label)lvNews.Items[e.NewSelectedIndex].FindControl("lblnID"); int nID = 0; if (int.TryParse(lblnID.Text.Trim(), out nID) && nID > 0) { DBLL.clsNews clsnews = new DBLL.clsNews(); DataTable dtnews = clsnews.Select_tb_NewsBynNewsID(nID); if (dtnews != null && dtnews.Rows.Count > 0) { lblNewsDetailtitle.Text = dtnews.Rows[0]["sTitle"].ToString(); lblNewsDetailTime.Text = dtnews.Rows[0]["dCreatedTime"].ToString(); divNewsDetail.InnerHtml = dtnews.Rows[0]["sContent"].ToString(); PnlNewsDetail.Visible = true; lvNews.Visible = false; } } } catch (Exception) { throw; } }
protected void lvFAQs_SelectedIndexChanging(object sender, ListViewSelectEventArgs e) { try { Label lblnID = (Label)lvFAQs.Items[e.NewSelectedIndex].FindControl("lblnID"); int nID = 0; if (int.TryParse(lblnID.Text.Trim(), out nID) && nID > 0) { DBLL.clsFAQs clsnews = new DBLL.clsFAQs(); DataTable dtnews = clsnews.Select_tb_FAQsBynFAQID(nID); if (dtnews != null && dtnews.Rows.Count > 0) { if (Session["languageGlobal"] == "en") { lblFAQsDetailtitle.Text = dtnews.Rows[0]["sQuestionEN"].ToString(); lblFAQsDetailTime.Text = dtnews.Rows[0]["dCreatedTime"].ToString(); divFAQsDetail.InnerHtml = dtnews.Rows[0]["sAnswerEN"].ToString(); } else { lblFAQsDetailtitle.Text = dtnews.Rows[0]["sQuestionCN"].ToString(); lblFAQsDetailTime.Text = dtnews.Rows[0]["dCreatedTime"].ToString(); divFAQsDetail.InnerHtml = dtnews.Rows[0]["sAnswerCN"].ToString(); } PnlFAQsDetail.Visible = true; lvFAQs.Visible = false; } } } catch (Exception) { throw; } }
protected void ListViewReportes_SelectedIndexChanging(object sender, ListViewSelectEventArgs e) { ListViewItem item = (ListViewItem)ListViewReportes.Items[e.NewSelectedIndex]; this.Session["ReporteSeleccionado"] = e.NewSelectedIndex; iframeExcel.Attributes["src"] = ""; }
protected void VenueDetailsView_SelectedIndexChanging(object sender, ListViewSelectEventArgs e) { //Check if the user is logged in or not if (!HttpContext.Current.User.Identity.IsAuthenticated) { //Showing login required message ScriptManager.RegisterStartupScript(Page, Page.GetType(), "Alert", "alert('You need to login to add to basket');", true); } else { //Creating new basket if doesn't exist if (Session["Basket"] == null) { venuesBasket = new List <string>(); } else { venuesBasket = (List <string>)Session["Basket"]; } //Adding new venue to the basket VenueDetailsView.SelectedIndex = e.NewSelectedIndex; venuesBasket.Add(VenueDetailsView.SelectedDataKey.Value.ToString()); //Assigning the updated list to the basket session Session["Basket"] = venuesBasket; //Showing success message message ScriptManager.RegisterStartupScript(Page, Page.GetType(), "Alert", "alert('This venue is added successfully to your venues basket');", true); } }
protected void lvProductCategoryList_SelectedIndexChanging(object sender, ListViewSelectEventArgs e) { Label lblnID = (Label)lvProductCategoryList.Items[e.NewSelectedIndex].FindControl("lblnProductCategoryID"); int _nID = 0; DBLL.clsProductCategory ProductCategory = new DBLL.clsProductCategory(); if (int.TryParse(lblnID.Text.Trim(), out _nID) && _nID > 0) { DBLL.DBcommon dbcom = new DBLL.DBcommon(); Model.dsProduct.tb_ProductCategoryDataTable ProductList = new Model.dsProduct.tb_ProductCategoryDataTable(); ProductList.Merge(dbcom.selectNormalTableofAll(false, "tb_ProductCategory")); ddlProductCateTreelist1.ProductList = ProductList; ddlProductCateTreelist1.Fresh(); MultiView1.ActiveViewIndex = 1; DataTable dt = ProductCategory.Select_tb_ProductCategoryBynProductCategoryID(_nID); txtsProductCategoryNameCN.Text = dt.Rows[0]["sProductCategoryNameCN"].ToString(); txtsProductCategoryNameEN.Text = dt.Rows[0]["sProductCategoryNameEN"].ToString(); CKEditorControl1.Text = dt.Rows[0]["sContentCN"].ToString(); CKEditorControl2.Text = dt.Rows[0]["sContentEN"].ToString(); lblPCID.Text = dt.Rows[0]["nParentCategoryID"].ToString(); //ddlProductCateTreelist1.nSelectProductCategoryID = int.Parse(dt.Rows[0]["nParentCategoryID"].ToString()); ddlProductCateTreelist1.setnSelectID(int.Parse(dt.Rows[0]["nParentCategoryID"].ToString())); ddlnSorting.SelectedValue = dt.Rows[0]["nSorting"].ToString(); hfProductCategoryUpdateID.Value = _nID.ToString(); } }
protected void lvUserList_SelectedIndexChanging(object sender, ListViewSelectEventArgs e) { Label lblnID = (Label)lvUserList.Items[e.NewSelectedIndex].FindControl("lblnUserID"); int _nID = 0; DBLL.clsUser user = new DBLL.clsUser(); if (int.TryParse(lblnID.Text.Trim(), out _nID) && _nID > 0) { MultiView1.ActiveViewIndex = 1; DataTable dt = user.Select_tb_UserBynUserID(_nID); txtsUsername.Text = dt.Rows[0]["sUsername"].ToString(); txtsPassword.Text = dt.Rows[0]["sPassword"].ToString(); txtsPassword.Attributes.Add("Value", txtsPassword.Text); txtsPassword2.Text = dt.Rows[0]["sPassword"].ToString(); txtsPassword2.Attributes.Add("Value", txtsPassword2.Text); txtsRealName.Text = dt.Rows[0]["sRealName"].ToString(); rblnUserSex.SelectedValue = dt.Rows[0]["nUserSex"].ToString(); txtsUserQQ.Text = dt.Rows[0]["sUserQQ"].ToString(); txtsUserMSN.Text = dt.Rows[0]["sUserMSN"].ToString(); txtsUserPhone.Text = dt.Rows[0]["sUserPhone"].ToString(); txtsUserEmail.Text = dt.Rows[0]["sUserEmail"].ToString(); cbIsContact.Checked = bool.Parse(dt.Rows[0]["IsContact"].ToString()); cbIsInquiry.Checked = bool.Parse(dt.Rows[0]["IsInquiry"].ToString()); rblnUserType.SelectedValue = dt.Rows[0]["nUserType"].ToString(); hfUserUpdateID.Value = _nID.ToString(); } }
protected void ApprovedList_SelectedIndexChanging(object sender, ListViewSelectEventArgs e) { ApprovedList.SelectedIndex = e.NewSelectedIndex; string id = ApprovedList.SelectedDataKey.Value.ToString(); Response.Redirect("/User/VenueDetails.aspx?id=" + id); }
protected void ListView1_SelectedIndexChanging(object sender, ListViewSelectEventArgs e) { this.ListView1.SelectedIndex = e.NewSelectedIndex; ListView1.DataSource = new List<int>() { 1, 2, 3 }; ListView1.DataBind(); }
protected void ListView1_SelectedIndexChanging(object sender, ListViewSelectEventArgs e) { ListView1.SelectedIndex = e.NewSelectedIndex; string pid = ListView1.SelectedDataKey.Value.ToString(); MessageLabel.Text = "Selected Product ID: " + pid; BindData(); }
protected void lvAttraction_SelectedIndexChanging(object sender, ListViewSelectEventArgs e) { List <Attraction> attractions = (List <Attraction>)Session["attraction"];; List <Attraction> attList = new List <Attraction>(); int currentPage = DPAttraction.StartRowIndex / DPAttraction.MaximumRows; attList.Add(attractions[DPAttraction.PageSize * currentPage + e.NewSelectedIndex]); }
protected void lvHotel_SelectedIndexChanging(object sender, ListViewSelectEventArgs e) { List <Hotel> hotels = (List <Hotel>)Session["hotel"]; List <Hotel> aHotel = new List <Hotel>(); int currentPage = DPAccommodation.StartRowIndex / DPAccommodation.MaximumRows; aHotel.Add(aHotel[DPAccommodation.PageSize * currentPage + e.NewSelectedIndex]); }
protected void lvRestaurant_SelectedIndexChanging(object sender, ListViewSelectEventArgs e) { List <Restaurant> rList = (List <Restaurant>)Session["restaurant"]; List <Restaurant> rLists = new List <Restaurant>(); int currentPage = DPRestaurant.StartRowIndex / DPRestaurant.MaximumRows; rLists.Add(rList[DPRestaurant.PageSize * currentPage + e.NewSelectedIndex]); }
protected void lvExamResponse_SelectedIndexChanging(object sender, ListViewSelectEventArgs e) { LinkButton lbFileName = lvExamResponse.Items[e.NewSelectedIndex].FindControl("lbtnResponseFile") as LinkButton; string strPath = ""; string strFileName = ""; strPath = @"F:\PatentDocument\" + lblFileNo.Text.Trim() + @"\Examination" + @"\"; strFileName = lbFileName.Text.Trim(); string extension = Path.GetExtension(strPath + strFileName); string mimeType = "image/jpeg"; if (extension == ".jpg") { mimeType = "image/jpeg"; } else if (extension == ".xls") { mimeType = "application/vnd.xls"; } else if (extension == ".xlsx") { mimeType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"; } else if (extension == ".doc") { mimeType = "application/msword"; } else if (extension == ".docx") { mimeType = "application/vnd.openxmlformats-officedocument.wordprocessingml.document"; } else if (extension == ".ppt") { mimeType = "application/vnd.ms-powerpoint"; } else if (extension == ".pptx") { mimeType = "application/vnd.openxmlformats-officedocument.presentationml.presentation"; } else if (extension == ".pdf") { mimeType = "application/pdf"; } else if (extension == ".txt") { mimeType = "plain/text"; } FileStream fs = new FileStream(strPath + strFileName, FileMode.Open); byte[] bytBytes = new byte[fs.Length]; fs.Read(bytBytes, 0, (int)fs.Length); fs.Close(); strFileName = strFileName.Replace(" ", "-"); Response.AppendHeader("Content-Disposition", "attachment;filename=" + strFileName); Response.ContentType = mimeType; Response.BinaryWrite(bytBytes); Response.End(); }
protected void lsvItemPostedList_SelectedIndexChanging(object sender, ListViewSelectEventArgs e) { //int currentRow = DataPager1.StartRowIndex / DataPager1.MaximumRows; //Rental r = getRentalofThisMember()[DataPager1.PageSize * currentRow + e.NewSelectedIndex]; //Response.Redirect("Dispute.aspx?rentid=" + r.RentalID); ////More to be done here }
protected void lstViewSongs_SelectedIndexChanging(object sender, ListViewSelectEventArgs e) { lstViewSongs.SelectedIndex = e.NewSelectedIndex; lstViewSongs.DataBind(); if (NewSongSelected != null) { NewSongSelected(this, e); } }
protected void lvRoom_SelectedIndexChanging(object sender, ListViewSelectEventArgs e) { //selected index changing for lvroom List <Room> rooms = (List <Room>)Session["Room"]; List <Room> roomlist = new List <Room>(); int currentPage = DPRoom.StartRowIndex / DPRoom.MaximumRows; roomlist.Add(rooms[DPRoom.PageSize * currentPage + e.NewSelectedIndex]); }
protected void lv_products_SelectedIndexChanging(object sender, ListViewSelectEventArgs e) { int id = Convert.ToInt32(lv_products.DataKeys[e.NewSelectedIndex].Value); //add product to cart here lv_products.DataSource = product.SelectAllOffer(); lv_products.DataBind(); }
protected void selectedIndexChangingListSearch(object sender, ListViewSelectEventArgs e) { cargarSeachPeopleDefaul(); listSearchingPerson.SelectedIndex = e.NewSelectedIndex; //string idGrupo = lvwDatos.SelectedDataKey.Value.ToString(); listSearchingPerson.DataBind(); // Response.Write("<script>alert('" + lvwDatos.SelectedDataKey.Value.ToString() + "')</script>"); }
protected void lvProCate_SelectedIndexChanging(object sender, ListViewSelectEventArgs e) { try { Label lblnTCategoryID = (Label)lvProCate.Items[e.NewSelectedIndex].FindControl("lblnTCategoryID"); Response.Redirect(RedirectUrl + "?nTCategoryID=" + lblnTCategoryID.Text); } catch (Exception) { throw; } }
protected void uoListViewRemarks_SelectedIndexChanging(object sender, ListViewSelectEventArgs e) { HiddenField hdfRemarksID = (HiddenField)uoListViewRemarks.Items[e.NewSelectedIndex].FindControl("uoHiddenFieldRemarksID"); string sScript = "<script language='javascript'>"; sScript += " window.parent.$(\"#ctl00_NaviPlaceHolder_uoHiddenFieldPopupRemarks\").val(\"1\"); "; sScript += " window.parent.$(\"#ctl00_NaviPlaceHolder_uoHiddenFieldLatestRemarksID\").val(\"" + hdfRemarksID.Value + "\"); "; sScript += " parent.$.fancybox.close(); "; sScript += "</script>"; //ScriptManager.RegisterClientScriptBlock(uoButtonSave, this.GetType(), "scr", sScript, false); ClientScript.RegisterClientScriptBlock(typeof(string), "scr", sScript); }
protected void ListView_Folders_SelectedIndexChanging(object sender, ListViewSelectEventArgs e) { if (e.NewSelectedIndex > -1) { ListViewItem selItem = ListView_Folders.Items[e.NewSelectedIndex]; LinkButton myButton = (LinkButton)selItem.FindControl("Button_Name"); if (myButton != null) { CurrentFolder = Path.Combine(CurrentFolder, myButton.Text); Refresh(); } } }
protected void selectedIndexChanging(object sender, ListViewSelectEventArgs e) { if (lvwDatos.SelectedIndex != e.NewSelectedIndex) { lvwDatos.SelectedIndex = e.NewSelectedIndex; } else { lvwDatos.SelectedIndex = -1; } //string idGrupo = lvwDatos.SelectedDataKey.Value.ToString(); lvwDatos.DataBind(); // Response.Write("<script>alert('" + lvwDatos.SelectedDataKey.Value.ToString() + "')</script>"); }
protected void lvLinkList_SelectedIndexChanging(object sender, ListViewSelectEventArgs e) { Label lblnID = (Label)lvLinkList.Items[e.NewSelectedIndex].FindControl("lblnLinkID"); int _nID = 0; DBLL.clsLink Link = new DBLL.clsLink(); if (int.TryParse(lblnID.Text.Trim(), out _nID) && _nID > 0) { MultiView1.ActiveViewIndex = 1; DataTable dt = Link.Select_tb_LinkBynLinkID(_nID); ddlnType.Text = dt.Rows[0]["nType"].ToString(); txtsLink.Text = dt.Rows[0]["sLink"].ToString(); ddlnSorting.SelectedValue = dt.Rows[0]["nSorting"].ToString(); hfLinkUpdateID.Value = _nID.ToString(); } }
protected void lvTopicList_SelectedIndexChanging(object sender, ListViewSelectEventArgs e) { Label lblnID = (Label)lvTopicList.Items[e.NewSelectedIndex].FindControl("lblnTopicID"); int _nID = 0; DBLL.clsTopic Topic = new DBLL.clsTopic(); if (int.TryParse(lblnID.Text.Trim(), out _nID) && _nID > 0) { MultiView1.ActiveViewIndex = 1; DataTable dt = Topic.Select_tb_TopicBynTopicID(_nID); txtsTopicNameCN.Text = dt.Rows[0]["sTopicNameCN"].ToString(); txtsTopicNameEN.Text = dt.Rows[0]["sTopicNameEN"].ToString(); ddlnSorting.SelectedValue = dt.Rows[0]["nSorting"].ToString(); hfTopicUpdateID.Value = _nID.ToString(); } }
protected void lvwDatos_SelectedIndexChanging(object sender, ListViewSelectEventArgs e) { lvwDatos.SelectedIndex = e.NewSelectedIndex; // ListViewDataItem dato = lvwDatos.SelectedValue as ListViewDataItem; string pid = lvwDatos.SelectedDataKey.Value.ToString(); //string pid = ListView1.DataKeys[e.NewSelectedIndex].Value.ToString(); //Label1.Text = "Selected usuario ID: " + pid; lvwDatos.DataBind(); //Usuario dato = lvwDatos.Select as Usuario; //Response.Write("<script>alert('" + dato.id_usuario+"')</script>"); }
protected void lv_products_SelectedIndexChanging(object sender, ListViewSelectEventArgs e) { int id = Convert.ToInt32(lv_products.DataKeys[e.NewSelectedIndex].Value); DataTable datastatus = new DataTable(); DataTable dataorder = new DataTable(); try { if ((order.Selectstatus(order.OrderStatus.Saved, (int)Session["id"])).Rows.Count > 0) { datastatus = order.Selectstatus(order.OrderStatus.Saved, (int)Session["id"]); int ordid = (int)datastatus.Rows[0]["id"]; if (orderDetails.Selectbyprodandorder(id, ordid).Rows.Count == 0) { DataTable dtt2 = new DataTable(); dtt2 = DB.DBMange.product.SelectById(id); orderDetails.insert(ordid, Convert.ToDecimal(dtt2.Rows[0]["price"]), 1, id); } dataorder = orderDetails.Selectbyprodandorder(id, ordid); int orderdetailid = (int)dataorder.Rows[0]["id"]; int quantity = (int)dataorder.Rows[0]["quantity"]; int upquantity = quantity + 1; orderDetails.count(orderdetailid, upquantity); } else { DataTable dt2 = new DataTable(); //int id = Convert.ToInt32(lv_products.DataKeys[e.NewSelectedIndex].Value); dt2 = DB.DBMange.product.SelectById(id); //add product to cart here DataTable dt = new DataTable(); dt = DB.DBMange.order.insertandreturn((int)Session["id"], order.OrderStatus.Saved, DateTime.Now); DB.DBMange.orderDetails.insert(Convert.ToInt32(dt.Rows[0]["id"]), Convert.ToDecimal(dt2.Rows[0]["price"]), 1, id); lv_products.DataSource = product.SelectAllOffer(); lv_products.DataBind(); } } catch (Exception ex) { Response.Redirect("~/login.aspx", false); } }