Exemple #1
0
 protected void btnVerifyDelete_Click(object sender, EventArgs e)
 {
     PopupControlExtender.Show();
     try
     {
         if (ViewState["OTP"] != null)
         {
             if (ViewState["OTP"].ToString() == txtOtp.Text)
             {
                 Label  lbld_id        = ListView1.Items[0].FindControl("lbld_id") as Label;
                 Label  lbld_PayeeText = ListView1.Items[0].FindControl("lbld_PayeeText") as Label;
                 string PayeName       = lbld_PayeeText.Text;
                 string d_id           = lbld_id.Text;
                 dt.DeleteDues(d_id);
                 string textmsg = "" + d_id + " " + PayeName + " Due Record Deleted Successfully !";
                 ScriptManager.RegisterStartupScript(this, typeof(Page), "Warning", "<script>showpopwarning('" + textmsg + "')</script>", false);
                 showDues();
                 PopupControlExtender.Hide();
             }
         }
         else
         {
             lblmessage.Text      = "OTP does not matches";
             lblmessage.ForeColor = System.Drawing.Color.Red;
         }
     }
     catch (Exception ex)
     {
         string text = ex.Message.ToString();
         ScriptManager.RegisterStartupScript(this, typeof(Page), "Warning", "<script>showpoperror('" + text + "')</script>", false);
     }
 }
Exemple #2
0
    //Writes the calendar's selected date on the textbox
    protected void Calendar_SelectionChanged(object sender, EventArgs e)
    {
        PopupControlExtender pop = (PopupControlExtender)dvTicket.FindControl("txtTargetCompletionDate_PopupControlExtender");
        Calendar             cal = (Calendar)dvTicket.FindControl("Calendar");

        pop.Commit(cal.SelectedDate.ToShortDateString());
    }
Exemple #3
0
 protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
         //获取GridView控件中的PopupControlExtender 控件
         PopupControlExtender popup = (PopupControlExtender)e.Row.FindControl("PopupControlExtender1");
         //指定DynamicServicePath属性。
         popup.DynamicServicePath = "~/webservice.asmx";
     }
 }
Exemple #4
0
 protected void gdStudentData_RowCreated(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
         //ModalPopupExtender pce = e.Row.FindControl("PopupControlExtender1") as ModalPopupExtender;
         PopupControlExtender pce = e.Row.FindControl("PopupControlExtender1") as PopupControlExtender;
         string behaviorID        = "pce_" + e.Row.RowIndex;
         pce.BehaviorID = behaviorID;
         System.Web.UI.WebControls.Image img = (System.Web.UI.WebControls.Image)e.Row.FindControl("imgPOS");
         string OnMouseOverScript            = string.Format("$find('{0}').showPopup();", behaviorID);
         string OnMouseOutScript             = string.Format("$find('{0}').hidePopup();", behaviorID);
         img.Attributes.Add("onmouseover", OnMouseOverScript);
         img.Attributes.Add("onmouseout", OnMouseOutScript);
     }
 }
Exemple #5
0
        public void OnPopSelectCheckBoxList(CheckBoxList list, PopupControlExtender popControl)
        {
            string itemSelect = "";

            foreach (ListItem item in list.Items)
            {
                if (item.Selected == true)
                {
                    itemSelect += item.Value + ";";
                }
            }
            if (itemSelect.Length > 0)
            {
                itemSelect = itemSelect.Substring(0, itemSelect.Length - 1);
            }
            popControl.Commit(itemSelect);
        }
Exemple #6
0
        protected void GridView_RowCreated(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                PopupControlExtender pce = e.Row.FindControl("PopupControlExtender1") as PopupControlExtender;

                string behaviorID = "pce_" + e.Row.RowIndex;
                pce.BehaviorID = behaviorID;

                Image img = (Image)e.Row.FindControl("ImageMagnifier");

                string onMouseOverScript = string.Format("$find('{0}').showPopup();", behaviorID);
                string onMouseOutScript  = string.Format("$find('{0}').hidePopup();", behaviorID);

                img.Attributes.Add("onmouseover", onMouseOverScript);
                img.Attributes.Add("onmouseout", onMouseOutScript);
            }
        }
Exemple #7
0
    //////////////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////////////


    protected void lbtnFeedDetail_Click(object sender, EventArgs e)
    {
        GridViewRow          row = ((GridViewRow)((LinkButton)sender).NamingContainer);
        PopupControlExtender pce = row.FindControl("PopupControlExtenderTicker") as PopupControlExtender;

        ImageButton imbtnPhoto = (ImageButton)row.FindControl("imbtnPhoto");
        ImageButton imbtnVideo = (ImageButton)row.FindControl("imbtnVideo");
        HiddenField hfId       = (HiddenField)row.FindControl("HiddenFieldId");
        HiddenField hfWallId   = (HiddenField)row.FindControl("HiddenFieldWallId");

        TickerBO objClass = new TickerBO();

        objClass = TickerBLL.getTickerByTickerId(hfId.Value);



        string   sValue           = hfWallId.Value;
        GridView gridviewComments = (GridView)row.FindControl("GridViewComments");
        //LinkButton btn = (LinkButton)gvr.FindControl("LinkButton2");
        WallBO objWall = new WallBO();

        objWall = WallBLL.getWallByWallId(sValue);

        if (objWall.Type == Global.PHOTO || objWall.Type == Global.TAG_PHOTO)
        {
            imbtnPhoto.ImageUrl = "../../Resources/ThumbnailPhotos/" + objClass.EmbedPost + ".jpg";
            imbtnPhoto.Visible  = true;
        }
        if (objWall.Type == Global.VIDEO || objWall.Type == Global.TAG_VIDEO || objWall.Type == Global.POST_VIDEOLINK || objWall.Type == Global.TAG_VIDEOLINK)
        {
            imbtnVideo.Visible = true;
        }


        YouLikes(row);
        CountShare(row);
        gridviewComments.DataSource = CommentsDAL.getCommentsTop(Global.WALL, sValue, 2);
        gridviewComments.DataBind();
        Comment_YouLikes(row);

        pce.DataBind();
    }
Exemple #8
0
        protected override void CreateChildControls()
        {
            var panel = new Panel {
                ID = ClientID + "_panel", CssClass = CssClass, Width = Width
            };

            panel.Controls.Add(new Literal {
                Text = string.Format("<span class='{0}'>{1}</span>", TitleCssClass, Title)
            });
            panel.Controls.Add(new Literal {
                Text = string.Format("<span>{0}</span>", Text)
            });
            var popup = new PopupControlExtender
            {
                ID = ClientID + "_popupextender",
                TargetControlID = TargetControlID,
                PopupControlID  = panel.ID,
                Position        = Position
            };

            Controls.Add(panel);
            Controls.Add(popup);
        }
Exemple #9
0
        protected void Users_RowCreated(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                // Programmatically reference the PopupControlExtender
                PopupControlExtender pce = e.Row.FindControl("PopupControlExtender1") as PopupControlExtender;

                // Set the BehaviorID
                string behaviorID = string.Concat("pce", e.Row.RowIndex);
                pce.BehaviorID = behaviorID;

                // Programmatically reference the Image control
                //Image i = (Image)e.Row.Cells[1].FindControl("Image1");

                System.Web.UI.WebControls.Image i = (System.Web.UI.WebControls.Image)e.Row.Cells[1].FindControl("Image1");

                // Add the clie nt-side attributes (onmouseover & onmouseout)
                string OnMouseOverScript = string.Format("$find('{0}').showPopup();", behaviorID);
                string OnMouseOutScript  = string.Format("$find('{0}').hidePopup();", behaviorID);

                i.Attributes.Add("onmouseover", OnMouseOverScript);
                i.Attributes.Add("onmouseout", OnMouseOutScript);
            }
        }
Exemple #10
0
        protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e)
        {
            if (mp_no.Contains(".JSB MPBG/") || mp_no.Contains(".JSB MPQX/"))
            {
                if (e.Row.RowType == DataControlRowType.DataRow)
                {
                    // Programmatically reference the PopupControlExtender
                    PopupControlExtender pce = e.Row.FindControl("PopupControlExtender1") as PopupControlExtender;
                    // Set the BehaviorID
                    string behaviorID = string.Concat("pce", e.Row.RowIndex);
                    pce.BehaviorID = behaviorID;

                    // Programmatically reference the Image control
                    HyperLink hpl = (HyperLink)e.Row.FindControl("hplBeforeChg");

                    // Add the clie nt-side attributes (onmouseover & onmouseout)
                    string OnMouseOverScript = string.Format("$find('{0}').showPopup();", behaviorID);
                    string OnMouseOutScript  = string.Format("$find('{0}').hidePopup();", behaviorID);

                    hpl.Attributes.Add("onmouseover", OnMouseOverScript);
                    hpl.Attributes.Add("onmouseout", OnMouseOutScript);
                }
            }
        }
Exemple #11
0
 protected void Button6_Click(object sender, EventArgs e)
 {
     PopupControlExtender.GetProxyForCurrentPopup(Page).Cancel();
 }
Exemple #12
0
 protected void Button5_Click(object sender, EventArgs e)
 {
     PopupControlExtender.GetProxyForCurrentPopup(Page).Commit("");
 }
Exemple #13
0
 protected void Calendar1_SelectionChanged(object sender, EventArgs e)
 {
     PopupControlExtender.GetProxyForCurrentPopup(Page).Commit(Calendar1.SelectedDate.ToShortDateString());
 }
Exemple #14
0
 protected void lbtnDelete_Click(object sender, EventArgs e)
 {
     SendOtp();
     PopupControlExtender.Show();
 }
Exemple #15
0
    protected void lbtnLike_Click(object sender, EventArgs e)
    {
        string               statuslike  = "like a post";
        GridViewRow          row         = ((GridViewRow)((LinkButton)sender).NamingContainer);
        LinkButton           linkLike    = (LinkButton)row.FindControl("lbtnLike");
        Label                labelLike   = (Label)row.FindControl("lblLike");
        Literal              literalpost = (Literal)row.FindControl("Literal1");
        HiddenField          hfId        = (HiddenField)row.FindControl("HiddenFieldWallId");
        HiddenField          hfType      = (HiddenField)row.FindControl("HiddenFieldType");
        HiddenField          hfEmbedPost = (HiddenField)row.FindControl("HiddenFieldEmbedTickerPost");
        PopupControlExtender pce         = row.FindControl("PopupControlExtenderTicker") as PopupControlExtender;
        UserBO               objUser     = new UserBO();

        objUser = UserBLL.getUserByUserId(Session["UserId"].ToString());
        if (linkLike.Text == "Like")
        {
            LikesBO objClass = new LikesBO();
            objClass.AtId      = hfId.Value;
            objClass.Type      = Global.WALL;
            objClass.UserId    = Session["UserId"].ToString();
            objClass.FirstName = objUser.FirstName;
            objClass.LastName  = objUser.LastName;
            LikesBLL.insertLikes(objClass);
            labelLike.Text = "";
            linkLike.Text  = "UnLike";
            statuslike     = "like a post";
        }
        else
        {
            LikesBO objClass = new LikesBO();
            objClass.AtId   = hfId.Value;
            objClass.Type   = Global.WALL;
            objClass.UserId = Session["UserId"].ToString();
            LikesBLL.unLikes(objClass);
            labelLike.Text = "";
            linkLike.Text  = "Like";
            statuslike     = "unlike a post";
        }

        pce.DataBind();

        /////////////////////////////////////Friends recent activities
        if (!userid.Equals(Session["UserId"].ToString()))
        {
            UserBO objFUser = new UserBO();
            objFUser = UserBLL.getUserByUserId(userid);

            WallBO objWall = new WallBO();
            objWall.PostedByUserId  = Session["UserId"].ToString();
            objWall.WallOwnerUserId = Session["UserId"].ToString();
            objWall.FirstName       = objUser.FirstName;
            objWall.LastName        = objUser.LastName;
            objWall.Post            = "Like a <a  href=\"ViewProfile.aspx?UserId=" + userid + "\">" + objFUser.FirstName + " " + objFUser.LastName + "</a> Wall Post";
            objWall.AddedDate       = DateTime.Now;
            objWall.Type            = Global.PROFILE_CHANGE;
            WallBLL.insertWall(objWall);
        }
        ////////////////////////////////////////
        ////////////////////////////////////TICKER CODE //////////////////////////////////
        ////////////////////////////////////////////////////////////////////////////////////

        List <UserFriendsBO> list = FriendsBLL.getAllFriendsListName(Session["UserId"].ToString(), Global.CONFIRMED);

        //get the education,hometown and employer of people in list
        foreach (UserFriendsBO Useritem in list)
        {
            TickerBO objTicker = new TickerBO();


            objTicker.PostedByUserId    = Session["UserId"].ToString();
            objTicker.TickerOwnerUserId = Useritem.FriendUserId;
            objTicker.FirstName         = objUser.FirstName;
            objTicker.LastName          = objUser.LastName;
            objTicker.Post      = literalpost.Text;
            objTicker.Title     = statuslike;
            objTicker.AddedDate = DateTime.UtcNow;
            objTicker.Type      = Convert.ToInt32(hfType.Value);
            objTicker.EmbedPost = hfEmbedPost.Value;
            objTicker.WallId    = hfId.Value;
            TickerBLL.insertTicker(objTicker);
        }
        TickerBO objTickerUser = new TickerBO();


        objTickerUser.PostedByUserId    = Session["UserId"].ToString();
        objTickerUser.TickerOwnerUserId = Session["UserId"].ToString();
        objTickerUser.FirstName         = objUser.FirstName;
        objTickerUser.LastName          = objUser.LastName;
        objTickerUser.Post      = literalpost.Text;
        objTickerUser.Title     = statuslike;
        objTickerUser.AddedDate = DateTime.UtcNow;
        objTickerUser.Type      = Convert.ToInt32(hfType.Value);
        objTickerUser.EmbedPost = hfEmbedPost.Value;
        objTickerUser.WallId    = hfId.Value;

        TickerBLL.insertTicker(objTickerUser);
        ////////////////////////////////////////////////////////////////////////////////////
    }
        protected void Page_Init(object sender, EventArgs e)
        {
            user = Membership.GetUser();
            if (user != null)
            {
                //<cc1:ModalPopupExtender ID="mpeSc" runat="server" PopupControlID="popScore" CancelControlID="cancelVote"
                //TargetControlID="btnVote" BackgroundCssClass="modalBackground" BehaviorID="mpeVote" />
                popScore.Visible = true;
                ModalPopupExtender mpeScore = new ModalPopupExtender()
                {
                    ID                 = "mpeSc",
                    PopupControlID     = popScore.ClientID,
                    CancelControlID    = cancelVote.ClientID,
                    TargetControlID    = btnVote.ID, //will note resolve, done in exception
                    BackgroundCssClass = "modalBackground",
                    BehaviorID         = "mpeScore"
                };
                mpeScore.ResolveControlID += mpe_ResolveControlID;
                this.Form.Controls.Add(mpeScore);


                //<cc1:PopupControlExtender ID="PCECom" runat="server" BehaviorID="comPopBhr" Position="Left" OffsetX="-250" OffsetY="38"
                //PopupControlID="pnlVote" TargetControlID="btnComDummy" />
                pnlVote.Visible = true;
                PopupControlExtender popVote = new PopupControlExtender()
                {
                    ID              = "PCECom",
                    PopupControlID  = pnlVote.ClientID,
                    TargetControlID = btnComDummy.ID,   //will note resolve, done in exception
                    BehaviorID      = "comPopBhr",
                    Position        = PopupControlPopupPosition.Left,
                    OffsetX         = -250,
                    OffsetY         = 38
                };
                popVote.ResolveControlID += mpe_ResolveControlID;
                upComs.ContentTemplateContainer.Controls.Add(popVote);
            }
            else
            {
                btnVote.Attributes.Add("onclick", "$find('mpbSignup').show();");
            }

            if (!IsPostBack)
            {
                if (Request["cat"] != null)
                {
                    bool loaded = BindAll();
                    LoadEmbed();

                    if (user != null && loaded && _board.UserId == user.ProviderUserKey.ToString())
                    {
                        lnkEdit.Visible   = true;
                        lnkEdit.InnerText = "Edit";
                        lnkEdit.HRef      = "/users/make_scoreboard.aspx?edit=" + Request["cat"];
                    }
                }
            }
            else
            {
                //might be partial postback of comment deleted.  Check for commandNAme of "delCom"
            }
        }