protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if ((Request.QueryString["typ"] != null) && (Request.QueryString["id"] != null))
            {
                HF_ToID.Value = Request.QueryString["id"];
                switch (Request.QueryString["typ"])
                {
                case "prf":
                    L_ToMatID.Text = "- MatrimonialID > " + Request.QueryString["id"];
                    HF_Type.Value  = "prf";
                    break;

                case "ss":
                    L_ToMatID.Text = "- Succsss Story ID > " + Request.QueryString["id"];
                    HF_Type.Value  = "ss";
                    break;

                default:
                    Response.Redirect("~/Extras/ErrorReport.aspx?id=406");
                    break;
                }

                txtCount.Text = TB_Message.MaxLength.ToString();

                //Adding Attributes to Text Box

                TB_Message.Attributes.Add("onKeyUp",
                                          "javascript:document.getElementById('" + txtCount.ClientID +
                                          "').setAttribute('value', (" + TB_Message.MaxLength +
                                          " - parseInt(document.getElementById('" + TB_Message.ClientID +
                                          "').getAttribute('value').length)));");
            }
            else
            {
                Response.Redirect("~/Extras/ErrorReport.aspx?id=406");
            }
        } //Submit

        else
        {
            switch (HF_Type.Value)
            {
            case "prf":
                MatrimonialCoustomerSupportManager.ReportAbuse(HF_ToID.Value, TB_Message.Text, true);
                Response.Redirect("~/Extras/Sucess.aspx");
                break;

            case "ss":
                MatrimonialCoustomerSupportManager.ReportAbuse(HF_ToID.Value, TB_Message.Text, false);
                Response.Redirect("~/Extras/Sucess.aspx");
                break;

            default:
                Response.Redirect("~/Extras/Sucess.aspx?id=Error in url");
                break;
            }
        }
    }
Ejemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            switch (Request.QueryString["id"])
            {
            case "1":
                PN_Settings.Visible  = true;
                PN_CheckAnon.Visible = false;
                PN_NoRecords.Visible = false;
                L_Label.Text         = "FeedBack Filter Settings";
                this.Title           = "FeedBack Filter Settings";
                short shortLifeTime = MatrimonialCoustomerSupportManager.ReadFilter();
                if (shortLifeTime == 0)
                {
                    RB_Filter_Off.Checked = true;
                    RB_Filter_ON.Checked  = false;
                    TB_Lifetime.Enabled   = false;
                }
                else
                {
                    RB_Filter_Off.Checked = false;
                    RB_Filter_ON.Checked  = true;
                    TB_Lifetime.Enabled   = true;
                    TB_Lifetime.Text      = shortLifeTime.ToString();
                }
                break;

            default:
                L_Alert.Visible      = false;
                PN_Settings.Visible  = false;
                PN_CheckAnon.Visible = true;
                L_Label.Text         = "FeedBacks";
                this.Title           = "FeedBacks";
                loadFeedBack();
                break;
            }
        }
        else
        {
            MatrimonialCoustomerSupportManager.SetFeedBackFilter(RB_Filter_ON.Checked, short.Parse(TB_Lifetime.Text));
            L_Alert.Visible = true;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request.QueryString["id"] == "")
            {
                Footer_G1.Visible        = false;
                Footer_M1.Visible        = true;
                GuestLeftPanel1.Visible  = false;
                MemberLeftPanel1.Visible = true;
                Img_Guest.Visible        = false;
                Img_Member.Visible       = true;
                TD_Left.Attributes.Add("bgcolor", "#ffefed");
            }
            else
            {
                TD_Left.Attributes.Add("bgcolor", "#f5f5f5");
            }

            txtCount.Text = TB_Message.MaxLength.ToString();

            //Adding Attributes to Text Box

            TB_Message.Attributes.Add("onKeyUp",
                                      "javascript:document.getElementById('" + txtCount.ClientID +
                                      "').setAttribute('value', (" + TB_Message.MaxLength +
                                      " - parseInt(document.getElementById('" + TB_Message.ClientID +
                                      "').getAttribute('value').length)));");
        }
        else
        {
            MatrimonialCoustomerSupportManager.AddNewFeedBack(TB_Email.Text, TB_Name.Text, TB_Message.Text);
            Table_FeedBack.Visible = false;
            Table_Success.Visible  = true;
        }
    }
Ejemplo n.º 4
0
    private void loadFeedBack()
    {
        DataTable objDataTableProfile = MatrimonialCoustomerSupportManager.ReadFeedBack();

        //>1
        if (objDataTableProfile != null)
        {
            LiteralControl objLiteralControl;
            TableCell      objTableCell;

            DateTime dateTemp;

            //Loading Coloum Contans
            foreach (DataRow objDataRowStory in objDataTableProfile.Rows)
            {
                TableRow objTableRow = new TableRow();
                Table_View.Rows.Add(objTableRow);

                dateTemp = Convert.ToDateTime(objDataRowStory["Date"]);

                //Coloum 1
                objLiteralControl = new LiteralControl(dateTemp.Day.ToString() + ":" + dateTemp.Month.ToString() + ":" + dateTemp.Year.ToString());
                objTableCell      = new TableCell();
                objTableCell.Controls.Add(objLiteralControl);
                objTableRow.Cells.Add(objTableCell);

                //Coloum 2
                objLiteralControl = new LiteralControl(objDataRowStory["Name"].ToString());
                objTableCell      = new TableCell();
                objTableCell.Controls.Add(objLiteralControl);
                objTableRow.Cells.Add(objTableCell);

                //Coloum 3
                //objLiteralControl = new LiteralControl(objDataRowStory["Email"].ToString());
                //objTableCell = new TableCell();
                //objTableCell.Controls.Add(objLiteralControl);
                //objTableRow.Cells.Add(objTableCell);

                HyperLink newHyperLink = new HyperLink();
                newHyperLink.NavigateUrl = "NewsLetters.aspx?id=5&mailto=" + Server.UrlEncode(objDataRowStory["Email"].ToString());
                newHyperLink.Text        = objDataRowStory["Email"].ToString();
                //Coloum 6
                objTableCell = new TableCell();
                objTableCell.Controls.Add(newHyperLink);
                objTableCell.HorizontalAlign = HorizontalAlign.Left;
                objTableCell.VerticalAlign   = VerticalAlign.Middle;
                objTableRow.Cells.Add(objTableCell);

                //Coloum 4
                objLiteralControl = new LiteralControl(objDataRowStory["Message"].ToString());
                objTableCell      = new TableCell();
                objTableCell.Controls.Add(objLiteralControl);
                objTableRow.Cells.Add(objTableCell);


                //// Link To Delete The SStory
                //HyperLink newHyperLink = new HyperLink();
                //newHyperLink.NavigateUrl = "DeleteMembers.aspx?id=" + objDataRowStory["MatrimonialID"].ToString();
                //newHyperLink.ImageUrl = "~/Resources/btnSelect.gif";
                ////Coloum 6
                //objTableCell = new TableCell();
                //objTableCell.Controls.Add(newHyperLink);
                //objTableCell.HorizontalAlign = HorizontalAlign.Center;
                //objTableCell.VerticalAlign = VerticalAlign.Middle;
                //objTableRow.Cells.Add(objTableCell);
            }
        }
    }