Example #1
0
        protected void GetContactDetailByContactID()
        {
            CustomProfile         profile        = CustomProfile.GetProfile();
            iUCCommonFilterClient UCCommonFilter = new iUCCommonFilterClient();

            try
            {
                tAddress conper = new tAddress();
                conper = UCCommonFilter.GetAddressDetailsByID(long.Parse(hdnConID.Value), profile.DBConnection._constr);
                VW_GetUserLocation LocDetail = UCCommonFilter.GetLocationDetailsByID(long.Parse(hdnConID.Value), profile.DBConnection._constr);
                btnSave.Visible = true;
                if (sessionID == null)
                {
                    sessionID = Session.SessionID;
                }
                if (LocDetail.AddressLine1 != null)
                {
                    txtAddress.Text = LocDetail.AddressLine1.ToString();
                }
                if (LocDetail.LocationCode != null)
                {
                    txtLocationCode.Text = LocDetail.LocationCode.ToString();
                }
                txtLocationCode.Enabled = false;
                if (LocDetail.LocationName != null)
                {
                    txtLocationName.Text = LocDetail.LocationName.ToString();
                }
                txtLocationName.Enabled = false;
                if (LocDetail.Name != null)
                {
                    txtContactName.Text = LocDetail.Name.ToString();
                }
                if (LocDetail.MobileNo != null)
                {
                    txtContactNo.Text = LocDetail.MobileNo.ToString();
                }
                if (LocDetail.EmailID != null)
                {
                    txtEmailID.Text = LocDetail.EmailID.ToString();
                }


                // Page.ClientScript.RegisterStartupScript(GetType(), "fillCountry1" + sessionID, "setCountry('India','Maharashtra','0','0');", true);
                // Page.ClientScript.RegisterStartupScript(GetType(), "fillCountry1" + sessionID, "setCountry('" + conper.County + "','" + conper.State + "','0','0');", true);
                // Page.ClientScript.RegisterStartupScript(GetType(), "fillCountry" + sessionID, "setCountry('" + conper.County + "','" + conper.State + "','" + conper.Zone + "','" + conper.SubZone + "');", true);
            }
            catch (System.Exception ex)
            {
                Login.Profile.ErrorHandling(ex, this, "AddEditSearchAddress", "GetContactDetailByContactID");
            }
            finally
            {
                UCCommonFilter.Close();
            }
        }
Example #2
0
        protected void GetContactDetailByContactID()
        {
            CustomProfile         profile        = CustomProfile.GetProfile();
            iUCCommonFilterClient UCCommonFilter = new iUCCommonFilterClient();

            try
            {
                tAddress conper = new tAddress();
                conper = UCCommonFilter.GetAddressDetailsByID(long.Parse(hdnConID.Value), profile.DBConnection._constr);
                if (sessionID == null)
                {
                    sessionID = Session.SessionID;
                }
                if (conper.AddressLine1 != null)
                {
                    txtAddress.Text = conper.AddressLine1.ToString();
                }
                if (conper.City != null)
                {
                    txtcity.Text = conper.City.ToString();
                }
                bindDropdown();
                ddlState.SelectedIndex = ddlState.Items.IndexOf(ddlState.Items.FindByValue(conper.State.ToString()));

                // Page.ClientScript.RegisterStartupScript(GetType(), "fillCountry1" + sessionID, "setCountry('India','Maharashtra','0','0');", true);
                // Page.ClientScript.RegisterStartupScript(GetType(), "fillCountry1" + sessionID, "setCountry('" + conper.County + "','" + conper.State + "','0','0');", true);
                // Page.ClientScript.RegisterStartupScript(GetType(), "fillCountry" + sessionID, "setCountry('" + conper.County + "','" + conper.State + "','" + conper.Zone + "','" + conper.SubZone + "');", true);
            }
            catch (System.Exception ex)
            {
                Login.Profile.ErrorHandling(ex, this, "AddEditSearchAddress", "GetContactDetailByContactID");
            }
            finally
            {
                UCCommonFilter.Close();
            }
        }