Example #1
0
    protected void Page_PreRender(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            DataBindHelper.BindDDL(ref ddlSectors, this.cmbSectors, "SectorName", "SectorID", "0", PIKCV.COM.Data.GetErrorMessageCache(this.cmbErrors, PIKCV.COM.EnumDB.ErrorTypes.InitialText), "-1");
            ddlSectors.Items.Add(new ListItem(PIKCV.COM.Data.GetErrorMessageCache(this.cmbErrors, PIKCV.COM.EnumDB.ErrorTypes.OtherText), "0"));
            DataBindHelper.BindDDL(ref ddlPositions, this.cmbPositions, "PositionName", "PositionID", "0", PIKCV.COM.Data.GetErrorMessageCache(this.cmbErrors, PIKCV.COM.EnumDB.ErrorTypes.InitialText), "0");
            DataBindHelper.BindDDL(ref ddlLabouringTypes, this.cmbLabouringTypes, "LabouringTypeName", "LabouringTypeID", "0", PIKCV.COM.Data.GetErrorMessageCache(this.cmbErrors, PIKCV.COM.EnumDB.ErrorTypes.InitialText), "0");
            DataBindHelper.BindDDL(ref ddlCountries, this.cmbCountries, "PlaceName", "PlaceID", "-1", PIKCV.COM.Data.GetErrorMessageCache(this.cmbErrors, PIKCV.COM.EnumDB.ErrorTypes.InitialText), "-1");
            DataBindHelper.BindDDL(ref ddlCities, this.cmbTurkeyCities, "PlaceName", "PlaceID", "-1", PIKCV.COM.Data.GetErrorMessageCache(this.cmbErrors, PIKCV.COM.EnumDB.ErrorTypes.InitialText), "-1");

            PIKCV.COM.Data.RemoveOtherItems(ref ddlCities, (int)PIKCV.COM.EnumDB.Places.OtherPlaceID);

            if (CARETTA.COM.Util.IsNumeric(Request.QueryString["UserEmploymentID"]))
            {
                this.UserEmploymentID = int.Parse(Request.QueryString["UserEmploymentID"]);
                PIKCV.BUS.UserCVs objUserEmployment = new PIKCV.BUS.UserCVs();
                DataTable         dtUserEmployment  = objUserEmployment.GetUserEmploymentDetail(this.UserEmploymentID);
                if (dtUserEmployment.Rows.Count > 0)
                {
                    FillData(dtUserEmployment);
                }
            }
            ddlCities.Attributes.Add("onchange", "OpenCloseOther(" + ((int)PIKCV.COM.EnumDB.Places.OtherPlaceID).ToString() + ", '" + ddlCities.ClientID + "', 'dvOther')");
            //dvScript.InnerHtml = "<script>OtherDown('" + ddlCities.ClientID + "', " + ((int)PIKCV.COM.EnumDB.Places.OtherPlaceID).ToString() + ")</script>";
        }
    }