//Browsing the last
    protected void LB_Previous_Click(object sender, EventArgs e)
    {
        HttpCookieCollection objHttpCookieCollection = Request.Cookies;
        HttpCookie           objHttpCookie           = objHttpCookieCollection.Get("MatCookie5639sb");
        string strMatrimonialID = Crypto.DeCrypto(objHttpCookie.Values["MatrimonialID"]);

        LB_Next_1.Enabled = true;
        LB_Next_2.Enabled = true;

        //Getting values
        int intStart = int.Parse(HF_Start.Value);
        int intCount = int.Parse(HF_Count.Value);

        intStart -= 10;
        // End of record?
        if (intStart < 10)
        {
            LB_Previous_1.Enabled = false;
            LB_Previous_2.Enabled = false;
        }
        //Update Start Pointer
        HF_Start.Value = (intStart).ToString();
        //Getting SSList

        LoadList(MatrimonialProfileManager.GetBookMarkList(intStart, strMatrimonialID));
    }
Example #2
0
 protected void B_App_Click(object sender, EventArgs e)
 {
     if (RB_MemberPlan1.Checked)
     {
         MatrimonialProfileManager.InsertPaidMember(HF_ID.Value, 1);
         L_Report_1.Text    = "Added to Paid Member";
         L_Report_1.Visible = true;
         B_App.Visible      = false;
         B_Renew.Visible    = false;
     }
     else if (RB_MemberPlan2.Checked)
     {
         MatrimonialProfileManager.InsertPaidMember(HF_ID.Value, 2);
         L_Report_1.Text    = "Membership Renewed";
         L_Report_1.Visible = true;
         B_App.Visible      = false;
         B_Renew.Visible    = false;
     }
     else if (RB_MemberPlan3.Checked)
     {
         MatrimonialProfileManager.InsertPaidMember(HF_ID.Value, 3);
         L_Report_1.Text    = "Membership Renewed";
         L_Report_1.Visible = true;
         B_App.Visible      = false;
         B_Renew.Visible    = false;
     }
     else
     {
         // For Testing
     }
 }
Example #3
0
    protected void IMG_AddLink_Click(object sender, ImageClickEventArgs e)
    {
        //Add BookMark Into List
        //Getting User Informations
        HttpCookieCollection objHttpCookieCollection = Request.Cookies;
        HttpCookie           objHttpCookie           = objHttpCookieCollection.Get("MatCookie5639sb");
        string strMatID = Crypto.DeCrypto(objHttpCookie.Values["MatrimonialID"]);

        switch (HF_Type.Value)
        {
        case "1":
            MatrimonialProfileManager.BookMark(strMatID, HF_ID.Value, false);
            IMG_AddLink.Visible = false;
            IMG_Label.Visible   = true;
            break;

        case "2":
            MatrimonialProfileManager.BookMark(strMatID, HF_ID.Value, true);
            IMG_AddLink.Visible = false;
            IMG_Label.Visible   = true;
            break;

        default:
            break;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            HttpCookieCollection objHttpCookieCollection = Request.Cookies;
            HttpCookie           objHttpCookie2          = objHttpCookieCollection.Get("MatCookie5639sb");

            string strMtaID = Crypto.DeCrypto(objHttpCookie2.Values["MatrimonialID"]);

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

            sbyte PlanID = sbyte.Parse(Crypto.DeCrypto(objHttpCookie.Values["PLanID"]));

            if (Crypto.DeCrypto(objHttpCookie2.Values["UserType"]).ToLower() != "paidmember")
            {
                MatrimonialProfileManager.InsertPaidMember(strMtaID, PlanID);
            }
            else
            {
                MatrimonialMemberShip.RenewPaidMembership(strMtaID, PlanID);
            }
            Response.Redirect("~/Member/Membership.aspx");
        }
        catch (Exception)
        { }
    }
    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 = MatrimonialProfileManager.GetBookMarkCount(strMatrimonialID);

            if (intCount > 0)
            {
                if (intCount < 10)
                {
                    LB_Next_1.Enabled = false;
                    LB_Next_2.Enabled = false;
                }
                HF_Start.Value = "0";
                HF_Count.Value = (intCount).ToString();

                LoadList(MatrimonialProfileManager.GetBookMarkList(0, 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);
            //---------------------------------------------------------------------------------------------------
            /// Text Counter Initiallisation
            //---------------------------------------------------------------------------------------------------
            txtCount.Text = TB_AboutME.MaxLength.ToString();
            //---------------------------------------------------------------------------------------------------
            TB_AboutME.Attributes.Add("onKeyUp",
                                      "javascript:document.getElementById('" + txtCount.ClientID +
                                      "').setAttribute('value', (" + TB_AboutME.MaxLength +
                                      " - parseInt(document.getElementById('" + TB_AboutME.ClientID +
                                      "').getAttribute('value').length)));");
            //---------------------------------------------------------------------------------------------------
            //Loading Controls
            //Connect To database
            //---------------------------------------------------------------------------------------------------
            DDL_FamilyStatus.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.FamilyStatus);
            DDL_FamilyStatus.DataTextField  = "Item";
            DDL_FamilyStatus.DataValueField = "Value";
            DDL_FamilyStatus.DataBind();
            //---------------------------------------------------------------------------------------------------
            DDL_FamilyType.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Familytype);
            DDL_FamilyType.DataTextField  = "Item";
            DDL_FamilyType.DataValueField = "Value";
            DDL_FamilyType.DataBind();
            //---------------------------------------------------------------------------------------------------
            DDL_FamilyValues.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.FamilyValue);
            DDL_FamilyValues.DataTextField  = "Item";
            DDL_FamilyValues.DataValueField = "Value";
            DDL_FamilyValues.DataBind();
            //---------------------------------------------------------------------------------------------------
            LB_Hobbies.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Hobbies);
            LB_Hobbies.DataTextField  = "Item";
            LB_Hobbies.DataValueField = "Value";
            LB_Hobbies.DataBind();
            LB_Hobbies.Items.RemoveAt(0);
            //---------------------------------------------------------------------------------------------------
            LB_Interests.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Interests);
            LB_Interests.DataTextField  = "Item";
            LB_Interests.DataValueField = "Value";
            LB_Interests.DataBind();
            LB_Interests.Items.RemoveAt(0);
            //---------------------------------------------------------------------------------------------------
            //Loading Member Informations
            HttpCookieCollection objHttpCookieCollection = Request.Cookies;
            HttpCookie           objHttpCookie           = objHttpCookieCollection.Get("MatCookie5639sb");
            //---------------------------------------------------------------------------------------------------
            string strApplicationID = Crypto.DeCrypto(objHttpCookie.Values["ApplicationID"]);
            //---------------------------------------------------------------------------------------------------
            MatMember objMember = new MatMember(true, strApplicationID, false, false, false, false, false, false, true, true, true, false);
            //---------------------------------------------------------------------------------------------------
            TB_AboutME.Text       = objMember.AboutMe;
            TB_FamilyDetails.Text = objMember.FamilyDetails;
            TB_familyOrigin.Text  = objMember.FamilyOrigin;
            TB_Father_Occ.Text    = objMember.FatherOccupation;
            TB_Mother_Occ.Text    = objMember.MotherOccupation;
            //---------------------------------------------------------------------------------------------------
            L_FatherName.Text  = objMember.FathersName;
            L_MotherName.Text  = objMember.MothersName;
            L_NoOfBrother.Text = objMember.NoOfBrothers.ToString();
            //---------------------------------------------------------------------------------------------------
            DDL_FamilyStatus.SelectedIndex = objMember.FamilyStatus;
            DDL_FamilyType.SelectedIndex   = objMember.FamilyType;
            DDL_FamilyValues.SelectedIndex = objMember.FamilyValues;
            //---------------------------------------------------------------------------------------------------
            if (objMember.FatherAlive)
            {
                RB_Father_Alive.Checked = true;
            }
            else
            {
                RB_Father_NAlive.Checked = true;
            }

            if (objMember.MotherAlive)
            {
                RB_Mother_Alive.Checked = true;
            }
            else
            {
                RB_Mother_NAlive.Checked = true;
            }
            //---------------------------------------------------------------------------------------------------
            if (objMember.NoOfBrothers != 6)
            {
                if (objMember.NoOfBrothers == objMember.BrothersMarried)
                {
                    L_BMarried.Visible = true;
                    L_BMarried.Text    = objMember.NoOfBrothers.ToString();
                    L_NoOfBrother.Text = objMember.NoOfBrothers.ToString();
                    DDL_NoOfBrothersMarried.Visible = false;
                }
                else
                {
                    L_NoOfBrother.Text = objMember.NoOfBrothers.ToString();
                    DDL_NoOfBrothersMarried.SelectedIndex = objMember.BrothersMarried;
                }
            }
            else
            {
                L_NoOfBrother.Text = "Nill";
                L_BMarried.Visible = true;
                DDL_NoOfBrothersMarried.Visible = false;
                L_BMarried.Text = "Not Applicable";
            }
            //---------------------------------------------------------------------------------------------------
            if (objMember.NoOfSisters != 6)
            {
                if (objMember.NoOfSisters == objMember.SistersMarried)
                {
                    L_SMarried.Visible             = true;
                    L_SMarried.Text                = objMember.NoOfSisters.ToString();
                    L_NoOfSister.Text              = objMember.NoOfSisters.ToString();
                    DDL_NoOFSistersMarried.Visible = false;
                }
                else
                {
                    L_NoOfSister.Text = objMember.NoOfSisters.ToString();
                    DDL_NoOFSistersMarried.SelectedIndex = objMember.SistersMarried;
                }
            }
            else
            {
                L_NoOfSister.Text              = "Nill";
                L_SMarried.Visible             = true;
                DDL_NoOFSistersMarried.Visible = false;
                L_SMarried.Text = "Not Applicable";
            }
            //---------------------------------------------------------------------------------------------------
            string[] strAHobbies = objMember.HobbiesList.Split('%');
            int      i;
            if (strAHobbies[0].Length != 0)
            {
                foreach (string index in strAHobbies)
                {
                    i = int.Parse(index);
                    LB_Hobbies.Items[i - 1].Selected = true;
                }
            }
            //---------------------------------------------------------------------------------------------------
            string[] strAIntrests = objMember.IntrestList.Split('%');
            if (strAIntrests[0].Length != 0)
            {
                foreach (string index in strAIntrests)
                {
                    i = int.Parse(index);
                    LB_Interests.Items[i - 1].Selected = true;
                }
            }
            //---------------------------------------------------------------------------------------------------
            TB_OtherHobbies.Text   = objMember.OtherHobbies;
            TB_OtherInterests.Text = objMember.OtherIntrests;
            //---------------------------------------------------------------------------------------------------
            objMember = null;
        }    //if!postback
        //---------------------------------------------------------------------------------------------------
        else // postback
        //---------------------------------------------------------------------------------------------------
        {
            sbyte sbyteBrotherToMarry;
            sbyte sbyteSisterToMarry;

            sbyte sbyteFlage = 0;
            //try
            //{
            HttpCookieCollection objHttpCookieCollection = Request.Cookies;
            HttpCookie           objHttpCookie           = objHttpCookieCollection.Get("MatCookie5639sb");

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

            if (strApplicationID != null)
            {
                //Updating About Me
                //---------------------------------------------------------------------------------------------------
                sbyteFlage = MatrimonialProfileManager.UpdateAboutMe(strApplicationID, TB_AboutME.Text);
                //---------------------------------------------------------------------------------------------------
                // Setting data for Family Informations

                if (DDL_NoOfBrothersMarried.SelectedIndex != 0)
                {
                    sbyteBrotherToMarry = (sbyte)DDL_NoOfBrothersMarried.SelectedIndex;
                }
                else
                {
                    sbyteBrotherToMarry = sbyte.Parse(L_BMarried.Text);
                }

                if (DDL_NoOFSistersMarried.SelectedIndex != 0)
                {
                    sbyteSisterToMarry = (sbyte)DDL_NoOFSistersMarried.SelectedIndex;
                }
                else
                {
                    sbyteSisterToMarry = sbyte.Parse(L_SMarried.Text);
                }

                //Updating Family Informations
                //---------------------------------------------------------------------------------------------------
                sbyteFlage += MatrimonialProfileManager.UpdateFamilyInfo(strApplicationID, TB_FamilyDetails.Text, (sbyte)DDL_FamilyValues.SelectedIndex,
                                                                         (sbyte)DDL_FamilyType.SelectedIndex, (sbyte)DDL_FamilyStatus.SelectedIndex, TB_familyOrigin.Text,
                                                                         sbyteBrotherToMarry, sbyteSisterToMarry, RB_Father_Alive.Checked, RB_Mother_Alive.Checked,
                                                                         TB_Father_Occ.Text, TB_Mother_Occ.Text);
                //---------------------------------------------------------------------------------------------------
                string strHobbiesList = "";
                string Flag           = "";
                foreach (ListItem objListItem in LB_Hobbies.Items)
                {
                    if (objListItem.Selected)
                    {
                        strHobbiesList += Flag + objListItem.Value;
                        Flag            = "%";
                    }
                }
                Flag = "";
                //Intrests
                string strInterestList = "";
                foreach (ListItem objListItem in LB_Interests.Items)
                {
                    if (objListItem.Selected)
                    {
                        strInterestList += Flag + objListItem.Value;
                        Flag             = "%";
                    }
                }
                //---------------------------------------------------------------------------------------------------
                //Inserting Into Database
                sbyteFlage += MatrimonialProfileManager.InsertHobiesNInterests(strApplicationID, strHobbiesList, TB_OtherHobbies.Text, strInterestList, TB_OtherInterests.Text);

                //---------------------------------------------------------------------------------------------------
                if (sbyteFlage == 3)
                {
                    Response.Redirect("EditProfile-S4.aspx");
                }
                else
                {
                    Response.Redirect("../Extras/ErrorReport.aspx");
                }
            }
            else
            {
                Response.Redirect("../Extras/ErrorReport.aspx");
            }
            //}
            //catch (Exception)
            //{ }
            //---------------------------------------------------------------------------------------------------
        }
    }
    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);

            bool boolItsMe = false;// Used To Check Am i viewing my profile

            // Which Profile Should Be displaed

            // Is By URl
            strMatID   = Request.QueryString["matid"];
            IsBookMark = true;
            if (strMatID == null)
            {
                try
                {
                    //Information Form Cookie
                    HttpCookieCollection objHttpCookieCollection = Request.Cookies;
                    HttpCookie           objHttpCookie           = objHttpCookieCollection.Get("MatCookie5639sb");
                    strMatID = Crypto.DeCrypto(objHttpCookie.Values["MatrimonialID"]);

                    // User is watching his own profile
                    boolItsMe  = true;
                    IsBookMark = false;
                }
                catch (Exception)//Oops Some Error
                {
                    Server.Transfer("../Extras/ErrorReports.aspx?id=Cookie");
                }
            }

            //Setting Title
            this.Title = WebConfig.GetValues("fname") + " Profile No : " + strMatID.ToUpper();


            string strAppID = MatrimonialMemberShip.GetApplicationID(strMatID);

            if (strAppID != null)
            {
                //<< Desabled some features ForTesting>>>>>
                MatMember objMember = new MatMember(strMatID, true, true, true, true, true, true, true, true, true, true);


                // Setting Infromations

                // Primari Informations

                L_MID.Text = objMember.MatrimonialID.ToUpper();;
                if (objMember.Gender)
                {
                    L_Sex.Text = "Male";
                }
                else
                {
                    L_Sex.Text = "Female";
                }

                L_MS.Text         = ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.MaritalStatus, objMember.MaritialStatus);
                L_Created_by.Text = ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.ProfileCreatedBy, objMember.CreatedBy);
                L_Location.Text   = objMember.ResidenceCity;
                L_LogIn_last.Text = objMember.LastLogInDate;

                // Setting Printer
                HL_Print.NavigateUrl = "../Member/PrintProfile.aspx?id=" + strMatID;
                HL_Print.Attributes.Add("target", "_blank");


                // Dont Display Name for Non Paid Members
                if (!boolItsMe)
                {
                    //View Horoscope

                    try
                    {
                        //Information Form Cookie
                        HttpCookieCollection objHttpCookieCollection = Request.Cookies;
                        HttpCookie           objHttpCookie           = objHttpCookieCollection.Get("MatCookie5639sb");
                        string strMyMatriMon = Crypto.DeCrypto(objHttpCookie.Values["MatrimonialID"]);

                        //Is it my profile
                        if (strMyMatriMon.ToLower() != strMatID.ToLower())
                        {
                            HL_Abuse.Enabled = true;
                            HL_Abuse.Attributes.Add("onclick", "displayDiv5();");
                            HL_Abuse.NavigateUrl = "#";

                            //Express intrests
                            HL_Exp_Int.Enabled = true;
                            HL_Exp_Int.Attributes.Add("onclick", "displayDiv1();");
                            HL_Exp_Int.NavigateUrl = "#";

                            // Is Photo Protected?
                            if (MatrimonialAlbumManager.IsImageProtected(objMember.ApplicationID, MatrimonialAlbumManager.ImageType.Photo))
                            {
                                HL_Photo.ImageUrl = "~/Resources/photoLocked.gif";
                                //Request Photo PAssword
                                HL_RequestPassword_P.Enabled = true;
                                HL_RequestPassword_P.Attributes.Add("onclick", "displayDiv3();");
                                HL_RequestPassword_P.NavigateUrl = "#";
                            }
                            else
                            {
                                LoadPhoto();
                            }

                            //Is Horoscope Protected
                            if (MatrimonialAlbumManager.IsImageProtected(strAppID, MatrimonialAlbumManager.ImageType.Horoscope))
                            {
                                HL_RequestPassword_H.Enabled = true;
                                HL_RequestPassword_H.Attributes.Add("onclick", "displayDiv4();");
                                HL_RequestPassword_H.NavigateUrl = "#";
                            }
                            else
                            {
                                LoadHoro();
                            }

                            //Adding Into Visitors group
                            MatrimonialProfileManager.UpdateVisiters(strMatID, strMyMatriMon);

                            //Does a paidmember
                            if (Crypto.DeCrypto(objHttpCookie.Values["UserType"]) == "PaidMember")
                            {
                                LoadPhoto();
                                isPaidMember = true;

                                L_Name.Text          = objMember.Name;
                                L_Name.Visible       = true;
                                L_L_Name.Visible     = true;
                                L_MemberName.Visible = true;
                                L_MemberName.Text    = objMember.Name;
                                Img_Name.Visible     = true;

                                // Setting Contact Detaisl Visible
                                PN_Contact.Visible = true;
                                L_Address.Text     = objMember.Address;
                                L_Phone.Text       = objMember.ISDCode.ToString() + "-" + objMember.AreaCode.ToString() + "-" + objMember.PhoneNo.ToString();
                                L_Cell.Text        = objMember.MobileNO.ToString();

                                //Displaying Message Pannel
                                HL_SendMessage.Enabled = true;
                                HL_SendMessage.Attributes.Add("onclick", "displayDiv2();");
                                HL_SendMessage.NavigateUrl = "#";
                            }
                        }
                        else // Oops Its Me
                        {
                            boolItsMe  = true;
                            IsBookMark = false;

                            L_Name.Text          = objMember.Name;
                            L_Name.Visible       = false;
                            L_L_Name.Visible     = true;
                            L_MemberName.Visible = true;
                            L_MemberName.Text    = objMember.Name;
                            Img_Name.Visible     = true;
                            // Setting Image Visible
                            LoadPhoto();
                            //Setting Horosetting Visible
                            LoadHoro();

                            // Setting Name Visble
                            L_Name.Text          = objMember.Name;
                            L_Name.Visible       = true;
                            L_L_Name.Visible     = true;
                            L_MemberName.Visible = true;
                            L_MemberName.Text    = objMember.Name;

                            // Setting Contact Detaisl Visible
                            PN_Contact.Visible = true;
                            L_Address.Text     = objMember.Address;
                            L_Phone.Text       = objMember.ISDCode.ToString() + "-" + objMember.AreaCode.ToString() + "-" + objMember.PhoneNo.ToString();
                            L_Cell.Text        = objMember.MobileNO.ToString();
                        }
                    }
                    catch (Exception) { }
                }
                else //Its Me
                {
                    // Setting Image Visible
                    LoadPhoto();
                    //Setting Horosetting Visible
                    LoadHoro();

                    // Setting Name Visble
                    L_Name.Text          = objMember.Name;
                    L_Name.Visible       = true;
                    L_L_Name.Visible     = true;
                    L_MemberName.Visible = true;
                    L_MemberName.Text    = objMember.Name;

                    // Setting Contact Detaisl Visible
                    PN_Contact.Visible = true;
                    L_Address.Text     = objMember.Address;
                    L_Phone.Text       = objMember.ISDCode.ToString() + "-" + objMember.AreaCode.ToString() + "-" + objMember.PhoneNo.ToString();
                    L_Cell.Text        = objMember.MobileNO.ToString();
                }



                //Fill Contact Details

                //Primary Informations

                L_Age.Text        = AgeCalculator(objMember.DOB).ToString();
                L_Height.Text     = objMember.Height.ToString() + " Cm";
                L_Weight.Text     = objMember.Weight.ToString() + " Kg";
                L_BodyType.Text   = "ForTexting";// ControlDataLoader.GetIndexValue("ForTexting");
                L_Complexion.Text = ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.Complexion, objMember.Complexion);
                L_BloodGroup.Text = ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.BloodGroup, objMember.BloodGroup);
                L_MTongue.Text    = ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.MotherTongue, objMember.MotherTongue);

                if (objMember.PhysicalStatus)
                {
                    L_PhyStatus.Text = "Normal";
                }
                else
                {
                    L_PhyStatus.Text = "Disabled";
                }

                //SocioReligious

                L_Religion.Text  = ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.Religion, objMember.Religion);
                L_Cast.Text      = ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.Cast, objMember.Cast);
                L_Subcast.Text   = objMember.Subcast;
                L_Star.Text      = ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.Star, objMember.Star);
                L_MoonSign.Text  = ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.MoonSign, objMember.MoonSign);
                L_HoroScope.Text = ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.HoroManglic, objMember.HoroMatch);
                L_CHova.Text     = ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.HoroManglic, objMember.Manglik);
                L_SHab.Text      = ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.SmokeNDrink, objMember.Smoke);
                L_DHa.Text       = ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.SmokeNDrink, objMember.Drink);
                L_EHab.Text      = ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.Diet, objMember.Diet);

                //Locations

                L_Citizen.Text       = ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.Country, objMember.Country);
                L_CountryLiving.Text = ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.Country, objMember.Residence);
                L_RState.Text        = ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.State, objMember.State);
                L_City.Text          = objMember.City;
                L_RCity.Text         = objMember.ResidenceCity;
                L_RSTatus.Text       = ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.ResidenceStatus, objMember.ResidenceType);

                //Education

                L_Edu.Text    = ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.Education, objMember.Education);
                L_Edu_De.Text = ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.EduDetails, objMember.EduDetails);
                L_Empl.Text   = ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.EmployedIn, objMember.EmployedIn);
                L_Occ.Text    = ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.Occupation, objMember.Occupation);
                L_AnIC.Text   = ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.AnnualIncomeRange, objMember.AnualIncome);
                if (objMember.AnualIncome != 0)
                {
                    L_AnuIn.Text = ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.Currency, objMember.IncomeIn);
                }
                //Family Details

                L_FDetails.Text = objMember.FamilyDetails;
                L_Father.Text   = objMember.FathersName;
                if (!objMember.FatherAlive)
                {
                    L_FIsLive.Text = "Not Alive";
                }

                L_FOcc.Text = objMember.FatherOccupation;

                L_Mother.Text = objMember.MothersName;
                if (!objMember.MotherAlive)
                {
                    L_MIsLive.Text = "Not Alive";
                }
                L_MOcc.Text     = objMember.MotherOccupation;
                L_Brother.Text  = objMember.NoOfBrothers.ToString();
                L_BMarried.Text = objMember.BrothersMarried.ToString();
                L_Sister.Text   = objMember.NoOfSisters.ToString();
                L_SMarried.Text = objMember.SistersMarried.ToString();

                L_FamilyOrigin.Text = objMember.FamilyOrigin;
                L_FamilyStatus.Text = ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.FamilyStatus, objMember.FamilyStatus);
                L_FamilyType.Text   = ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.Familytype, objMember.FamilyType);
                L_FamilyValues.Text = ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.FamilyValue, objMember.FamilyValues);

                // Hobbiesa and Intrests
                //---------------------------------------------------------------------------------------------------
                string[] strARRAY = objMember.HobbiesList.Split('%');
                int      i;
                string   FlagX = "";
                if (strARRAY[0].Length != 0)
                {
                    foreach (string index in strARRAY)
                    {
                        i = int.Parse(index);
                        L_Hobbies.Text += FlagX + ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.Hobbies, i);
                        FlagX           = ", ";
                    }
                }
                L_Hobbies.Text += FlagX + objMember.OtherHobbies;
                //---------------------------------------------------------------------------------------------------
                strARRAY = objMember.IntrestList.Split('%');

                if (strARRAY[0].Length != 0)
                {
                    FlagX = "";
                    foreach (string index in strARRAY)
                    {
                        i = int.Parse(index);
                        L_Intrests.Text += FlagX + ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.Interests, i);
                        FlagX            = ", ";
                    }
                }
                L_Intrests.Text += FlagX + objMember.OtherIntrests;
                //---------------------------------------------------------------------------------------------------

                strARRAY = objMember.PP_LookingFor.Split('%');
                if (strARRAY[0].Length != 0)
                {
                    FlagX = "";
                    foreach (string index in strARRAY)
                    {
                        i = int.Parse(index);
                        L_PP_LookingFor.Text += FlagX + ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.MaritalStatus, i);
                        FlagX = ", ";
                    }
                }
                //---------------------------------------------------------------------------------------------------
                L_PP_Age_min.Text = objMember.PP_AgeMin.ToString();
                L_PP_Age_max.Text = objMember.PP_AgeMax.ToString();
                //---------------------------------------------------------------------------------------------------
                strARRAY = objMember.PP_Complexion.Split('%');
                if (strARRAY[0].Length != 0)
                {
                    FlagX = "";
                    foreach (string index in strARRAY)
                    {
                        i = int.Parse(index);
                        L_PP_Complexion.Text += FlagX + ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.Complexion, i);
                        FlagX = ", ";
                    }
                }
                //---------------------------------------------------------------------------------------------------
                switch (objMember.PP_HaveChildren)
                {
                case 1:
                    L_PP_Have_Children.Text = "Doesn't matter";
                    break;

                case 2: L_PP_Have_Children.Text = "NO";

                    break;

                case 3: L_PP_Have_Children.Text = "Yes.Living Together";

                    break;

                case 4: L_PP_Have_Children.Text = "Yes.Not Living Together";

                    break;
                }
                //---------------------------------------------------------------------------------------------------
                L_PP_Height_Min.Text = objMember.PP_HeightMin.ToString();
                L_PP_Height_MAx.Text = objMember.PP_HeightMax.ToString();
                //---------------------------------------------------------------------------------------------------
                switch (objMember.PP_PhysicalStatus)
                {
                case 1: L_PP_PhysicalStatus.Text = "Normal";
                    break;

                case 2: L_PP_PhysicalStatus.Text = "Disabled";
                    break;

                case 3: L_PP_PhysicalStatus.Text = "Doesn't matter";
                    break;
                }
                //---------------------------------------------------------------------------------------------------
                strARRAY = objMember.PP_MotherTongue.Split('%');

                if (strARRAY[0].Length != 0)
                {
                    FlagX = "";
                    foreach (string index in strARRAY)
                    {
                        i = int.Parse(index);
                        L_PP_MotherTongue.Text += FlagX + ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.MotherTongue, i);
                        FlagX = ", ";
                    }
                }
                //---------------------------------------------------------------------------------------------------
                if (objMember.PP_Religion.IndexOf("##") >= 0)
                {
                    L_PP_Religion.Text = "Any";
                }
                else
                {
                    strARRAY = objMember.PP_Religion.Split('%');
                    if (strARRAY[0].Length != 0)
                    {
                        FlagX = "";
                        foreach (string index in strARRAY)
                        {
                            i = int.Parse(index);
                            L_PP_Religion.Text += FlagX + ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.Religion, i);
                            FlagX = ", ";
                        }
                    }
                    else
                    {
                        L_PP_Religion.Text = "Any";
                    }
                }
                //---------------------------------------------------------------------------------------------------
                if (objMember.PP_Caste.IndexOf("##") >= 0)
                {
                    L_PP_Caste_Division.Text = "Any";
                }
                else
                {
                    strARRAY = objMember.PP_Caste.Split('%');
                    if (strARRAY[0].Length != 0)
                    {
                        FlagX = "";
                        foreach (string index in strARRAY)
                        {
                            i = int.Parse(index);
                            L_PP_Caste_Division.Text += FlagX + ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.Cast, i);
                            FlagX = ", ";
                        }
                    }
                    else
                    {
                        L_PP_Caste_Division.Text = "Any";
                    }
                }
                //---------------------------------------------------------------------------------------------------
                if (objMember.PP_Manglik != 0)
                {
                    L_PP_ChovvaDosham.Text = ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.HoroManglic, objMember.PP_Manglik);
                }
                else
                {
                    L_PP_ChovvaDosham.Text = " - ";
                }
                if (objMember.Diet != 0)
                {
                    L_PP_EatingHabits.Text = ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.Diet, objMember.Diet);
                }
                else
                {
                    L_PP_EatingHabits.Text = " - ";
                }
                //---------------------------------------------------------------------------------------------------
                if (objMember.PP_Education.IndexOf("##") >= 0)
                {
                    L_PP_Education.Text = "Any";
                }
                else
                {
                    strARRAY = objMember.PP_Education.Split('%');
                    if (strARRAY[0].Length != 0)
                    {
                        FlagX = "";
                        foreach (string index in strARRAY)
                        {
                            i = int.Parse(index);
                            L_PP_Education.Text += FlagX + ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.Education, i);
                            FlagX = ", ";
                        }
                    }
                    else
                    {
                        L_PP_Education.Text = "Any";
                    }
                }
                //---------------------------------------------------------------------------------------------------
                if (objMember.PP_EducationDetails.IndexOf("##") >= 0)
                {
                    L_PP_EduDetails.Text = "Any";
                }
                else
                {
                    strARRAY = objMember.PP_EducationDetails.Split('%');
                    if (strARRAY[0].Length != 0)
                    {
                        FlagX = "";
                        foreach (string index in strARRAY)
                        {
                            i = int.Parse(index);
                            L_PP_EduDetails.Text += FlagX + ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.EduDetails, i);
                            FlagX = ", ";
                        }
                    }
                    else
                    {
                        L_PP_EduDetails.Text = "Any";
                    }
                }
                //---------------------------------------------------------------------------------------------------
                if (objMember.PP_AnnualIncome != 0)
                {
                    L_PP_Annualincome.Text = ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.AnnualIncomeRange, objMember.PP_AnnualIncome);
                }
                else
                {
                    L_PP_Annualincome.Text = " - ";
                }
                //---------------------------------------------------------------------------------------------------
                if (objMember.PP_Occupation.IndexOf("##") >= 0)
                {
                    L_PP_Occupation.Text = "Any";
                }
                else
                {
                    strARRAY = objMember.PP_Occupation.Split('%');
                    if (strARRAY[0].Length != 0)
                    {
                        foreach (string index in strARRAY)
                        {
                            FlagX = "";
                            i     = int.Parse(index);
                            L_PP_Occupation.Text += FlagX + ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.Occupation, i);
                            FlagX = ", ";
                        }
                    }
                    else
                    {
                        L_PP_Occupation.Text = "Any";
                    }
                }
                //---------------------------------------------------------------------------------------------------
                if (objMember.PP_Citizenship.IndexOf("##") >= 0)
                {
                    L_PP_Citizenship.Text = "Any";
                }
                else
                {
                    strARRAY = objMember.PP_Citizenship.Split('%');
                    if (strARRAY[0].Length != 0)
                    {
                        FlagX = "";
                        foreach (string index in strARRAY)
                        {
                            i = int.Parse(index);
                            L_PP_Citizenship.Text += FlagX + ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.Country, i);
                            FlagX = ", ";
                        }
                    }
                    else
                    {
                        L_PP_Citizenship.Text = "Any";
                    }
                }
                //---------------------------------------------------------------------------------------------------
                if (objMember.PP_LivingIn.IndexOf("##") >= 0)
                {
                    L_PP_LivingIN.Text = "Any";
                }
                else
                {
                    strARRAY = objMember.PP_LivingIn.Split('%');
                    if (strARRAY[0].Length != 0)
                    {
                        FlagX = "";
                        foreach (string index in strARRAY)
                        {
                            i = int.Parse(index);
                            L_PP_LivingIN.Text += FlagX + ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.Country, i);
                            FlagX = ", ";
                        }
                    }
                    else
                    {
                        L_PP_LivingIN.Text = "Any";
                    }
                }
                //---------------------------------------------------------------------------------------------------
                if (objMember.PP_ResidingState.IndexOf("##") >= 0)
                {
                    L_PP_ResidingState.Text = "Any";
                }
                else
                {
                    if (objMember.PP_ResidingState.ToLower().IndexOf("any") >= 0)
                    {
                        L_PP_ResidingState.Text = "Any";
                    }
                    else
                    {
                        strARRAY = objMember.PP_ResidingState.Split('%');
                        if (strARRAY[0].Length != 0)
                        {
                            FlagX = "";
                            foreach (string index in strARRAY)
                            {
                                i = int.Parse(index);
                                L_PP_ResidingState.Text += FlagX + ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.State, i);
                                FlagX = "";
                            }
                        }
                        else
                        {
                            L_PP_ResidingState.Text = "Any";
                        }
                    }
                }
                //---------------------------------------------------------------------------------------------------
                if (objMember.PP_ResStatus.ToLower().IndexOf("any") >= 0)
                {
                    L_PP_ResidentStatus.Text = "Any";
                }
                else
                {
                    strARRAY = objMember.PP_ResStatus.Split('%');
                    if (strARRAY[0].Length != 0)
                    {
                        FlagX = "";
                        foreach (string index in strARRAY)
                        {
                            i = int.Parse(index);
                            L_PP_ResidentStatus.Text += FlagX + ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.ResidenceStatus, i);
                            FlagX = ", ";
                        }
                    }
                }

                ////---------------------------------------------------------------------------------------------------



                //About Me

                L_AboutMe.Text = objMember.AboutMe;

                //My Expe
                L_MyExp.Text = objMember.MyExpectations;
                //L_MyExp.Text=objMember.m
            }   //if
            else// Matrimonial ID Does not Exists
            {
                Server.Transfer("../Extras/ErrorReport.aspx?id=pnf");
            }
        }
    }
Example #8
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);

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

            TB_AboutME.Attributes.Add("onKeyUp",
                                      "javascript:document.getElementById('" + txtCount.ClientID +
                                      "').setAttribute('value', (" + TB_AboutME.MaxLength +
                                      " - parseInt(document.getElementById('" + TB_AboutME.ClientID +
                                      "').getAttribute('value').length)));");

            //Loading DDLs

            //Getting Connection String

            DDL_FamilyStatus.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.FamilyStatus);
            DDL_FamilyStatus.DataTextField  = "Item";
            DDL_FamilyStatus.DataValueField = "Value";
            DDL_FamilyStatus.DataBind();

            DDL_FamilyType.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Familytype);
            DDL_FamilyType.DataTextField  = "Item";
            DDL_FamilyType.DataValueField = "Value";
            DDL_FamilyType.DataBind();

            DDL_FamilyValues.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.FamilyValue);
            DDL_FamilyValues.DataTextField  = "Item";
            DDL_FamilyValues.DataValueField = "Value";
            DDL_FamilyValues.DataBind();

            LB_Hobbies.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Hobbies);
            LB_Hobbies.DataTextField  = "Item";
            LB_Hobbies.DataValueField = "Value";
            LB_Hobbies.DataBind();
            LB_Hobbies.Items.RemoveAt(0);

            LB_Interests.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Interests);
            LB_Interests.DataTextField  = "Item";
            LB_Interests.DataValueField = "Value";
            LB_Interests.DataBind();
            LB_Interests.Items.RemoveAt(0);
        }
        else        // Not postback
        {
            sbyte sbyteFlage = 0;
            //try
            //{
            HttpCookieCollection objHttpCookieCollection = Request.Cookies;
            HttpCookie           objHttpCookie           = objHttpCookieCollection.Get("MatRegInfo");

            strApplicationID = Crypto.DeCrypto(objHttpCookie.Values["ApplicationID"]);
            if (strApplicationID != null)
            {
                //About Me
                sbyteFlage = MatrimonialProfileManager.InsertAboutMe(strApplicationID, TB_AboutME.Text);
                // Family Details
                sbyteFlage += MatrimonialProfileManager.InsertFamilyInfo(strApplicationID, TB_FamilyDetails.Text, (sbyte)DDL_FamilyValues.SelectedIndex,
                                                                         (sbyte)DDL_FamilyType.SelectedIndex, (sbyte)DDL_FamilyStatus.SelectedIndex, TB_familyOrigin.Text,
                                                                         (sbyte)DDL_NoOfBrothers.SelectedIndex, (sbyte)DDL_NoOFSisters.SelectedIndex, (sbyte)DDL_NoOfBrothersMarried.SelectedIndex,
                                                                         (sbyte)DDL_NoOFSistersMarried.SelectedIndex, TB_Father_Name.Text, TB_Mother_name.Text,
                                                                         RB_FLIve.Checked, RB_MLive.Checked, TB_Father_Occ.Text, TB_Mother_Occ.Text);

                //Hobbies And Interests
                string strHobbiesList = "";
                string Flag           = "";
                foreach (ListItem objListItem in LB_Hobbies.Items)
                {
                    if (objListItem.Selected)
                    {
                        strHobbiesList += Flag + objListItem.Value;
                        Flag            = "%";
                    }
                }
                Flag = "";
                //Intrests
                string strInterestList = "";
                foreach (ListItem objListItem in LB_Interests.Items)
                {
                    if (objListItem.Selected)
                    {
                        strInterestList += Flag + objListItem.Value;
                        Flag             = "%";
                    }
                }
                //Inserting Into Database
                sbyteFlage += MatrimonialProfileManager.InsertHobiesNInterests(strApplicationID, strHobbiesList, TB_OtherHobbies.Text, strInterestList, TB_OtherInterests.Text);

                if (sbyteFlage == 3)
                {
                    MatrimonialMemberShip.UpdateIndex(strApplicationID);
                    Server.Transfer("RegistrationStep4.aspx");
                }
                else
                {
                    Response.Redirect("../Extras/ErrorReport.aspx");
                }
            }
            else
            {
                Response.Redirect("../Extras/ErrorReport.aspx");
            }
            //}
            //catch (Exception)
            //{ }
        }
    }
    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);


            // Loading controls


            using (SqlConnection objConnection = DBConnection.GetSqlConnection())
            {
                try
                {
                    objConnection.Open();

                    // Loading Star
                    SqlCommand    objCommand    = new SqlCommand("SELECT * FROM IndexStar", objConnection);
                    SqlDataReader objDataReader = objCommand.ExecuteReader();

                    DDL_Star.DataSource     = objDataReader;
                    DDL_Star.DataTextField  = "Item";
                    DDL_Star.DataValueField = "Value";
                    DDL_Star.DataBind();
                    objDataReader.Close();

                    // Loading MoonSign
                    objCommand    = new SqlCommand("SELECT * FROM IndexMoonSign", objConnection);
                    objDataReader = objCommand.ExecuteReader();

                    DDL_Moon.DataSource     = objDataReader;
                    DDL_Moon.DataTextField  = "Item";
                    DDL_Moon.DataValueField = "Value";
                    DDL_Moon.DataBind();
                    objDataReader.Close();
                }
                catch (Exception Ex)
                {
                    ErrorLog.WriteErrorLog("RegistrationStep 1", Ex);
                    Response.Redirect("../Extras/ErrorReport.aspx");
                }
                finally
                {
                    objConnection.Close();
                }
            }

            // Getting applicationID from Cookie
            HttpCookieCollection objHttpCookieCollection = Request.Cookies;
            HttpCookie           objHttpCookie           = objHttpCookieCollection.Get("MatCookie5639sb");

            string strApplicationID = Crypto.DeCrypto(objHttpCookie.Values["ApplicationID"]);
            //If Cookie is working
            if ((strApplicationID != null) && (strApplicationID != ""))
            {
                //Get Member Informations
                MatMember objMember = new MatMember(true, strApplicationID, false, true, true, false, false, false, false, false, false, false);

                //Populating Controls
                //Basic Informations
                L_Name.Text = objMember.Name;

                if (objMember.Gender)
                {
                    L_Gender.Text = "Male";
                }
                else
                {
                    L_Gender.Text = "Female";
                }

                L_Dob.Text = objMember.DOB.Day + "/" + objMember.DOB.Month + "/" + objMember.DOB.Year;

                //For Testing
                L_MaritalStatus.Text = ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.MaritalStatus, objMember.MaritialStatus);

                if (objMember.NoOfChildren == 0)
                {
                    L_NoOfChildren.Text     = "Nill";
                    RB_NotWithMe.Enabled    = false;
                    RB_LivingWithMe.Enabled = false;
                }
                else
                {
                    L_NoOfChildren.Text = objMember.NoOfChildren.ToString();

                    if (objMember.ChildrenLivingWith)
                    {
                        RB_LivingWithMe.Checked = true;
                    }
                    else
                    {
                        RB_NotWithMe.Checked = true;
                    }
                }



                if (objMember.PhysicalStatus)
                {
                    L_PhysicalStatus.Text = "Normal";
                }
                else
                {
                    L_PhysicalStatus.Text = "Disabled";
                }

                L_MotherTongue.Text = ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.MotherTongue, objMember.MotherTongue);

                L_Religion.Text = ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.Religion, objMember.Religion);

                L_Cast.Text = ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.Cast, objMember.Cast);

                TB_Subcast.Text = objMember.Subcast;

                L_ProfieCreated.Text = ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.ProfileCreatedBy, objMember.CreatedBy);

                //Socio Religious
                if (objMember.MoonSign != 0)
                {
                    DDL_Star.SelectedIndex = objMember.Star;
                    DDL_Star.Enabled       = false;
                }

                if (objMember.MoonSign != 0)
                {
                    DDL_Moon.SelectedIndex = objMember.MoonSign;
                    DDL_Moon.Enabled       = false;
                }


                switch (objMember.HoroMatch)
                {
                case 0:
                    break;

                case 1:
                    RB_Horoscope_NO.Checked = true;
                    break;

                case 2:
                    RB_Horoscope_Yes.Checked = true;
                    break;

                case 3:
                    RB_Horoscope_NoMatters.Checked = true;
                    break;

                default:
                    break;
                }

                switch (objMember.Manglik)
                {
                case 0:
                    break;

                case 1:
                    RB_Manglik_No.Checked = true;
                    break;

                case 2:
                    RB_Manglik_Yes.Checked = true;
                    break;

                case 3:
                    RB_Horoscope_NoMatters.Checked = true;
                    break;

                case 4:
                    RB_Manglik_NA.Checked = true;
                    break;

                default:
                    break;
                }

                TB_POB.Text = objMember.PlaceOfBirth;

                TB_Time_H.Text = objMember.TimeOfBirth.Hour.ToString();

                TB_Time_M.Text = objMember.TimeOfBirth.Minute.ToString();

                if (objMember.TimeOfBirth.Hour > 12)
                {
                    DDL_Time.SelectedIndex = 1;
                }
                else
                {
                    DDL_Time.SelectedIndex = 2;
                }
            }
            else
            {
                Response.Redirect("../Extras/ErrorReport.aspx?id=cookie");
            }//applicationid=null
        }   //if
        else
        {
            string strApplicationID = null;

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

                strApplicationID = Crypto.DeCrypto(objHttpCookie.Values["ApplicationID"]);
            }
            catch (Exception)
            {
                Server.Transfer("../Extras/ErrorReport.aspx?id=Cookie");
            }
            sbyte  sbyteFlag = 0;
            string boolChildrenLivingStatus;
            sbyte  sbyteHoroMatch = 0;
            sbyte  sbyteManglik   = 0;
            string strTimeOfBirth = null;

            // Collecting BasicInformation

            if (RB_LivingWithMe.Checked)
            {
                boolChildrenLivingStatus = true.ToString();
            }
            else if (RB_NotWithMe.Checked)
            {
                boolChildrenLivingStatus = false.ToString();
            }
            else
            {
                boolChildrenLivingStatus = null;
            }

            // Updateing User BasicInformation

            sbyteFlag = MatrimonialProfileManager.UpdateUserBasicInformation(strApplicationID, boolChildrenLivingStatus, TB_Subcast.Text);

            // Collecting SocioReligiousAttributes

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


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


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

            // Updateing User Socio-Religious Attributes

            sbyteFlag += MatrimonialProfileManager.UpdateUserSocioReligiousAttributes(strApplicationID, (sbyte)DDL_Star.SelectedIndex,
                                                                                      (sbyte)DDL_Moon.SelectedIndex, sbyteHoroMatch, TB_POB.Text, strTimeOfBirth, sbyteManglik);

            // Does the transation a sucess

            if (sbyteFlag == 2)// Sucess
            {
                Response.Redirect("EditProfile-S2.aspx");
            }
            else// Some error Occured
            {
                Response.Redirect("../Extras/ErrorReport.aspx");
            }
        }//postbak
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)

        {
            if (Request.QueryString["seqtkey"] != null)
            {
                try
                {
                    HF_MatID.Value = Session[Request.QueryString["seqtkey"]].ToString();
                    L_MATID.Text   = Session[Request.QueryString["seqtkey"]].ToString();
                    HF_Seqt.Value  = Request.QueryString["seqtkey"];
                    this.Title     = "Editing Member Profile :" + L_MATID.Text + " Step1";

                    HL_Step_2.NavigateUrl = "~/Admin/Protected/EditProfile2.aspx?seqtkey=" + HF_Seqt.Value;
                    HL_Step_3.NavigateUrl = "~/Admin/Protected/EditProfile3.aspx?seqtkey=" + HF_Seqt.Value;
                    HL_Step_4.NavigateUrl = "~/Admin/Protected/EditProfile4.aspx?seqtkey=" + HF_Seqt.Value;

                    LoadStep1();
                }
                catch (Exception)
                {
                    Response.Redirect("~/Extras/ErrorReport.aspx?is=session");
                }
            }
            else
            {
                Response.Redirect("~/Extras/ErrorReport.aspx?id=406");
            }
        }

        else
        {
            string strApplicationID = MatrimonialMemberShip.GetApplicationID(HF_MatID.Value);
            sbyte  sbyteFlag        = 0;
            string boolChildrenLivingStatus;
            sbyte  sbyteHoroMatch = 0;
            sbyte  sbyteManglik   = 0;
            string strTimeOfBirth = null;

            // Collecting BasicInformation

            if (RB_LivingWithMe.Checked)
            {
                boolChildrenLivingStatus = true.ToString();
            }
            else if (RB_NotWithMe.Checked)
            {
                boolChildrenLivingStatus = false.ToString();
            }
            else
            {
                boolChildrenLivingStatus = null;
            }

            // Updateing User BasicInformation

            sbyteFlag = MatrimonialProfileManager.UpdateUserBasicInformation(strApplicationID, boolChildrenLivingStatus, TB_Subcast.Text);

            // Collecting SocioReligiousAttributes

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


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


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

            // Updateing User Socio-Religious Attributes

            sbyteFlag += MatrimonialProfileManager.UpdateUserSocioReligiousAttributes(strApplicationID, (sbyte)DDL_Star.SelectedIndex,
                                                                                      (sbyte)DDL_Moon.SelectedIndex, sbyteHoroMatch, TB_POB.Text, strTimeOfBirth, sbyteManglik);

            // Does the transation a sucess

            if (sbyteFlag == 2)// Success
            {
                Server.Transfer("~/Admin/Protected/EditProfile2.aspx?seqtkey=" + HF_Seqt.Value);
            }
            else// Some error Occured
            {
                Response.Redirect("~/Extras/ErrorReport.aspx");
            }
        }
    }
    private void SaveData()
    {
        string strApplicationID = MatrimonialMemberShip.GetApplicationID(HF_MatID.Value);;

        // Inserting data into database
        if (strApplicationID != null)
        {
            sbyte sbyteFlag = 0;
            sbyte sbyteChildrenStatus;
            sbyte sbytePhysicalStatus;

            //-------------------------------------------------------------------------------------------------------------
            if (RB_ChildrenNO.Checked)
            {
                sbyteChildrenStatus = 1;
            }
            else if (RB_ChildrenYesLT.Checked)
            {
                sbyteChildrenStatus = 2;
            }
            else if (RB_ChildrenYesNLT.Checked)
            {
                sbyteChildrenStatus = 3;
            }
            else if (RB_ChildrenDM.Checked)
            {
                sbyteChildrenStatus = 4;
            }
            else
            {
                sbyteChildrenStatus = 0;
            }

            //-------------------------------------------------------------------------------------------------------------

            if (RB_phy_nor.Checked)
            {
                sbytePhysicalStatus = 1;
            }
            else if (RB_phy_Dis.Checked)
            {
                sbytePhysicalStatus = 2;
            }
            else if (RB_phy_DMater.Checked)
            {
                sbytePhysicalStatus = 3;
            }
            else
            {
                sbytePhysicalStatus = 0;
            }

            //-------------------------------------------------------------------------------------------------------------

            // Loading Values From LB

            string strMaritalStatusList = "";
            string Flag = "";
            // Marital Status
            foreach (ListItem objListItem in LB_MaritalStatus.Items)
            {
                if (objListItem.Selected)
                {
                    strMaritalStatusList += Flag + objListItem.Value;
                    Flag = "%";
                }
            }
            //-------------------------------------------------------------------------------------------------------------
            // Complexion
            string strComplexionList = "";

            Flag = "";

            foreach (ListItem objListItem in LB_Complexion.Items)
            {
                if (objListItem.Selected)
                {
                    strComplexionList += Flag + objListItem.Value;
                    Flag = "%";
                }
            }
            //-------------------------------------------------------------------------------------------------------------
            // Mother Tongue
            string strMotherTongueList = "";

            Flag = "";

            foreach (ListItem objListItem in LB_MotherTongue.Items)
            {
                if (objListItem.Selected)
                {
                    strMotherTongueList += Flag + objListItem.Value;
                    Flag = "%";
                }
            }
            //-------------------------------------------------------------------------------------------------------------
            // Religion
            string strReligionList = "";
            if (CB_Religion_Any.Checked)
            {
                strReligionList = "##";
            }
            else
            {
                Flag = "";

                foreach (ListItem objListItem in LB_Religion.Items)
                {
                    if (objListItem.Selected)
                    {
                        strReligionList += Flag + objListItem.Value;
                        Flag             = "%";
                    }
                }
            }
            //-------------------------------------------------------------------------------------------------------------
            //Caste
            string strCasteList = "";
            if (CB_Caste_Any.Checked)
            {
                strCasteList = "##";
            }
            else
            {
                Flag = "";

                foreach (ListItem objListItem in LB_Caste.Items)
                {
                    if (objListItem.Selected)
                    {
                        strCasteList += Flag + objListItem.Value;
                        Flag          = "%";
                    }
                }
            }
            //-------------------------------------------------------------------------------------------------------------
            // Education
            string strEducationList = "";
            if (CB_Education_Any.Checked)
            {
                strEducationList = "##";
            }
            else
            {
                Flag = "";

                foreach (ListItem objListItem in LB_Education.Items)
                {
                    if (objListItem.Selected)
                    {
                        strEducationList += Flag + objListItem.Value;
                        Flag              = "%";
                    }
                }
            }
            //-------------------------------------------------------------------------------------------------------------
            // EduDetails
            string strEduDetailsList = "";
            if (CB_EduDet.Checked)
            {
                strEduDetailsList = "##";
            }
            else
            {
                Flag = "";

                foreach (ListItem objListItem in LB_Edudetails.Items)
                {
                    if (objListItem.Selected)
                    {
                        strEduDetailsList += Flag + objListItem.Value;
                        Flag = "%";
                    }
                }
            }
            //-------------------------------------------------------------------------------------------------------------
            // Occupation
            string strOccupationList = "";
            if (CB_Occupation_any.Checked)
            {
                strOccupationList = "##";
            }
            else
            {
                Flag = "";

                foreach (ListItem objListItem in LB_Occupation.Items)
                {
                    if (objListItem.Selected)
                    {
                        strOccupationList += Flag + objListItem.Value;
                        Flag = "%";
                    }
                }
            }
            //-------------------------------------------------------------------------------------------------------------
            // Citizenship
            string strCitizenshipList = "";
            if (CB_IndianX.Checked)
            {
                strCitizenshipList = "##";
            }
            else
            {
                Flag = "";

                foreach (ListItem objListItem in LB_Citizenship.Items)
                {
                    if (objListItem.Selected)
                    {
                        strCitizenshipList += Flag + objListItem.Value;
                        Flag = "%";
                    }
                }
            }
            //-------------------------------------------------------------------------------------------------------------
            // Country Living in
            string strCountryLivinginList = "";
            if (CB_Indian.Checked)
            {
                strCountryLivinginList = "##";
            }
            else
            {
                Flag = "";

                foreach (ListItem objListItem in LB_Citizenship.Items)
                {
                    if (objListItem.Selected)
                    {
                        strCountryLivinginList += Flag + objListItem.Value;
                        Flag = "%";
                    }
                }
            }
            //-------------------------------------------------------------------------------------------------------------
            // Country Living in
            string strStateList = "";
            if (!CB_StatesInIndia.Checked)
            {
                strStateList = TB_NonIndianState.Text + "#";
            }
            else
            {
                Flag = "";

                foreach (ListItem objListItem in LB_Rasident_State.Items)
                {
                    if (objListItem.Selected)
                    {
                        strStateList += Flag + objListItem.Value;
                        Flag          = "%";
                    }
                }
            }
            //-------------------------------------------------------------------------------------------------------------
            //Residential Status
            string strResidentStatus = "";
            Flag = "";
            foreach (ListItem objListItem in LB_Rasident_Status.Items)
            {
                if (objListItem.Selected)
                {
                    strResidentStatus += Flag + objListItem.Value;
                    Flag = "%";
                }
            }
            //--------------------------------------------------------------------------------------------------------------
            sbyteFlag = MatrimonialProfileManager.InsertMyExpectation(strApplicationID, TB_Expectations.Text);
            //--------------------------------------------------------------------------------------------------------------
            sbyteFlag += MatrimonialProfileManager.InsertPartnerPreferance(strApplicationID, strMaritalStatusList, sbyte.Parse(TB_Age_min.Text),
                                                                           sbyte.Parse(TB_Age_Max.Text), strComplexionList, sbyteChildrenStatus, (DDL_Height_min.SelectedIndex + 89), (DDL_Height_Max.SelectedIndex + 89),
                                                                           sbytePhysicalStatus, strMotherTongueList, strReligionList, strCasteList, DDL_ChDosham.SelectedIndex, DDL_EathingHabits.SelectedIndex,
                                                                           strEducationList, strEduDetailsList, LB_AnnulIncome.SelectedIndex, strOccupationList, strCitizenshipList, strCountryLivinginList,
                                                                           strStateList, strResidentStatus);
            //--------------------------------------------------------------------------------------------------------------

            if (sbyteFlag == 2)
            {
                L_Success.Visible = false;
            }
        }
    }
Example #12
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            HttpCookieCollection objHttpCookieCollection = Request.Cookies;
            HttpCookie           objHttpCookie           = objHttpCookieCollection.Get("MatRegInfo");

            //Getting ApplicationID Value

            // <Meta tag>

            // 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);


            //Loading DDL

            //Getting Connection String

            //Connect To database

            DDL_Education.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Education);
            DDL_Education.DataTextField  = "Item";
            DDL_Education.DataValueField = "Value";
            DDL_Education.DataBind();

            DDL_EduDetails.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.EduDetails);
            DDL_EduDetails.DataTextField  = "Item";
            DDL_EduDetails.DataValueField = "Value";
            DDL_EduDetails.DataBind();

            DDL_AnnualIncome.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.AnnualIncomeRange);
            DDL_AnnualIncome.DataTextField  = "Item";
            DDL_AnnualIncome.DataValueField = "Value";
            DDL_AnnualIncome.DataBind();

            DDL_Currency.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Currency);
            DDL_Currency.DataTextField  = "Item";
            DDL_Currency.DataValueField = "Value";
            DDL_Currency.DataBind();

            DDL_Occupation.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Occupation);
            DDL_Occupation.DataTextField  = "Item";
            DDL_Occupation.DataValueField = "Value";
            DDL_Occupation.DataBind();

            DDL_EmpIn.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.EmployedIn);
            DDL_EmpIn.DataTextField  = "Item";
            DDL_EmpIn.DataValueField = "Value";
            DDL_EmpIn.DataBind();

            DDL_BGroup.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.BloodGroup);
            DDL_BGroup.DataTextField  = "Item";
            DDL_BGroup.DataValueField = "Value";
            DDL_BGroup.DataBind();

            DDL_Complexion.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Complexion);
            DDL_Complexion.DataTextField  = "Item";
            DDL_Complexion.DataValueField = "Value";
            DDL_Complexion.DataBind();

            DDL_Diet.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Diet);
            DDL_Diet.DataTextField  = "Item";
            DDL_Diet.DataValueField = "Value";
            DDL_Diet.DataBind();

            DDL_Country.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Country);
            DDL_Country.DataTextField  = "Item";
            DDL_Country.DataValueField = "Value";
            DDL_Country.DataBind();

            DDL_ResidenceIn.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Country);
            DDL_ResidenceIn.DataTextField  = "Item";
            DDL_ResidenceIn.DataValueField = "Value";
            DDL_ResidenceIn.DataBind();

            DDL_State.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.State);
            DDL_State.DataTextField  = "Item";
            DDL_State.DataValueField = "Value";
            DDL_State.DataBind();

            DDL_ResidentialStatus.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.ResidenceStatus);
            DDL_ResidentialStatus.DataTextField  = "Item";
            DDL_ResidentialStatus.DataValueField = "Value";
            DDL_ResidentialStatus.DataBind();

            short shortCounter;
            DDL_Weight.Items.Insert(0, "-- Select --");
            for (shortCounter = 40; shortCounter <= 140; ++shortCounter)
            {
                DDL_Weight.Items.Insert(shortCounter - 39, shortCounter + " KG");
            }

            DDL_Height.Items.Insert(0, "-- Select --");
            for (shortCounter = 90; shortCounter <= 185; ++shortCounter)
            {
                DDL_Height.Items.Insert(shortCounter - 89, shortCounter + " CM");
            }
        }
        else
        {
            sbyte  sbyteFlag = 0;
            string strApplicationID;
            //try
            //{
            HttpCookieCollection objHttpCookieCollection = Request.Cookies;
            HttpCookie           objHttpCookie           = objHttpCookieCollection.Get("MatRegInfo");

            strApplicationID = Crypto.DeCrypto(objHttpCookie.Values[0]);

            if (strApplicationID != null)
            {
                //Inserting  Education and Occupation
                sbyteFlag = MatrimonialProfileManager.InsertEducationalInfo(strApplicationID, (sbyte)DDL_Education.SelectedIndex,
                                                                            (sbyte)DDL_EduDetails.SelectedIndex, (sbyte)DDL_AnnualIncome.SelectedIndex,
                                                                            (short)DDL_Currency.SelectedIndex, (sbyte)DDL_Occupation.SelectedIndex,
                                                                            (sbyte)DDL_EmpIn.SelectedIndex);


                // setting Physical Attributes

                sbyte sbyteBodyType = 0;
                sbyte sbyteSmoke    = 0;
                sbyte sbyteDrink    = 0;

                if (RB_BType_Slim.Checked)
                {
                    sbyteBodyType = 1;
                }
                else if (RB_BType_Avg.Checked)
                {
                    sbyteBodyType = 2;
                }
                else if (RB_BType_Ath.Checked)
                {
                    sbyteBodyType = 3;
                }
                else if (RB_BType_Heavy.Checked)
                {
                    sbyteBodyType = 4;
                }

                if (RB_Smoke_no.Checked)
                {
                    sbyteSmoke = 1;
                }
                else if (RB_Smoke_Yes.Checked)
                {
                    sbyteSmoke = 2;
                }
                else if (RB_Smoke_Occ.Checked)
                {
                    sbyteSmoke = 3;
                }

                if (RB_Drink_No.Checked)
                {
                    sbyteDrink = 1;
                }
                else if (RB_Drink_Yes.Checked)
                {
                    sbyteDrink = 2;
                }
                else if (RB_Drink_Occ.Checked)
                {
                    sbyteDrink = 3;
                }


                //Inserting Physical Attributes
                sbyteFlag += MatrimonialProfileManager.InsertPhysicalInfo(strApplicationID, (short)(DDL_Height.SelectedIndex + 89),
                                                                          (short)DDL_Weight.SelectedIndex, (sbyte)DDL_BGroup.SelectedIndex, sbyteBodyType,
                                                                          (sbyte)DDL_Diet.SelectedIndex, sbyteSmoke, sbyteDrink, (sbyte)DDL_Complexion.SelectedIndex);



                //Setting Contact Details
                sbyteFlag += MatrimonialProfileManager.InsertContactInfo(strApplicationID, TB_Address.Text, (short)DDL_Country.SelectedIndex,
                                                                         (sbyte)DDL_State.SelectedIndex, TB_City.Text, TB_Phone_NO.Text, TB_Phone_STD.Text, TB_Phone_ISD.Text,
                                                                         TB_Phone_Mobile.Text, (short)DDL_ResidenceIn.SelectedIndex, (sbyte)DDL_ResidentialStatus.SelectedIndex,
                                                                         TB_RCity.Text);
            }

            if (sbyteFlag == 3)
            {
                MatrimonialMemberShip.UpdateIndex(strApplicationID);
                Server.Transfer("RegistrationStep3.aspx");
            }
            else
            {
                Response.Redirect("../Extras/ErrorReport.aspx");
            }


            //}
            //catch (Exception)
            //{
            //    Response.Redirect("../Extras/ErrorReport.aspx?id=Cookie");
            //}
        }
    }
Example #13
0
    protected void IB_Submit_Step2_Click(object sender, ImageClickEventArgs e)
    {
        sbyte  sbyteFlag        = 0;
        string strApplicationID = MatrimonialMemberShip.GetApplicationID(HF_MatID.Value);

        if (strApplicationID != null)
        {
            //Inserting  Education and Occupation
            sbyteFlag = MatrimonialProfileManager.UpdateEducationalInfo(strApplicationID, (sbyte)DDL_Education.SelectedIndex,
                                                                        (sbyte)DDL_EduDetails.SelectedIndex, (sbyte)DDL_AnnualIncome.SelectedIndex,
                                                                        (short)DDL_Currency.SelectedIndex, (sbyte)DDL_Occupation.SelectedIndex,
                                                                        (sbyte)DDL_EmpIn.SelectedIndex);

            // setting Physical Attributes

            sbyte sbyteBodyType = 0;
            sbyte sbyteSmoke    = 0;
            sbyte sbyteDrink    = 0;

            if (RB_BType_Slim.Checked)
            {
                sbyteBodyType = 1;
            }
            else if (RB_BType_Avg.Checked)
            {
                sbyteBodyType = 2;
            }
            else if (RB_BType_Ath.Checked)
            {
                sbyteBodyType = 3;
            }
            else if (RB_BType_Heavy.Checked)
            {
                sbyteBodyType = 4;
            }

            //Smoking Habite
            if (RB_Smoke_no.Checked)
            {
                sbyteSmoke = 1;
            }
            else if (RB_Smoke_Yes.Checked)
            {
                sbyteSmoke = 2;
            }
            else if (RB_Smoke_Occ.Checked)
            {
                sbyteSmoke = 3;
            }

            //Drinking Habit
            if (RB_Drink_No.Checked)
            {
                sbyteDrink = 1;
            }
            else if (RB_Drink_Yes.Checked)
            {
                sbyteDrink = 2;
            }
            else if (RB_Drink_Occ.Checked)
            {
                sbyteDrink = 3;
            }


            //Inserting Physical Attributes
            sbyteFlag += MatrimonialProfileManager.UpdatePhysicalInfo(strApplicationID,
                                                                      (short)DDL_Weight.SelectedIndex, (sbyte)DDL_BGroup.SelectedIndex, sbyteBodyType,
                                                                      (sbyte)DDL_Diet.SelectedIndex, sbyteSmoke, sbyteDrink);



            //Setting Contact Details
            sbyteFlag += MatrimonialProfileManager.UpdateContactInfo(strApplicationID, TB_Address.Text, (short)DDL_Country.SelectedIndex,
                                                                     (sbyte)DDL_State.SelectedIndex, TB_City.Text, TB_Phone_NO.Text, TB_Phone_STD.Text, TB_Phone_ISD.Text,
                                                                     TB_Phone_Mobile.Text, (sbyte)DDL_ResidenceIn.SelectedIndex, (sbyte)DDL_ResidentialStatus.SelectedIndex,
                                                                     TB_RCity.Text);
        }

        if (sbyteFlag == 3)// Every module is updated correctly
        {
            Server.Transfer("~/Admin/Protected/EditProfile.aspx?id=3&seqtkey=" + HF_Seqt.Value);
        }
        else// Some have some error
        {
            Server.Transfer("~/Extras/ErrorReport.aspx");
        }
    }
    protected void IB_Submit_Step3_Click(object sender, ImageClickEventArgs e)
    {
        sbyte  sbyteBrotherToMarry;
        sbyte  sbyteSisterToMarry;
        string strApplicationID = MatrimonialMemberShip.GetApplicationID(HF_MatID.Value);
        sbyte  sbyteFlage       = 0;

        try
        {
            if (strApplicationID != null)
            {
                //Updating About Me
                sbyteFlage = MatrimonialProfileManager.UpdateAboutMe(strApplicationID, TB_AboutME.Text);

                // Setting data for Family Informations

                if (DDL_NoOfBrothersMarried.SelectedIndex != 0)
                {
                    sbyteBrotherToMarry = (sbyte)DDL_NoOfBrothersMarried.SelectedIndex;
                }
                else
                {
                    sbyteBrotherToMarry = sbyte.Parse(L_BMarried.Text);
                }


                if (DDL_NoOFSistersMarried.SelectedIndex != 0)
                {
                    sbyteSisterToMarry = (sbyte)DDL_NoOFSistersMarried.SelectedIndex;
                }
                else
                {
                    sbyteSisterToMarry = sbyte.Parse(L_SMarried.Text);
                }

                //Updating Family Informations

                sbyteFlage += MatrimonialProfileManager.UpdateFamilyInfo(strApplicationID, TB_FamilyDetails.Text, (sbyte)DDL_FamilyValues.SelectedIndex,
                                                                         (sbyte)DDL_FamilyType.SelectedIndex, (sbyte)DDL_FamilyStatus.SelectedIndex, TB_familyOrigin.Text,
                                                                         sbyteBrotherToMarry, sbyteSisterToMarry, RB_Father_Alive.Checked, RB_Mother_Alive.Checked,
                                                                         TB_Father_Occ.Text, TB_Mother_Occ.Text);

                string strHobbiesList = "";
                string Flag           = "";
                foreach (ListItem objListItem in LB_Hobbies.Items)
                {
                    if (objListItem.Selected)
                    {
                        strHobbiesList += Flag + objListItem.Value;
                        Flag            = "%";
                    }
                }
                Flag = "";
                //Intrests
                string strInterestList = "";
                foreach (ListItem objListItem in LB_Interests.Items)
                {
                    if (objListItem.Selected)
                    {
                        strInterestList += Flag + objListItem.Value;
                        Flag             = "%";
                    }
                }
                //Inserting Into Database
                sbyteFlage += MatrimonialProfileManager.InsertHobiesNInterests(strApplicationID, strHobbiesList, TB_OtherHobbies.Text, strInterestList, TB_OtherInterests.Text);


                if (sbyteFlage == 3)
                {
                    Server.Transfer("~/Admin/Protected/EditProfile.aspx?id=4&seqtkey=" + HF_Seqt.Value);
                }
                else
                {
                    Response.Redirect("~/Extras/ErrorReport.aspx");
                }
            }
            else
            {
                Response.Redirect("~/Extras/ErrorReport.aspx");
            }
        }
        catch (Exception)
        { }
    }
    private void LoadAnonymus()
    {
        //MAKE CONTROLS VISIBLE
        PN_CheckAnon.Visible = true;
        PN_NoRecords.Visible = false;
        PN_Delete.Visible    = false;

        L_Label.Text      = "ANONYMUS";
        this.Title        = "Anonymus Member Profiles";
        Img_icon.ImageUrl = "~/Resources/DeleteUser-paid32.gif";


        //LOAD CONTROLS

        //Get SSList
        DataTable objDataTableProfile = MatrimonialProfileManager.AbuseProfileLsit();

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



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

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


                //Coloum 2 Message
                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);
            }
        }
        else
        {
            //NoStorys Are Present In the list
            PN_CheckAnon.Visible = false;
            PN_NoRecords.Visible = true;
        }
    }
    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);
            //---------------------------------------------------------------------------------------------------
            txtCount.Text = TB_Expectations.MaxLength.ToString();
            /// Text Counter Initiallisation
            TB_Expectations.Attributes.Add("onKeyUp",
                                           "javascript:document.getElementById('" + txtCount.ClientID +
                                           "').setAttribute('value', (" + TB_Expectations.MaxLength +
                                           " - parseInt(document.getElementById('" + TB_Expectations.ClientID +
                                           "').getAttribute('value').length)));");
            //---------------------------------------------------------------------------------------------------
            //load ddls
            //Getting Connection String
            LB_MaritalStatus.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.MaritalStatus);
            LB_MaritalStatus.DataTextField  = "Item";
            LB_MaritalStatus.DataValueField = "Value";
            LB_MaritalStatus.DataBind();
            LB_MaritalStatus.Items.RemoveAt(0);
            //---------------------------------------------------------------------------------------------------
            LB_Complexion.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Complexion);
            LB_Complexion.DataTextField  = "Item";
            LB_Complexion.DataValueField = "Value";
            LB_Complexion.DataBind();
            LB_Complexion.Items.RemoveAt(0);
            //---------------------------------------------------------------------------------------------------
            LB_MotherTongue.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.MotherTongue);
            LB_MotherTongue.DataTextField  = "Item";
            LB_MotherTongue.DataValueField = "Value";
            LB_MotherTongue.DataBind();
            LB_MotherTongue.Items.RemoveAt(0);
            //---------------------------------------------------------------------------------------------------
            LB_Religion.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Religion);
            LB_Religion.DataTextField  = "Item";
            LB_Religion.DataValueField = "Value";
            LB_Religion.DataBind();
            LB_Religion.Items.RemoveAt(0);
            //---------------------------------------------------------------------------------------------------
            LB_Caste.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Cast);
            LB_Caste.DataTextField  = "Item";
            LB_Caste.DataValueField = "Value";
            LB_Caste.DataBind();
            LB_Caste.Items.RemoveAt(0);
            //---------------------------------------------------------------------------------------------------
            LB_Education.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Education);
            LB_Education.DataTextField  = "Item";
            LB_Education.DataValueField = "Value";
            LB_Education.DataBind();
            LB_Education.Items.RemoveAt(0);
            //---------------------------------------------------------------------------------------------------
            LB_Edudetails.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.EduDetails);;
            LB_Edudetails.DataTextField  = "Item";
            LB_Edudetails.DataValueField = "Value";
            LB_Edudetails.DataBind();
            LB_Edudetails.Items.RemoveAt(0);
            //---------------------------------------------------------------------------------------------------
            LB_AnnulIncome.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.AnnualIncomeRange);
            LB_AnnulIncome.DataTextField  = "Item";
            LB_AnnulIncome.DataValueField = "Value";
            LB_AnnulIncome.DataBind();
            LB_AnnulIncome.Items.RemoveAt(0);
            //---------------------------------------------------------------------------------------------------
            LB_Occupation.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Occupation);
            LB_Occupation.DataTextField  = "Item";
            LB_Occupation.DataValueField = "Value";
            LB_Occupation.DataBind();
            LB_Occupation.Items.RemoveAt(0);
            //---------------------------------------------------------------------------------------------------
            LB_Citizenship.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Country);
            LB_Citizenship.DataTextField  = "Item";
            LB_Citizenship.DataValueField = "Value";
            LB_Citizenship.DataBind();
            LB_Citizenship.Items.RemoveAt(0);
            //---------------------------------------------------------------------------------------------------
            LB_CountryLiving.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Country);
            LB_CountryLiving.DataTextField  = "Item";
            LB_CountryLiving.DataValueField = "Value";
            LB_CountryLiving.DataBind();
            LB_CountryLiving.Items.RemoveAt(0);
            //---------------------------------------------------------------------------------------------------
            LB_Rasident_State.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.State);
            LB_Rasident_State.DataTextField  = "Item";
            LB_Rasident_State.DataValueField = "Value";
            LB_Rasident_State.DataBind();
            LB_Rasident_State.Items.RemoveAt(0);
            LB_Rasident_State.Items.Insert(0, "Any");
            //---------------------------------------------------------------------------------------------------
            LB_Rasident_Status.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.ResidenceStatus);
            LB_Rasident_Status.DataTextField  = "Item";
            LB_Rasident_Status.DataValueField = "Value";
            LB_Rasident_Status.DataBind();
            LB_Rasident_Status.Items.RemoveAt(0);
            LB_Rasident_Status.Items.Insert(0, "Any");
            //---------------------------------------------------------------------------------------------------
            DDL_ChDosham.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.HoroManglic);
            DDL_ChDosham.DataTextField  = "Item";
            DDL_ChDosham.DataValueField = "Value";
            DDL_ChDosham.DataBind();
            DDL_ChDosham.Items.RemoveAt(5);
            //---------------------------------------------------------------------------------------------------
            DDL_EathingHabits.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Diet);
            DDL_EathingHabits.DataTextField  = "Item";
            DDL_EathingHabits.DataValueField = "Value";
            DDL_EathingHabits.DataBind();
            //---------------------------------------------------------------------------------------------------
            Int16 Int16Counter;
            DDL_Height_min.Items.Insert(0, "-- Select --");
            DDL_Height_Max.Items.Insert(0, "-- Select --");
            for (Int16Counter = 90; Int16Counter <= 185; ++Int16Counter)
            {
                DDL_Height_min.Items.Insert(Int16Counter - 89, Int16Counter + " CM");
                DDL_Height_Max.Items.Insert(Int16Counter - 89, Int16Counter + 1 + " CM");
            }

            //---------------------------------------------------------------------------------------------------
            //Loading Member Informations
            HttpCookieCollection objHttpCookieCollection = Request.Cookies;
            HttpCookie           objHttpCookie           = objHttpCookieCollection.Get("MatCookie5639sb");
            //---------------------------------------------------------------------------------------------------
            string strApplicationID = Crypto.DeCrypto(objHttpCookie.Values["ApplicationID"]);
            //---------------------------------------------------------------------------------------------------
            MatMember objMember = new MatMember(true, strApplicationID, false, false, false, false, false, false, false, false, false, true);
            //---------------------------------------------------------------------------------------------------
            int i;
            //---------------------------------------------------------------------------------------------------
            string[] strARRAY = objMember.PP_LookingFor.Split('%');
            if (strARRAY[0].Length != 0)
            {
                foreach (string index in strARRAY)
                {
                    i = int.Parse(index);
                    LB_MaritalStatus.Items[i - 1].Selected = true;
                }
            }
            //---------------------------------------------------------------------------------------------------
            TB_Age_min.Text = objMember.PP_AgeMin.ToString();
            TB_Age_Max.Text = objMember.PP_AgeMax.ToString();
            //---------------------------------------------------------------------------------------------------
            strARRAY = objMember.PP_Complexion.Split('%');
            if (strARRAY[0].Length != 0)
            {
                foreach (string index in strARRAY)
                {
                    i = int.Parse(index);
                    LB_Complexion.Items[i - 1].Selected = true;
                }
            }
            //---------------------------------------------------------------------------------------------------
            switch (objMember.PP_HaveChildren)
            {
            case 1: RB_ChildrenDM.Checked = true;
                break;

            case 2: RB_ChildrenNO.Checked = true;
                break;

            case 3: RB_ChildrenYesLT.Checked = true;
                break;

            case 4: RB_ChildrenYesNLT.Checked = true;
                break;
            }
            //---------------------------------------------------------------------------------------------------
            DDL_Height_min.SelectedIndex = objMember.PP_HeightMin;
            DDL_Height_Max.SelectedIndex = objMember.PP_HeightMax;
            //---------------------------------------------------------------------------------------------------
            switch (objMember.PP_PhysicalStatus)
            {
            case 1: RB_phy_nor.Checked = true;
                break;

            case 2: RB_phy_Dis.Checked = true;
                break;

            case 3: RB_phy_DMater.Checked = true;
                break;
            }
            //---------------------------------------------------------------------------------------------------
            strARRAY = objMember.PP_MotherTongue.Split('%');

            if (strARRAY[0].Length != 0)
            {
                foreach (string index in strARRAY)
                {
                    i = int.Parse(index);
                    LB_MotherTongue.Items[i - 1].Selected = true;
                }
            }
            //---------------------------------------------------------------------------------------------------
            TB_Expectations.Text = objMember.MyExpectations;
            //---------------------------------------------------------------------------------------------------
            if (objMember.PP_Religion.IndexOf("##") >= 0)
            {
                CB_Religion_Any.Checked = true;
            }
            else
            {
                CB_Caste_Any.Checked = false;
                strARRAY             = objMember.PP_Religion.Split('%');
                if (strARRAY[0].Length != 0)
                {
                    foreach (string index in strARRAY)
                    {
                        i = int.Parse(index);
                        LB_Religion.Items[i - 1].Selected = true;
                    }
                    CB_Religion_Any.Checked = false;
                }
                else
                {
                    CB_Religion_Any.Checked = true;
                }
            }
            //---------------------------------------------------------------------------------------------------
            if (objMember.PP_Caste.IndexOf("##") >= 0)
            {
                CB_Caste_Any.Checked = true;
            }
            else
            {
                strARRAY = objMember.PP_Caste.Split('%');
                if (strARRAY[0].Length != 0)
                {
                    foreach (string index in strARRAY)
                    {
                        i = int.Parse(index);
                        LB_Caste.Items[i - 1].Selected = true;
                    }
                    CB_Caste_Any.Checked = false;
                }
                else
                {
                    CB_Caste_Any.Checked = true;
                }
            }
            //---------------------------------------------------------------------------------------------------
            DDL_ChDosham.SelectedIndex      = objMember.PP_Manglik;
            DDL_EathingHabits.SelectedIndex = objMember.Diet;
            //---------------------------------------------------------------------------------------------------
            if (objMember.PP_Education.IndexOf("##") >= 0)
            {
                CB_Education_Any.Checked = true;
            }
            else
            {
                strARRAY = objMember.PP_Education.Split('%');
                if (strARRAY[0].Length != 0)
                {
                    foreach (string index in strARRAY)
                    {
                        i = int.Parse(index);
                        LB_Education.Items[i - 1].Selected = true;
                    }
                    CB_Education_Any.Checked = false;
                }
                else
                {
                    CB_Education_Any.Checked = true;
                }
            }
            //---------------------------------------------------------------------------------------------------
            if (objMember.PP_EducationDetails.IndexOf("##") >= 0)
            {
                CB_EduDet.Checked = true;
            }
            else
            {
                strARRAY = objMember.PP_EducationDetails.Split('%');
                if (strARRAY[0].Length != 0)
                {
                    foreach (string index in strARRAY)
                    {
                        i = int.Parse(index);
                        LB_Edudetails.Items[i - 1].Selected = true;
                    }
                    CB_EduDet.Checked = false;
                }
                else
                {
                    CB_EduDet.Checked = true;
                }
            }
            //---------------------------------------------------------------------------------------------------
            LB_AnnulIncome.SelectedIndex = objMember.PP_AnnualIncome;
            //---------------------------------------------------------------------------------------------------
            if (objMember.PP_Occupation.IndexOf("##") >= 0)
            {
                CB_Occupation_any.Checked = true;
            }
            else
            {
                strARRAY = objMember.PP_Occupation.Split('%');
                if (strARRAY[0].Length != 0)
                {
                    foreach (string index in strARRAY)
                    {
                        i = int.Parse(index);
                        LB_Occupation.Items[i - 1].Selected = true;
                    }
                    CB_Occupation_any.Checked = false;
                }
                else
                {
                    CB_Occupation_any.Checked = true;
                }
            }
            //---------------------------------------------------------------------------------------------------
            if (objMember.PP_Citizenship.IndexOf("##") >= 0)
            {
                CB_IndianX.Checked = true;
            }
            else
            {
                strARRAY = objMember.PP_Citizenship.Split('%');
                if (strARRAY[0].Length != 0)
                {
                    foreach (string index in strARRAY)
                    {
                        i = int.Parse(index);
                        LB_Citizenship.Items[i - 1].Selected = true;
                    }
                    CB_IndianX.Checked = false;
                }
                else
                {
                    CB_IndianX.Checked = true;
                }
            }
            //---------------------------------------------------------------------------------------------------
            if (objMember.PP_LivingIn.IndexOf("##") >= 0)
            {
                CB_Indian.Checked = true;
            }
            else
            {
                strARRAY = objMember.PP_LivingIn.Split('%');
                if (strARRAY[0].Length != 0)
                {
                    foreach (string index in strARRAY)
                    {
                        i = int.Parse(index);
                        LB_CountryLiving.Items[i - 1].Selected = true;
                    }
                    CB_Indian.Checked = false;
                }
                else
                {
                    CB_Indian.Checked = true;
                }
            }
            //---------------------------------------------------------------------------------------------------
            if (objMember.PP_ResidingState.IndexOf("##") >= 0)
            {
                CB_StatesInIndia.Checked = false;
                TB_NonIndianState.Text   = objMember.PP_ResidingState.Replace("##", "");
            }
            else
            {
                if (objMember.PP_ResidingState.ToLower().IndexOf("any") >= 0)
                {
                    LB_Rasident_State.Items[0].Selected = true;
                    CB_StatesInIndia.Checked            = true;
                }
                else
                {
                    strARRAY = objMember.PP_ResidingState.Split('%');
                    if (strARRAY[0].Length != 0)
                    {
                        foreach (string index in strARRAY)
                        {
                            i = int.Parse(index);
                            LB_Rasident_State.Items[i - 1].Selected = true;
                        }
                        CB_StatesInIndia.Checked = true;
                    }
                    else
                    {
                        CB_StatesInIndia.Checked = false;
                    }
                }
            }
            //---------------------------------------------------------------------------------------------------
            if (objMember.PP_ResStatus.ToLower().IndexOf("any") >= 0)
            {
                LB_Rasident_Status.Items[0].Selected = true;
            }
            else
            {
                strARRAY = objMember.PP_ResStatus.Split('%');
                if (strARRAY[0].Length != 0)
                {
                    foreach (string index in strARRAY)
                    {
                        i = int.Parse(index);
                        LB_Rasident_Status.Items[i - 1].Selected = true;
                    }
                }
            }

            ////---------------------------------------------------------------------------------------------------
        }//if
        ////---------------------------------------------------------------------------------------------------
        else            // PostBack
        ////---------------------------------------------------------------------------------------------------
        {
            HttpCookieCollection objHttpCookieCollection = Request.Cookies;
            HttpCookie           objHttpCookie           = objHttpCookieCollection.Get("MatCookie5639sb");

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

            // Inserting data into database
            if (strApplicationID != null)
            {
                sbyte sbyteFlag = 0;
                sbyte sbyteChildrenStatus;
                sbyte sbytePhysicalStatus;

                //-------------------------------------------------------------------------------------------------------------
                if (RB_ChildrenNO.Checked)
                {
                    sbyteChildrenStatus = 1;
                }
                else if (RB_ChildrenYesLT.Checked)
                {
                    sbyteChildrenStatus = 2;
                }
                else if (RB_ChildrenYesNLT.Checked)
                {
                    sbyteChildrenStatus = 3;
                }
                else if (RB_ChildrenDM.Checked)
                {
                    sbyteChildrenStatus = 4;
                }
                else
                {
                    sbyteChildrenStatus = 0;
                }

                //-------------------------------------------------------------------------------------------------------------

                if (RB_phy_nor.Checked)
                {
                    sbytePhysicalStatus = 1;
                }
                else if (RB_phy_Dis.Checked)
                {
                    sbytePhysicalStatus = 2;
                }
                else if (RB_phy_DMater.Checked)
                {
                    sbytePhysicalStatus = 3;
                }
                else
                {
                    sbytePhysicalStatus = 0;
                }

                //-------------------------------------------------------------------------------------------------------------

                // Loading Values From LB

                string strMaritalStatusList = "";
                string Flag = "";
                // Marital Status
                foreach (ListItem objListItem in LB_MaritalStatus.Items)
                {
                    if (objListItem.Selected)
                    {
                        strMaritalStatusList += Flag + objListItem.Value;
                        Flag = "%";
                    }
                }
                //-------------------------------------------------------------------------------------------------------------
                // Complexion
                string strComplexionList = "";

                Flag = "";

                foreach (ListItem objListItem in LB_Complexion.Items)
                {
                    if (objListItem.Selected)
                    {
                        strComplexionList += Flag + objListItem.Value;
                        Flag = "%";
                    }
                }
                //-------------------------------------------------------------------------------------------------------------
                // Mother Tongue
                string strMotherTongueList = "";

                Flag = "";

                foreach (ListItem objListItem in LB_MotherTongue.Items)
                {
                    if (objListItem.Selected)
                    {
                        strMotherTongueList += Flag + objListItem.Value;
                        Flag = "%";
                    }
                }
                //-------------------------------------------------------------------------------------------------------------
                // Religion
                string strReligionList = "";
                if (CB_Religion_Any.Checked)
                {
                    strReligionList = "##";
                }
                else
                {
                    Flag = "";

                    foreach (ListItem objListItem in LB_Religion.Items)
                    {
                        if (objListItem.Selected)
                        {
                            strReligionList += Flag + objListItem.Value;
                            Flag             = "%";
                        }
                    }
                }
                //-------------------------------------------------------------------------------------------------------------
                //Caste
                string strCasteList = "";
                if (CB_Caste_Any.Checked)
                {
                    strCasteList = "##";
                }
                else
                {
                    Flag = "";

                    foreach (ListItem objListItem in LB_Caste.Items)
                    {
                        if (objListItem.Selected)
                        {
                            strCasteList += Flag + objListItem.Value;
                            Flag          = "%";
                        }
                    }
                }
                //-------------------------------------------------------------------------------------------------------------
                // Education
                string strEducationList = "";
                if (CB_Education_Any.Checked)
                {
                    strEducationList = "##";
                }
                else
                {
                    Flag = "";

                    foreach (ListItem objListItem in LB_Education.Items)
                    {
                        if (objListItem.Selected)
                        {
                            strEducationList += Flag + objListItem.Value;
                            Flag              = "%";
                        }
                    }
                }
                //-------------------------------------------------------------------------------------------------------------
                // EduDetails
                string strEduDetailsList = "";
                if (CB_EduDet.Checked)
                {
                    strEduDetailsList = "##";
                }
                else
                {
                    Flag = "";

                    foreach (ListItem objListItem in LB_Edudetails.Items)
                    {
                        if (objListItem.Selected)
                        {
                            strEduDetailsList += Flag + objListItem.Value;
                            Flag = "%";
                        }
                    }
                }
                //-------------------------------------------------------------------------------------------------------------
                // Occupation
                string strOccupationList = "";
                if (CB_Occupation_any.Checked)
                {
                    strOccupationList = "##";
                }
                else
                {
                    Flag = "";

                    foreach (ListItem objListItem in LB_Occupation.Items)
                    {
                        if (objListItem.Selected)
                        {
                            strOccupationList += Flag + objListItem.Value;
                            Flag = "%";
                        }
                    }
                }
                //-------------------------------------------------------------------------------------------------------------
                // Citizenship
                string strCitizenshipList = "";
                if (CB_IndianX.Checked)
                {
                    strCitizenshipList = "##";
                }
                else
                {
                    Flag = "";

                    foreach (ListItem objListItem in LB_Citizenship.Items)
                    {
                        if (objListItem.Selected)
                        {
                            strCitizenshipList += Flag + objListItem.Value;
                            Flag = "%";
                        }
                    }
                }
                //-------------------------------------------------------------------------------------------------------------
                // Country Living in
                string strCountryLivinginList = "";
                if (CB_Indian.Checked)
                {
                    strCountryLivinginList = "##";
                }
                else
                {
                    Flag = "";

                    foreach (ListItem objListItem in LB_Citizenship.Items)
                    {
                        if (objListItem.Selected)
                        {
                            strCountryLivinginList += Flag + objListItem.Value;
                            Flag = "%";
                        }
                    }
                }
                //-------------------------------------------------------------------------------------------------------------
                // Country Living in
                string strStateList = "";
                if (!CB_StatesInIndia.Checked)
                {
                    strStateList = TB_NonIndianState.Text + "##";
                }
                else
                {
                    Flag = "";

                    foreach (ListItem objListItem in LB_Rasident_State.Items)
                    {
                        if (objListItem.Selected)
                        {
                            strStateList += Flag + objListItem.Value;
                            Flag          = "%";
                        }
                    }
                }
                //-------------------------------------------------------------------------------------------------------------
                //Residential Status
                string strResidentStatus = "";
                Flag = "";
                foreach (ListItem objListItem in LB_Rasident_Status.Items)
                {
                    if (objListItem.Selected)
                    {
                        strResidentStatus += Flag + objListItem.Value;
                        Flag = "%";
                    }
                }
                //--------------------------------------------------------------------------------------------------------------
                sbyteFlag = MatrimonialProfileManager.InsertMyExpectation(strApplicationID, TB_Expectations.Text);
                //--------------------------------------------------------------------------------------------------------------
                sbyteFlag += MatrimonialProfileManager.InsertPartnerPreferance(strApplicationID, strMaritalStatusList, sbyte.Parse(TB_Age_min.Text),
                                                                               sbyte.Parse(TB_Age_Max.Text), strComplexionList, sbyteChildrenStatus, (DDL_Height_min.SelectedIndex + 89), (DDL_Height_Max.SelectedIndex + 89),
                                                                               sbytePhysicalStatus, strMotherTongueList, strReligionList, strCasteList, DDL_ChDosham.SelectedIndex, DDL_EathingHabits.SelectedIndex,
                                                                               strEducationList, strEduDetailsList, LB_AnnulIncome.SelectedIndex, strOccupationList, strCitizenshipList, strCountryLivinginList,
                                                                               strStateList, strResidentStatus);
                //--------------------------------------------------------------------------------------------------------------

                if (sbyteFlag == 2)
                {
                    Response.Redirect("MyAlbum.aspx");
                }
                else
                {
                    Server.Transfer("../Extras/ErrorReport.aspx");
                }
            }  //postbak
        }
    }
Example #17
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            // Check Application ID

            string strMatID         = null;
            string strApplicationID = null;
            try
            {
                HttpCookieCollection objHttpCookieCollection = Request.Cookies;
                HttpCookie           objHttpCookie           = objHttpCookieCollection.Get("MatCookie5639sb");

                strMatID = Crypto.DeCrypto(objHttpCookie.Values[2]);

                L_MID.Text       = strMatID.ToUpper();
                strApplicationID = Crypto.DeCrypto(objHttpCookie.Values["ApplicationID"]);


                if (Crypto.DeCrypto(objHttpCookie.Values["UserType"]) == "PaidMember")
                {
                    L_Membership.Text        = "Paid Member";
                    HL_Message_send.Enabled  = true;
                    HL_Pass_Received.Enabled = true;
                }
                else
                {
                    L_Membership.Text = "Free Member";
                }
            }
            catch (NullReferenceException)
            {
                Response.Redirect("../Extras/ErrorReport.aspx?id=Cookie");
            }
            catch (Exception objEX)
            {
                ErrorLog.WriteErrorLog("Profile.aspx", objEX);
            }

            // Creating Profile Object

            UserProfile objProfile = new UserProfile(strMatID);


            // Loading userInformations

            L_Name.Text = objProfile.Name;
            this.Title  = WebConfig.GetValues("fname") + " Profile No : " + strMatID + " - " + objProfile.Name;

            // Loading dates

            L_LogIn_Created.Text = objProfile.IDCreatedOn;

            L_LogIn_last.Text = objProfile.LastLogInDate;

            L_Clicks.Text = objProfile.Clicks.ToString();


            /// check image is present in data base

            if (objProfile.IsPhoto)
            {
                /// load image form data base
                Img_MyPhoto.ImageUrl = "../Extras/imagecon.aspx?matid=" + strMatID + "&id=1";
                /// set check list image -> yes

                IMG_Photo.ImageUrl = "../Resources/yes.gif";
                //is it password protected
                if (objProfile.IsPhotoProtected)
                {
                    IMG_PhotoPRotect.ImageUrl = "../Resources/yes.gif";
                }
                //Checks does horoscope uploaded
                if (objProfile.IsHoroscope)
                {
                    IMG_Horoscope.ImageUrl = "../Resources/yes.gif";

                    //is it password protected
                    if (objProfile.IsHoroScopeProtected)
                    {
                        IMG_Horo_Protexted.ImageUrl = "../Resources/yes.gif";
                    }
                }
            }
            // Resent Visitors
            string[] Visitors = MatrimonialProfileManager.GetVisitersList(strMatID);
            if (Visitors != null)
            {
                //seting visibility
                if (Visitors[0] != null)
                {
                    HyperLink1.Visible     = true;;
                    HyperLink1.NavigateUrl = "../MyProfile/" + Visitors[0] + ".aspx";
                    HyperLink1.Text        = Visitors[0].ToUpper();
                }
                //seting visibility
                if (Visitors[1] != null)
                {
                    HyperLink2.Visible     = true;;
                    HyperLink2.NavigateUrl = "../MyProfile/" + Visitors[1] + ".aspx";
                    HyperLink2.Text        = Visitors[2].ToUpper();
                }
                //seting visibility
                if (Visitors[2] != null)
                {
                    HyperLink3.Visible     = true;;
                    HyperLink3.NavigateUrl = "../MyProfile/" + Visitors[2] + ".aspx";
                    HyperLink3.Text        = Visitors[2].ToUpper();
                }
                //seting visibility
                if (Visitors[3] != null)
                {
                    HyperLink4.Visible     = true;;
                    HyperLink4.NavigateUrl = "../MyProfile/" + Visitors[3] + ".aspx";
                    HyperLink4.Text        = Visitors[3].ToUpper();
                }
                //seting visibility
                if (Visitors[4] != null)
                {
                    HyperLink5.Visible     = true;;
                    HyperLink5.NavigateUrl = "../MyProfile/" + Visitors[4] + ".aspx";
                    HyperLink5.Text        = Visitors[4].ToUpper();
                }
                //seting visibility
                if (Visitors[5] != null)
                {
                    HyperLink6.Visible     = true;;
                    HyperLink6.NavigateUrl = "../MyProfile/" + Visitors[5] + ".aspx";
                    HyperLink6.Text        = Visitors[5].ToUpper();
                }
                //seting visibility
                if (Visitors[6] != null)
                {
                    HyperLink7.Visible     = true;;
                    HyperLink7.NavigateUrl = "../MyProfile/" + Visitors[6] + ".aspx";
                    HyperLink7.Text        = Visitors[6].ToUpper();
                }
            }
            /// Load Interest items
            // Express Interest Received
            L_Int_R_A.Text = objProfile.ReceivedInterestAccepted.ToString();
            L_Int_R_D.Text = objProfile.ReceivedInterestDeclined.ToString();
            L_Int_R_P.Text = objProfile.ReceivedInterestPending.ToString();

            // Express Interest Sent

            L_Int_S_A.Text = objProfile.SendInterestAccepted.ToString();
            L_Int_S_D.Text = objProfile.SendInterestDeclined.ToString();
            L_Int_S_P.Text = objProfile.SendInterestPending.ToString();

            //Personalized Message

            L_Mes_Inbox.Text  = objProfile.ReceivedMessage.ToString();
            L_Mes_OutBox.Text = objProfile.SendMessage.ToString();

            //Photo/Horoscope Password

            L_PW_Req.Text = objProfile.ReceivedPassword.ToString();
            L_PW_Rec.Text = objProfile.RequestPassword.ToString();

            //Book marks

            L_BM_Links.Text = objProfile.NoOfLinks.ToString();


            /// Writing Meta Tags
            ///
            // 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);
        }   //if
    }
Example #18
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);

            /// Text Counter Initiallisation

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

            TB_Expectations.Attributes.Add("onKeyUp", "javascript:document.getElementById('" + txtCount.ClientID + "').setAttribute('value', (" + TB_Expectations.MaxLength +
                                           " - parseInt(document.getElementById('" + TB_Expectations.ClientID + "').getAttribute('value').length)));");

            //load ddls
            //Getting Connection String

            //Connect To database
            LB_MaritalStatus.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.MaritalStatus);
            LB_MaritalStatus.DataTextField  = "Item";
            LB_MaritalStatus.DataValueField = "Value";
            LB_MaritalStatus.DataBind();
            LB_MaritalStatus.Items.RemoveAt(0);

            LB_Complexion.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Complexion);
            LB_Complexion.DataTextField  = "Item";
            LB_Complexion.DataValueField = "Value";
            LB_Complexion.DataBind();
            LB_Complexion.Items.RemoveAt(0);

            LB_MotherTongue.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.MotherTongue);
            LB_MotherTongue.DataTextField  = "Item";
            LB_MotherTongue.DataValueField = "Value";
            LB_MotherTongue.DataBind();
            LB_MotherTongue.Items.RemoveAt(0);

            LB_Religion.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Religion);
            LB_Religion.DataTextField  = "Item";
            LB_Religion.DataValueField = "Value";
            LB_Religion.DataBind();
            LB_Religion.Items.RemoveAt(0);

            LB_Caste.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Cast);
            LB_Caste.DataTextField  = "Item";
            LB_Caste.DataValueField = "Value";
            LB_Caste.DataBind();
            LB_Caste.Items.RemoveAt(0);
            LB_Caste.Items.RemoveAt(0);
            LB_Caste.Items.Insert(0, "Any");

            LB_Education.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Education);
            LB_Education.DataTextField  = "Item";
            LB_Education.DataValueField = "Value";
            LB_Education.DataBind();
            LB_Education.Items.RemoveAt(0);
            LB_Education.Items.Insert(0, "Any");


            LB_Edudetails.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.EduDetails);
            LB_Edudetails.DataTextField  = "Item";
            LB_Edudetails.DataValueField = "Value";
            LB_Edudetails.DataBind();
            LB_Edudetails.Items.RemoveAt(0);
            LB_Edudetails.Items.Insert(0, "Any");

            LB_AnnulIncome.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.AnnualIncomeRange);
            LB_AnnulIncome.DataTextField  = "Item";
            LB_AnnulIncome.DataValueField = "Value";
            LB_AnnulIncome.DataBind();
            LB_AnnulIncome.Items.RemoveAt(0);

            LB_Occupation.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Occupation);
            LB_Occupation.DataTextField  = "Item";
            LB_Occupation.DataValueField = "Value";
            LB_Occupation.DataBind();
            LB_Occupation.Items.RemoveAt(0);
            LB_Occupation.Items.Insert(0, "Any");

            LB_Citizenship.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Country);
            LB_Citizenship.DataTextField  = "Item";
            LB_Citizenship.DataValueField = "Value";
            LB_Citizenship.DataBind();
            LB_Citizenship.Items.RemoveAt(0);
            LB_Citizenship.Items.Insert(0, "Any");

            LB_CountryLiving.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Country);
            LB_CountryLiving.DataTextField  = "Item";
            LB_CountryLiving.DataValueField = "Value";
            LB_CountryLiving.DataBind();
            LB_CountryLiving.Items.RemoveAt(0);
            LB_CountryLiving.Items.Insert(0, "Any");

            LB_Rasident_State.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.State);
            LB_Rasident_State.DataTextField  = "Item";
            LB_Rasident_State.DataValueField = "Value";
            LB_Rasident_State.DataBind();
            LB_Rasident_State.Items.RemoveAt(0);
            LB_Rasident_State.Items.Insert(0, "Any");

            LB_Rasident_Status.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.ResidenceStatus);
            LB_Rasident_Status.DataTextField  = "Item";
            LB_Rasident_Status.DataValueField = "Value";
            LB_Rasident_Status.DataBind();
            LB_Rasident_Status.Items.RemoveAt(0);
            LB_Rasident_Status.Items.Insert(0, "Any");

            DDL_ChDosham.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.HoroManglic);
            DDL_ChDosham.DataTextField  = "Item";
            DDL_ChDosham.DataValueField = "Value";
            DDL_ChDosham.DataBind();
            DDL_ChDosham.Items.RemoveAt(5);


            DDL_EathingHabits.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Diet);
            DDL_EathingHabits.DataTextField  = "Item";
            DDL_EathingHabits.DataValueField = "Value";
            DDL_EathingHabits.DataBind();

            Int16 Int16Counter;
            DDL_Height_min.Items.Insert(0, "-- Select --");
            DDL_Height_Max.Items.Insert(0, "-- Select --");
            for (Int16Counter = 90; Int16Counter <= 185; ++Int16Counter)
            {
                DDL_Height_min.Items.Insert(Int16Counter - 89, Int16Counter + " CM");
                DDL_Height_Max.Items.Insert(Int16Counter - 89, Int16Counter + 1 + " CM");
            }


            TB_NonIndianState.Attributes.Add("visible", "false");
        }
        else
        {
            HttpCookieCollection objHttpCookieCollection = Request.Cookies;
            HttpCookie           objHttpCookie           = objHttpCookieCollection.Get("MatRegInfo");

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

            // Inserting data into database
            if (strApplicationID != null)
            {
                sbyte sbyteFlag = 0;
                sbyte sbyteChildrenStatus;
                sbyte sbytePhysicalStatus;

                //-------------------------------------------------------------------------------------------------------------
                if (RB_ChildrenNO.Checked)
                {
                    sbyteChildrenStatus = 1;
                }
                else if (RB_ChildrenYesLT.Checked)
                {
                    sbyteChildrenStatus = 2;
                }
                else if (RB_ChildrenYesNLT.Checked)
                {
                    sbyteChildrenStatus = 3;
                }
                else if (RB_ChildrenDM.Checked)
                {
                    sbyteChildrenStatus = 4;
                }
                else
                {
                    sbyteChildrenStatus = 0;
                }

                //-------------------------------------------------------------------------------------------------------------

                if (RB_phy_nor.Checked)
                {
                    sbytePhysicalStatus = 1;
                }
                else if (RB_phy_Dis.Checked)
                {
                    sbytePhysicalStatus = 2;
                }
                else if (RB_phy_DMater.Checked)
                {
                    sbytePhysicalStatus = 3;
                }
                else
                {
                    sbytePhysicalStatus = 0;
                }

                //-------------------------------------------------------------------------------------------------------------

                // Loading Values From LB

                string strMaritalStatusList = "";
                string Flag = "";
                // Marital Status
                foreach (ListItem objListItem in LB_MaritalStatus.Items)
                {
                    if (objListItem.Selected)
                    {
                        strMaritalStatusList += Flag + objListItem.Value;
                        Flag = "%";
                    }
                }
                //-------------------------------------------------------------------------------------------------------------
                // Complexion
                string strComplexionList = "";

                Flag = "";

                foreach (ListItem objListItem in LB_Complexion.Items)
                {
                    if (objListItem.Selected)
                    {
                        strComplexionList += Flag + objListItem.Value;
                        Flag = "%";
                    }
                }
                //-------------------------------------------------------------------------------------------------------------
                // Mother Tongue
                string strMotherTongueList = "";

                Flag = "";

                foreach (ListItem objListItem in LB_MotherTongue.Items)
                {
                    if (objListItem.Selected)
                    {
                        strMotherTongueList += Flag + objListItem.Value;
                        Flag = "%";
                    }
                }
                //-------------------------------------------------------------------------------------------------------------
                // Religion
                string strReligionList = "";
                if (CB_Religion_Any.Checked)
                {
                    strReligionList = "##";
                }
                else
                {
                    Flag = "";

                    foreach (ListItem objListItem in LB_Religion.Items)
                    {
                        if (objListItem.Selected)
                        {
                            strReligionList += Flag + objListItem.Value;
                            Flag             = "%";
                        }
                    }
                }
                //-------------------------------------------------------------------------------------------------------------
                //Caste
                string strCasteList = "";
                if (CB_Caste_Any.Checked)
                {
                    strCasteList = "##";
                }
                else
                {
                    Flag = "";

                    foreach (ListItem objListItem in LB_Caste.Items)
                    {
                        if (objListItem.Selected)
                        {
                            strCasteList += Flag + objListItem.Value;
                            Flag          = "%";
                        }
                    }
                }
                //-------------------------------------------------------------------------------------------------------------
                // Education
                string strEducationList = "";
                if (CB_Education_Any.Checked)
                {
                    strEducationList = "##";
                }
                else
                {
                    Flag = "";

                    foreach (ListItem objListItem in LB_Education.Items)
                    {
                        if (objListItem.Selected)
                        {
                            strEducationList += Flag + objListItem.Value;
                            Flag              = "%";
                        }
                    }
                }
                //-------------------------------------------------------------------------------------------------------------
                // EduDetails
                string strEduDetailsList = "";
                if (CB_EduDet.Checked)
                {
                    strEduDetailsList = "##";
                }
                else
                {
                    Flag = "";

                    foreach (ListItem objListItem in LB_Edudetails.Items)
                    {
                        if (objListItem.Selected)
                        {
                            strEduDetailsList += Flag + objListItem.Value;
                            Flag = "%";
                        }
                    }
                }
                //-------------------------------------------------------------------------------------------------------------
                // Occupation
                string strOccupationList = "";
                if (CB_Occupation_any.Checked)
                {
                    strOccupationList = "##";
                }
                else
                {
                    Flag = "";

                    foreach (ListItem objListItem in LB_Occupation.Items)
                    {
                        if (objListItem.Selected)
                        {
                            strOccupationList += Flag + objListItem.Value;
                            Flag = "%";
                        }
                    }
                }
                //-------------------------------------------------------------------------------------------------------------
                // Citizenship
                string strCitizenshipList = "";
                if (CB_IndianX.Checked)
                {
                    strCitizenshipList = "##";
                }
                else
                {
                    Flag = "";

                    foreach (ListItem objListItem in LB_Citizenship.Items)
                    {
                        if (objListItem.Selected)
                        {
                            strCitizenshipList += Flag + objListItem.Value;
                            Flag = "%";
                        }
                    }
                }
                //-------------------------------------------------------------------------------------------------------------
                // Country Living in
                string strCountryLivinginList = "";
                if (CB_Indian.Checked)
                {
                    strCountryLivinginList = "##";
                }
                else
                {
                    Flag = "";

                    foreach (ListItem objListItem in LB_Citizenship.Items)
                    {
                        if (objListItem.Selected)
                        {
                            strCountryLivinginList += Flag + objListItem.Value;
                            Flag = "%";
                        }
                    }
                }
                //-------------------------------------------------------------------------------------------------------------
                // Country Living in
                string strStateList = "";
                if (!CB_StatesInIndia.Checked)
                {
                    strStateList = TB_NonIndianState.Text + "#";
                }
                else
                {
                    Flag = "";

                    foreach (ListItem objListItem in LB_Rasident_State.Items)
                    {
                        if (objListItem.Selected)
                        {
                            strStateList += Flag + objListItem.Value;
                            Flag          = "%";
                        }
                    }
                }
                //-------------------------------------------------------------------------------------------------------------
                //Residential Status
                string strResidentStatus = "";
                Flag = "";
                foreach (ListItem objListItem in LB_Rasident_Status.Items)
                {
                    if (objListItem.Selected)
                    {
                        strResidentStatus += Flag + objListItem.Value;
                        Flag = "%";
                    }
                }
                //--------------------------------------------------------------------------------------------------------------
                sbyteFlag = MatrimonialProfileManager.InsertMyExpectation(strApplicationID, TB_Expectations.Text);
                //--------------------------------------------------------------------------------------------------------------
                sbyteFlag += MatrimonialProfileManager.InsertPartnerPreferance(strApplicationID, strMaritalStatusList, sbyte.Parse(TB_Age_min.Text),
                                                                               sbyte.Parse(TB_Age_Max.Text), strComplexionList, sbyteChildrenStatus, (DDL_Height_min.SelectedIndex + 89), (DDL_Height_Max.SelectedIndex + 89),
                                                                               sbytePhysicalStatus, strMotherTongueList, strReligionList, strCasteList, DDL_ChDosham.SelectedIndex, DDL_EathingHabits.SelectedIndex,
                                                                               strEducationList, strEduDetailsList, LB_AnnulIncome.SelectedIndex, strOccupationList, strCitizenshipList, strCountryLivinginList,
                                                                               strStateList, strResidentStatus);
                //--------------------------------------------------------------------------------------------------------------

                if (sbyteFlag == 2)
                {
                    MatrimonialMemberShip.UpdateIndex(strApplicationID);
                    Server.Transfer("RegistrationConfirm.aspx");
                }
                else
                {
                    Server.Transfer("../Extras/ErrorReport.aspx");
                }
            }
            else
            {
            }
        }
    }
    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);

            //Loading Controls

            // ----------------------------------------------------------------------------------------------
            DDL_Education.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Education);
            DDL_Education.DataTextField  = "Item";
            DDL_Education.DataValueField = "Value";
            DDL_Education.DataBind();
            // ----------------------------------------------------------------------------------------------
            DDL_EduDetails.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.EduDetails);
            DDL_EduDetails.DataTextField  = "Item";
            DDL_EduDetails.DataValueField = "Value";
            DDL_EduDetails.DataBind();
            // ----------------------------------------------------------------------------------------------
            DDL_AnnualIncome.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.AnnualIncomeRange);
            DDL_AnnualIncome.DataTextField  = "Item";
            DDL_AnnualIncome.DataValueField = "Value";
            DDL_AnnualIncome.DataBind();
            // ----------------------------------------------------------------------------------------------
            DDL_Currency.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Currency);
            DDL_Currency.DataTextField  = "Item";
            DDL_Currency.DataValueField = "Value";
            DDL_Currency.DataBind();
            // ----------------------------------------------------------------------------------------------
            DDL_Occupation.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Occupation);
            DDL_Occupation.DataTextField  = "Item";
            DDL_Occupation.DataValueField = "Value";
            DDL_Occupation.DataBind();
            // ----------------------------------------------------------------------------------------------
            DDL_EmpIn.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.EmployedIn);
            DDL_EmpIn.DataTextField  = "Item";
            DDL_EmpIn.DataValueField = "Value";
            DDL_EmpIn.DataBind();
            // ----------------------------------------------------------------------------------------------
            DDL_BGroup.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.BloodGroup);
            DDL_BGroup.DataTextField  = "Item";
            DDL_BGroup.DataValueField = "Value";
            DDL_BGroup.DataBind();

            DDL_Diet.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Diet);
            DDL_Diet.DataTextField  = "Item";
            DDL_Diet.DataValueField = "Value";
            DDL_Diet.DataBind();
            // ----------------------------------------------------------------------------------------------
            DDL_Country.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Country);;
            DDL_Country.DataTextField  = "Item";
            DDL_Country.DataValueField = "Value";
            DDL_Country.DataBind();
            // ----------------------------------------------------------------------------------------------
            DDL_ResidenceIn.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.Country);;
            DDL_ResidenceIn.DataTextField  = "Item";
            DDL_ResidenceIn.DataValueField = "Value";
            DDL_ResidenceIn.DataBind();
            // ----------------------------------------------------------------------------------------------
            DDL_State.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.State);;
            DDL_State.DataTextField  = "Item";
            DDL_State.DataValueField = "Value";
            DDL_State.DataBind();
            // ----------------------------------------------------------------------------------------------
            DDL_ResidentialStatus.DataSource     = ControlDataLoader.DataForLoadingControls(ControlDataLoader.ControlType.ResidenceStatus);;
            DDL_ResidentialStatus.DataTextField  = "Item";
            DDL_ResidentialStatus.DataValueField = "Value";
            DDL_ResidentialStatus.DataBind();
            // ----------------------------------------------------------------------------------------------
            short shortCounter;
            DDL_Weight.Items.Insert(0, "-- Select --");
            for (shortCounter = 40; shortCounter <= 140; ++shortCounter)
            {
                DDL_Weight.Items.Add(shortCounter + " KG");
            }


            // ----------------------------------------------------------------------------------------------
            // Lodig selections
            // ----------------------------------------------------------------------------------------------
            // Getting applicationID from Cookie
            HttpCookieCollection objHttpCookieCollection = Request.Cookies;
            HttpCookie           objHttpCookie           = objHttpCookieCollection.Get("MatCookie5639sb");

            string strApplicationID = Crypto.DeCrypto(objHttpCookie.Values["ApplicationID"]);
            //If Cookie is working
            if (strApplicationID != null)
            {
                //Get Member Informations
                MatMember objMember = new MatMember(true, strApplicationID, false, false, false, true, true, true, false, false, false, false);
                DDL_Education.SelectedIndex    = objMember.Education;
                DDL_EduDetails.SelectedIndex   = objMember.EduDetails;
                DDL_AnnualIncome.SelectedIndex = objMember.AnualIncome;
                DDL_Currency.SelectedIndex     = objMember.IncomeIn;
                DDL_Occupation.SelectedIndex   = objMember.Occupation;
                DDL_EmpIn.SelectedIndex        = objMember.EmployedIn;
                // ----------------------------------------------------------------------------------------------
                L_Height.Text            = objMember.Height.ToString() + " Cm";;
                DDL_Weight.SelectedIndex = objMember.Weight - 40;
                DDL_BGroup.SelectedIndex = objMember.BloodGroup;
                L_Complexion.Text        = ControlDataLoader.GetIndexValue(ControlDataLoader.ControlType.Complexion, objMember.Complexion);
                switch (objMember.BodyType)
                {
                case 1:
                    RB_BType_Slim.Checked = true;
                    break;

                case 2:
                    RB_BType_Avg.Checked = true;
                    break;

                case 3:
                    RB_BType_Ath.Checked = true;
                    break;

                case 4:
                    RB_BType_Heavy.Checked = true;
                    break;

                default:
                    break;
                }
                // ----------------------------------------------------------------------------------------------
                DDL_Diet.SelectedIndex = objMember.Diet;

                switch (objMember.Smoke)
                {
                case 1:
                    RB_Smoke_no.Checked = true;
                    break;

                case 2:
                    RB_Smoke_Yes.Checked = true;
                    break;

                case 3:
                    RB_Smoke_Occ.Checked = true;
                    break;

                default:
                    break;
                }
                // ----------------------------------------------------------------------------------------------
                switch (objMember.Drink)
                {
                case 1:
                    RB_Drink_No.Checked = true;
                    break;

                case 2:
                    RB_Drink_Yes.Checked = true;
                    break;

                case 3:
                    RB_Drink_Occ.Checked = true;
                    break;

                default:
                    break;
                }
                // ----------------------------------------------------------------------------------------------
                //Contact Details
                // ----------------------------------------------------------------------------------------------
                TB_Address.Text = objMember.Address;

                DDL_Country.SelectedIndex = objMember.Country;

                DDL_State.SelectedIndex = objMember.State;

                TB_City.Text = objMember.City;

                DDL_ResidenceIn.SelectedIndex = objMember.Residence;

                DDL_ResidentialStatus.SelectedIndex = objMember.ResidenceType;

                TB_Phone_ISD.Text = "+" + objMember.ISDCode.ToString();
                TB_Phone_STD.Text = objMember.AreaCode.ToString();
                TB_Phone_NO.Text  = objMember.PhoneNo.ToString();

                TB_Phone_Mobile.Text = objMember.MobileNO.ToString();

                TB_RCity.Text = objMember.ResidenceCity;

                objMember = null;
                // ----------------------------------------------------------------------------------------------
            }//If StrApplicationID != Null
        }   //if
        else
        {
            sbyte  sbyteFlag = 0;
            string strApplicationID;
            try
            {
                HttpCookieCollection objHttpCookieCollection = Request.Cookies;
                HttpCookie           objHttpCookie           = objHttpCookieCollection.Get("MatCookie5639sb");

                strApplicationID = Crypto.DeCrypto(objHttpCookie.Values["ApplicationID"]);
                if (strApplicationID != null)
                {
                    //Inserting  Education and Occupation
                    sbyteFlag = MatrimonialProfileManager.UpdateEducationalInfo(strApplicationID, (sbyte)DDL_Education.SelectedIndex,
                                                                                (sbyte)DDL_EduDetails.SelectedIndex, (sbyte)DDL_AnnualIncome.SelectedIndex,
                                                                                (short)DDL_Currency.SelectedIndex, (sbyte)DDL_Occupation.SelectedIndex,
                                                                                (sbyte)DDL_EmpIn.SelectedIndex);

                    // setting Physical Attributes

                    sbyte sbyteBodyType = 0;
                    sbyte sbyteSmoke    = 0;
                    sbyte sbyteDrink    = 0;

                    if (RB_BType_Slim.Checked)
                    {
                        sbyteBodyType = 1;
                    }
                    else if (RB_BType_Avg.Checked)
                    {
                        sbyteBodyType = 2;
                    }
                    else if (RB_BType_Ath.Checked)
                    {
                        sbyteBodyType = 3;
                    }
                    else if (RB_BType_Heavy.Checked)
                    {
                        sbyteBodyType = 4;
                    }

                    //Smoking Habite
                    if (RB_Smoke_no.Checked)
                    {
                        sbyteSmoke = 1;
                    }
                    else if (RB_Smoke_Yes.Checked)
                    {
                        sbyteSmoke = 2;
                    }
                    else if (RB_Smoke_Occ.Checked)
                    {
                        sbyteSmoke = 3;
                    }

                    //Drinking Habit
                    if (RB_Drink_No.Checked)
                    {
                        sbyteDrink = 1;
                    }
                    else if (RB_Drink_Yes.Checked)
                    {
                        sbyteDrink = 2;
                    }
                    else if (RB_Drink_Occ.Checked)
                    {
                        sbyteDrink = 3;
                    }

                    // ----------------------------------------------------------------------------------------------
                    //Inserting Physical Attributes
                    sbyteFlag += MatrimonialProfileManager.UpdatePhysicalInfo(strApplicationID,
                                                                              (short)DDL_Weight.SelectedIndex, (sbyte)DDL_BGroup.SelectedIndex, sbyteBodyType,
                                                                              (sbyte)DDL_Diet.SelectedIndex, sbyteSmoke, sbyteDrink);
                    // ----------------------------------------------------------------------------------------------
                    //Setting Contact Details
                    sbyteFlag += MatrimonialProfileManager.UpdateContactInfo(strApplicationID, TB_Address.Text, (short)DDL_Country.SelectedIndex,
                                                                             (sbyte)DDL_State.SelectedIndex, TB_City.Text, TB_Phone_NO.Text, TB_Phone_STD.Text, TB_Phone_ISD.Text,
                                                                             TB_Phone_Mobile.Text, (sbyte)DDL_ResidenceIn.SelectedIndex, (sbyte)DDL_ResidentialStatus.SelectedIndex,
                                                                             TB_RCity.Text);
                    // ----------------------------------------------------------------------------------------------
                }

                if (sbyteFlag == 3)// Every module is updated correctly
                {
                    Response.Redirect("EditProfile-S3.aspx");
                }
                else// Some have some error
                {
                    Server.Transfer("../Extras/ErrorReport.aspx");
                }
            }
            catch (Exception Ex)//Oops Some Error Happend
            {
                ErrorLog.WriteErrorLog("Member-EditProfile S2-PB", Ex);
                Server.Transfer("../Extras/ErrorReport.aspx?id=Cookie");
            }
        }//postbak
    }
    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";
            }
        }
    }