Beispiel #1
0
    //saving Mail Settings

    protected void IMB_Mail_save_Click(object sender, ImageClickEventArgs e)
    {
        //loading information from Cookie
        HttpCookieCollection objHttpCookieCollection = Request.Cookies;
        HttpCookie           objHttpCookie           = objHttpCookieCollection.Get("MatCookie5639sb");

        if (MatrimonialMessanger.SetMailingSettings(Crypto.DeCrypto(objHttpCookie.Values["UserName"]), CB_Special.Checked, CB_newProduct.Checked, CB_Partner.Checked, CB_Daly.Checked))
        {
            // If Sucess
            L_S_Updated.Visible = true;
        }
        else  // some error occured
        {
            L_S_Updated.Visible = true;
            L_S_Updated.Text    = "Error in Updation, Sorry Plase try again";
        }
    }
    protected void LB_Next_Click(object sender, EventArgs e)
    {
        HttpCookieCollection objHttpCookieCollection = Request.Cookies;
        HttpCookie           objHttpCookie           = objHttpCookieCollection.Get("MatCookie5639sb");
        string strMatrimonialID = Crypto.DeCrypto(objHttpCookie.Values["MatrimonialID"]);


        //Previous Enabled
        LB_Previous_1.Enabled = true;
        LB_Previous_2.Enabled = true;
        //Getting values
        int intStart = int.Parse(HF_Start.Value);
        int intCount = int.Parse(HF_Count.Value);
        int intCurrent;

        intCurrent = intCount - (intStart + 10);
        //Update Start Pointer
        intStart      += 10;
        HF_Start.Value = (intStart).ToString();
        if (intCurrent < 10)
        {
            LB_Next_1.Enabled = false;
            LB_Next_2.Enabled = false;
            L_Current_1.Text  = (intStart + intCurrent).ToString();
            L_Current_2.Text  = (intStart + intCurrent).ToString();
        }
        else
        {
            L_Current_1.Text = (intStart + 10).ToString();
            L_Current_2.Text = (intStart + 10).ToString();
        }
        //Getting SSList
        if (HF_In_Out.Value == "1")
        {
            LoadList(InternalMessage.MailType.OutBox, MatrimonialMessanger.GetMessageList(intStart, strMatrimonialID, true), intStart, strMatrimonialID);
        }
        else
        {
            LoadList(InternalMessage.MailType.Inbox, MatrimonialMessanger.GetMessageList(intStart, strMatrimonialID, false), intStart, strMatrimonialID);
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            // Adding meta Discription
            HtmlMeta objMeta = new HtmlMeta();
            objMeta.Name    = "Description";
            objMeta.Content = WebConfig.GetValues("MetaDiscription");
            this.Header.Controls.Add(objMeta);

            // Adding meta KeyWords
            objMeta         = new HtmlMeta();
            objMeta.Name    = "keywords";
            objMeta.Content = WebConfig.GetValues("MetaKeword");
            this.Header.Controls.Add(objMeta);

            HttpCookieCollection objHttpCookieCollection = Request.Cookies;
            HttpCookie           objHttpCookie           = objHttpCookieCollection.Get("MatCookie5639sb");

            string strMatrimonialID = Crypto.DeCrypto(objHttpCookie.Values["MatrimonialID"]);

            int intCount = 0;
            if (Request.QueryString["id"] == "2")
            {
                intCount        = MatrimonialMessanger.GetMessageCount(strMatrimonialID, true);
                HF_In_Out.Value = "1";
            }
            else
            {
                intCount        = MatrimonialMessanger.GetMessageCount(strMatrimonialID, false);
                HF_In_Out.Value = "0";
            }
            //Setting Count
            L_Last_2.Text = intCount.ToString();
            L_Last_1.Text = intCount.ToString();
            if (intCount > 0)
            {
                IB_Delete_1.Visible = true;
                IB_Delete_2.Visible = true;
                if (intCount < 10)
                {
                    LB_Next_1.Enabled = false;
                    LB_Next_2.Enabled = false;

                    L_Current_1.Text = intCount.ToString();
                    L_Current_2.Text = intCount.ToString();
                }
                else
                {
                    LB_Next_1.Enabled = true;
                    LB_Next_2.Enabled = true;

                    L_Current_1.Text = "10";
                    L_Current_2.Text = "10";
                }
                HF_Start.Value = "0";
                HF_Count.Value = (intCount).ToString();
                if (Request.QueryString["id"] == "2")
                {
                    LoadList(InternalMessage.MailType.OutBox, MatrimonialMessanger.GetMessageList(0, strMatrimonialID, true), 0, strMatrimonialID);
                }
                else
                {
                    LoadList(InternalMessage.MailType.Inbox, MatrimonialMessanger.GetMessageList(0, strMatrimonialID, false), 0, strMatrimonialID);
                }
            }
            else
            {
                L_Current_1.Text = "0";
                L_Current_2.Text = "0";
            }
        }
    }
Beispiel #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            // Adding meta Discription
            HtmlMeta objMeta = new HtmlMeta();
            objMeta.Name    = "Description";
            objMeta.Content = WebConfig.GetValues("MetaDiscription");
            this.Header.Controls.Add(objMeta);

            // Adding meta KeyWords
            objMeta         = new HtmlMeta();
            objMeta.Name    = "keywords";
            objMeta.Content = WebConfig.GetValues("MetaKeword");
            this.Header.Controls.Add(objMeta);

            //Getting User information from cookie

            HttpCookieCollection objHttpCookieCollection = Request.Cookies;
            HttpCookie           objHttpCookie           = objHttpCookieCollection.Get("MatCookie5639sb");

            // loading Mail settings from data base

            bool[] boolSelectionArray = MatrimonialMessanger.GetMailListSettings(Crypto.DeCrypto(objHttpCookie.Values["UserName"]));

            if (boolSelectionArray != null) // if no error
            {
                //Setting mail Settings
                CB_Special.Checked    = boolSelectionArray[0];
                CB_newProduct.Checked = boolSelectionArray[1];
                CB_Partner.Checked    = boolSelectionArray[2];
                CB_Daly.Checked       = boolSelectionArray[3];

                // Loading paied users services

                string strApplicationID = Crypto.DeCrypto(objHttpCookie.Values["ApplicationID"]);

                if (MatrimonialAlbumManager.IsImageExists(strApplicationID, MatrimonialAlbumManager.ImageType.Horoscope))
                {
                    if (Crypto.DeCrypto(objHttpCookie.Values["UserType"]) == "PaidMember")
                    {
                        TB_Horo_Password.Text     = "";
                        TB_Horoscope_Conform.Text = "";
                        TB_Photo_Password.Text    = "";
                        TB_Photo_Conform.Text     = "";

                        //Load if image in album

                        if (true)//<<<<<<<<<<<<For Testing>>>>>>>>>>>>> get is there any images present in photo - album3
                        {
                            RB_P_Yes.Enabled           = true;
                            TB_Photo_Conform.TextMode  = TextBoxMode.Password;
                            TB_Photo_Password.TextMode = TextBoxMode.Password;
                            IMB_Photo_save.Visible     = true;
                        }

                        // Load if horoscope exists

                        if (MatrimonialAlbumManager.IsImageExists(strApplicationID, MatrimonialAlbumManager.ImageType.Horoscope))
                        {
                            RB_H_yes.Enabled              = true;
                            IMB_Horoscope_save.Visible    = true;
                            TB_Horoscope_Conform.TextMode = TextBoxMode.Password;
                            TB_Horo_Password.TextMode     = TextBoxMode.Password;
                        }
                    }
                }
            }    //boolSelectionArray != null
            else // If Error
            {
                Response.Redirect("../Extras/ErrorReport.aspx");
            }
        }//ispostback
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //Setting UserID

            HF_UaerID.Value = Crypto.DeCrypto(Request.QueryString["key"]);

            if (HF_UaerID.Value == null)
            {
                Response.Redirect("../Extras/ErrorReport.aspx?id=WrongKey");
            }


            //Getting Connection String

            //Connect To database

            //load all the DDLs

            //Loading IndexMotherTongue

            DDL_MotherTongue.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.MotherTongue);
            DDL_MotherTongue.DataTextField  = "Item";
            DDL_MotherTongue.DataValueField = "Value";
            DDL_MotherTongue.DataBind();

            // Loading Religion

            DDL_Religion.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Religion);
            DDL_Religion.DataTextField  = "Item";
            DDL_Religion.DataValueField = "Value";
            DDL_Religion.DataBind();


            // Loading Cast
            DDL_Cast.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Cast);
            DDL_Cast.DataTextField  = "Item";
            DDL_Cast.DataValueField = "Value";
            DDL_Cast.DataBind();


            // Loading Profile Created by
            DDL_ProfieCreated.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.ProfileCreatedBy);
            DDL_ProfieCreated.DataTextField  = "Item";
            DDL_ProfieCreated.DataValueField = "Value";
            DDL_ProfieCreated.DataBind();


            // Loading Reference by

            DDL_Reference.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.ReferenceBy);
            DDL_Reference.DataTextField  = "Item";
            DDL_Reference.DataValueField = "Value";
            DDL_Reference.DataBind();


            // Loading Star

            DDL_Star.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Star);
            DDL_Star.DataTextField  = "Item";
            DDL_Star.DataValueField = "Value";
            DDL_Star.DataBind();


            // Loading MoonSign

            DDL_Moon.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.MoonSign);
            DDL_Moon.DataTextField  = "Item";
            DDL_Moon.DataValueField = "Value";
            DDL_Moon.DataBind();

            DDL_SEqt.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Sequrity);
            DDL_SEqt.DataTextField  = "SequrityQuestion";
            DDL_SEqt.DataValueField = "Value";
            DDL_SEqt.DataBind();


            int intThisYear = DateTime.Now.Year - 18;
            for (int i = 0; i <= 32; ++i)
            {
                DDL_dobYear.Items.Add((intThisYear - i).ToString());
            }
        }
        else
        {
            if (CB_Accept.Checked)
            {
                //save details into data base

                sbyte sbyteFlag = 0;

                //Inserting AccountInformations
                strApplicationID = MatrimonialMemberShip.InsertAccountInfo(HF_UaerID.Value,
                                                                           FormsAuthentication.HashPasswordForStoringInConfigFile(TB_Password.Text, "MD5"), (sbyte)DDL_SEqt.SelectedIndex, TB_Answer.Text);
                //If Inserted
                Response.Write(strApplicationID);
                if (strApplicationID != null)
                {
                    // Basic member Informations
                    DateTime dtDOB;
                    sbyte    sbyteMaritalStatus = 0;
                    string   strPhysicalStatus;
                    string   strChildrenLivingStatus;


                    // Setting Date of birth
                    dtDOB = DateTime.Parse(DDL_dobMonth.SelectedIndex + " " + DDL_dobYear.SelectedIndex + "," + DDL_dobDay.SelectedIndex);


                    // Setting   MaritalStatus
                    if (RB_MS_UM.Checked)
                    {
                        sbyteMaritalStatus = 1;
                    }
                    else if (RB_MS_Div.Checked)
                    {
                        sbyteMaritalStatus = 2;
                    }
                    else if (RB_MS_Sep.Checked)
                    {
                        sbyteMaritalStatus = 3;
                    }
                    else if (RB_MS_WW.Checked)
                    {
                        sbyteMaritalStatus = 4;
                    }

                    //Setting NoOfChildren

                    if (RB_phy_nor.Checked)
                    {
                        strPhysicalStatus = true.ToString();
                    }
                    else if (RB_phy_Dis.Checked)
                    {
                        strPhysicalStatus = false.ToString();
                    }
                    else
                    {
                        strPhysicalStatus = null;
                    }

                    // setting Children Living With

                    if (RB_CH_LWM.Checked)
                    {
                        strChildrenLivingStatus = true.ToString();
                    }
                    else if (RB_CH_NWM.Checked)
                    {
                        strChildrenLivingStatus = false.ToString();
                    }
                    else
                    {
                        strChildrenLivingStatus = null;
                    }

                    //Inserting Basic Informations
                    sbyteFlag = MatrimonialProfileManager.InsertBasicInfo(strApplicationID,
                                                                          TB_Name.Text, RB_Male.Checked, dtDOB,
                                                                          (sbyte)DDL_MotherTongue.SelectedIndex,
                                                                          (sbyte)DDL_ProfieCreated.SelectedIndex,
                                                                          (sbyte)DDL_Cast.SelectedIndex, sbyteMaritalStatus,
                                                                          (sbyte)DDL_Religion.SelectedIndex,
                                                                          (sbyte)DDL_NoOfChildren.SelectedIndex,
                                                                          strPhysicalStatus, strChildrenLivingStatus,
                                                                          TB_SubCast.Text);

                    // SociaReligious member Informations

                    sbyte  sbyteHoroscopeMatch = 0;
                    string strTimeOfBirth      = null;
                    sbyte  sbyteManglik        = 0;

                    if (RB_Horoscope_NO.Checked)
                    {
                        sbyteHoroscopeMatch = 1;
                    }
                    else if (RB_Horoscope_Yes.Checked)
                    {
                        sbyteHoroscopeMatch = 2;
                    }
                    else if (RB_Horoscope_NoMatters.Checked)
                    {
                        sbyteHoroscopeMatch = 3;
                    }


                    if (RB_Manglik_No.Checked)
                    {
                        sbyteManglik = 1;
                    }
                    else if (RB_Manglik_Yes.Checked)
                    {
                        sbyteManglik = 2;
                    }
                    else if (RB_Manglik_DKnow.Checked)
                    {
                        sbyteManglik = 3;
                    }
                    else if (RB_Manglik_NA.Checked)
                    {
                        sbyteManglik = 4;
                    }

                    if ((TB_Time_H.Text != null) && (TB_Time_M.Text != null))
                    {
                        strTimeOfBirth = TB_Time_H.Text + ":" + TB_Time_M.Text + " " + DDL_Time.SelectedValue;
                    }

                    //Inserting SociaReligious Informations
                    sbyteFlag += MatrimonialProfileManager.InsertSocioReligiousInfo(strApplicationID, (sbyte)DDL_Star.SelectedIndex,
                                                                                    (sbyte)DDL_Moon.SelectedIndex, sbyteHoroscopeMatch, TB_POB.Text, strTimeOfBirth, sbyteManglik);

                    sbyteFlag += MatrimonialMessanger.SetMailingSettings(HF_UaerID.Value);
                }
                else
                {
                    Response.Redirect("../Extras/ErrorReport.aspx");
                }

                if (sbyteFlag == 3)
                {
                    MatrimonialMemberShip.UpdateIndex(strApplicationID);
                    HttpCookie objHttpCookie = new HttpCookie("MatRegInfo");
                    objHttpCookie.Values["ApplicationID"] = Crypto.EnCrypto(strApplicationID);
                    objHttpCookie.Expires = DateTime.MaxValue; //<<<<<<<<<<<<<< ForTesting >>>>>>>>>>>
                    Response.Cookies.Add(objHttpCookie);

                    Server.Transfer("RegistrationStep2.aspx");
                }
                else
                {
                    Response.Write(strApplicationID);
                    //Response.Redirect("../Extras/ErrorReport.aspx");<< ForTesting >>
                }
            }
            else
            {
                LabelDisplay.Visible = true;
                LabelDisplay.Text    = "You Need to accept terms and conditions";
            }
        }
    }