コード例 #1
0
        protected void Citizenship_DataBound(object sender, EventArgs e)
        {
            BusinessFacade facade = new BusinessFacade(myConn);
            Assembly ass = Assembly.Load("App_GlobalResources");
            ResourceManager rm = new ResourceManager("Resources.Resource", ass);

            ddlCountry.Items.Insert(0, new ListItem("Please select..", String.Empty));

            List<Citizenship> ciList = facade.GetAllCitizenship();
            foreach (Citizenship ci in ciList)
            {
                ListItem li = Utils.DecideLangDropdown(ci.CitizenshipName, ci.CitizenshipName_vn);
                if (li.Value == "Afghanistan" || li.Value == "Afghanistan")
                {
                    ListItem l = new ListItem("------------------------------", "N/A");
                    l.Attributes.Add("disabled", "true");
                    ddlCountry.Items.Add(l);
                }
                ddlCountry.Items.Add(li);
            }
        }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                MembershipUser mu = Membership.GetUser();
                Username = mu.UserName;
                userId = mu.ProviderUserKey.ToString();
            }
            catch (NullReferenceException)
            {
                Response.Redirect("~/publicArea/errorpages/Error404.aspx");
            }

            facade = new BusinessFacade(myConn);
            if (!IsPostBack)
            {
                List<Citizenship> ciList = facade.GetAllCitizenship();
                ddl_Citizenship_em.Items.Insert(0, new ListItem(string.Empty, string.Empty));
                foreach (Citizenship ci in ciList)
                {
                    ListItem li = Utils.DecideLangDropdown(ci.CitizenshipName, ci.CitizenshipName_vn);
                    ddl_Citizenship_em.Items.Add(li);
                }

                ddl_Gender_em.Items.Insert(0, new ListItem(string.Empty, "n"));
            }
        }
コード例 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            facade = new BusinessFacade(myConn);

            Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script type='text/javascript'>showhideOnStartUp();</script>");

            if (!IsPostBack)
            {
                List<Location> loList = facade.GetAllLocation();
                ddlJobLocation.Items.Insert(0, new ListItem(string.Empty, string.Empty));
                foreach (Location l in loList)
                {
                    ListItem li = Utils.DecideLangDropdown(l.LName, l.LName_vn);
                    ddlJobLocation.Items.Add(li);
                }

                List<Citizenship> ciList = facade.GetAllCitizenship();
                ddlCitizenship.Items.Insert(0, new ListItem(string.Empty, string.Empty));
                foreach (Citizenship ci in ciList)
                {
                    ListItem li = Utils.DecideLangDropdown(ci.CitizenshipName, ci.CitizenshipName_vn);
                    ddlCitizenship.Items.Add(li);
                }
                List<OrganizationType> otList = facade.GetAllOrganizationType();
                OrganizationType.Items.Insert(0, new ListItem(string.Empty, string.Empty));
                if (otList != null)
                {
                    foreach (OrganizationType sc in otList)
                    {
                        ListItem li = Utils.DecideLangDropdown(sc.Name, sc.Name_vn);
                        if (sc.Name == "Private Tutor")
                        {
                            OrganizationType.Items.Insert(1, li);
                            continue;
                        }
                        OrganizationType.Items.Add(li);
                    }
                }
                else
                {
                    ListItem li = new ListItem("N/A", "N/A");
                    OrganizationType.Items.Add(li);
                }
                ddl_SchoolType.Items.Insert(0, new ListItem(string.Empty, string.Empty));
                List<SchoolType> stList = facade.GetSchoolType();
                foreach (SchoolType st in stList)
                {
                    ListItem li = Utils.DecideLangDropdown(st.Name, st.Name_vn);
                    ddl_SchoolType.Items.Add(li);
                }
            }
            if (!IsPostBack)
            {
                txt_OrgName.Text = Context.Profile.GetPropertyValue("Organization.OrganizationName").ToString();
                txt_website.Text = Context.Profile.GetPropertyValue("Organization.Website").ToString();
                ListItem selectedItem_City = ddlJobLocation.Items.FindByValue(Context.Profile.GetPropertyValue("Organization.City").ToString());
                if (selectedItem_City != null)
                {
                    selectedItem_City.Selected = true;
                }
                ListItem selectedItem_Country = ddlCitizenship.Items.FindByValue(Context.Profile.GetPropertyValue("Organization.Country").ToString());
                if (selectedItem_Country != null)
                {
                    selectedItem_Country.Selected = true;
                }
                ListItem selectedItem_OrgType = OrganizationType.Items.FindByValue(Context.Profile.GetPropertyValue("Organization.OrganizationType").ToString());
                if (selectedItem_OrgType != null)
                {
                    selectedItem_OrgType.Selected = true;
                }
                ListItem selectedItem_schType = ddl_SchoolType.Items.FindByValue(Context.Profile.GetPropertyValue("Organization.SchoolType").ToString());
                if (selectedItem_schType != null)
                {
                    selectedItem_schType.Selected = true;
                }

                try
                {
                    ViewState["PreviousPageUrl"] = Request.UrlReferrer.ToString();
                }
                catch (Exception)
                {
                    Response.Redirect("~/Employer/EmployerSite.aspx");
                }
            }
            txt_CourseContent.Attributes.Add("onkeydown", "textCounter(this,'" + Label9.ClientID + "', 5000)");

            txt_benefit.Attributes.Add("onkeydown", "textCounter2(this,'" + Label10.ClientID + "', 5000)");
        }
コード例 #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            facade = new BusinessFacade(myConn);
            //Form.DefaultButton = CreateUserWizard1.create;
            CreateUserWizard1.ContinueDestinationPageUrl = Request.QueryString["ReturnUrl"];
            //CreateUserWizard1.FinishDestinationPageUrl = "../Default.aspx";

            Assembly ass = Assembly.Load("App_GlobalResources");
            ResourceManager rm = new ResourceManager("Resources.Resource", ass);

            DropDownList ddl = (DropDownList)CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("ddl_Citizenship");
            List<Citizenship> ciList = facade.GetAllCitizenship();
            ddl.Items.Insert(0, new ListItem(rm.GetString("Pleaseselect"), string.Empty));
            foreach (Citizenship ci in ciList)
            {
                ListItem li = Utils.DecideLangDropdown(ci.CitizenshipName, ci.CitizenshipName_vn);
                ddl.Items.Add(li);
            }

            DropDownList ddl_month = (DropDownList)CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("ddl_Month");
            DropDownList ddl_day = (DropDownList)CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("ddl_Day");
            DropDownList ddl_year = (DropDownList)CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("ddl_Year");

            ddl_month.Items.Insert(0, new ListItem(rm.GetString("Month"), string.Empty));
            ddl_day.Items.Insert(0, new ListItem(rm.GetString("Day"), string.Empty));
            ddl_year.Items.Insert(0, new ListItem(rm.GetString("Year"), string.Empty));

            for (int i = 1; i <= 31; i++)
            {
                ddl_day.Items.Insert(i, new ListItem(i.ToString(), i.ToString()));
            }
            for (int i = 1; i <= 12; i++)
            {
                ddl_month.Items.Insert(i, new ListItem(i.ToString(), i.ToString()));
            }
            int count = 1;
            for (int i = DateTime.Now.Year; i >= 1900; i--)
            {
                ddl_year.Items.Insert(count, new ListItem(i.ToString(), i.ToString()));
                count++;
            }
        }
コード例 #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            facade = new BusinessFacade(myConn);

            //ToolkitScriptManager objScriptManager = (ToolkitScriptManager)this.Master.FindControl("ToolkitScriptManager1");
            //objScriptManager.AsyncPostBackTimeout = 36000;
            //objScriptManager.RegisterAsyncPostBackControl(ddlCitizenship);

            Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script type='text/javascript'>showhideOnStartUp();</script>");

            if (!IsPostBack)
            {
                List<Location> loList = facade.GetAllLocation();
                ddlJobLocation.Items.Insert(0, new ListItem(string.Empty, string.Empty));
                foreach (Location l in loList)
                {
                    ListItem li = Utils.DecideLangDropdown(l.LName, l.LName_vn);
                    ddlJobLocation.Items.Add(li);
                }

                List<Citizenship> ciList = facade.GetAllCitizenship();
                ddlCitizenship.Items.Insert(0, new ListItem(string.Empty, string.Empty));
                foreach (Citizenship ci in ciList)
                {
                    ListItem li = Utils.DecideLangDropdown(ci.CitizenshipName, ci.CitizenshipName_vn);
                    ddlCitizenship.Items.Add(li);
                }
                List<OrganizationType> otList = facade.GetAllOrganizationType();
                OrganizationType.Items.Insert(0, new ListItem(string.Empty, string.Empty));
                if (otList != null)
                {
                    foreach (OrganizationType sc in otList)
                    {
                        ListItem li = Utils.DecideLangDropdown(sc.Name, sc.Name_vn);
                        if (sc.Name == "Private Tutor")
                        {
                            OrganizationType.Items.Insert(1, li);
                            continue;
                        }
                        OrganizationType.Items.Add(li);
                    }
                }
                else
                {
                    ListItem li = new ListItem("N/A", "N/A");
                    OrganizationType.Items.Add(li);
                }
                ddl_SchoolType.Items.Insert(0, new ListItem(string.Empty, string.Empty));
                List<SchoolType> stList = facade.GetSchoolType();
                foreach (SchoolType st in stList)
                {
                    ListItem li = Utils.DecideLangDropdown(st.Name, st.Name_vn);
                    ddl_SchoolType.Items.Add(li);
                }
            }
            if (!IsPostBack)
            {
                try
                {
                    ViewState["PreviousPageUrl"] = Request.UrlReferrer.ToString();
                }
                catch (Exception)
                {
                    Response.Redirect("~/Employer/EmployerSite.aspx");
                }
            }
            if (!IsPostBack)
            {
                string email = mu.Email;

                if (Roles.GetRolesForUser(Page.User.Identity.Name).Contains("Organization"))
                {
                    pnl_Employer.Visible = true;

                    username = mu.UserName;
                    Email.Text = email;

                    //ddl_Salutation.SelectedItem.Text = Context.Profile.GetPropertyValue("").ToString();
                    ListItem li_Salutation = ddl_Salutation.Items.FindByValue(Context.Profile.GetPropertyValue("Employer.Salutation").ToString());
                    if (li_Salutation != null)
                    {
                        li_Salutation.Selected = true;
                    }
                    txt_FirstName.Text = Context.Profile.GetPropertyValue("Employer.FirstName").ToString();
                    txt_Middle.Text = Context.Profile.GetPropertyValue("Employer.MiddleName").ToString();
                    txt_LastName.Text = Context.Profile.GetPropertyValue("Employer.LastName").ToString();
                    txt_PrimaryPhone.Text = Context.Profile.GetPropertyValue("Employer.Phone").ToString();

                    if (Context.Profile.GetPropertyValue("Employer.PersonalImage").ToString() == "")
                    {
                        Img_PersonalImage.ImageUrl = "~/images/companyLogo/no_image_100x100.jpg";
                    }
                    else
                    {
                        Img_PersonalImage.ImageUrl = General.EMP_HIRING_ADVICE + mu.ProviderUserKey.ToString() + "/" + Context.Profile.GetPropertyValue("Employer.PersonalImage").ToString();
                    }

                    if (Context.Profile.GetPropertyValue("Organization.Logo") == null)
                    {
                        img_Logo.ImageUrl = "~/images/companyLogo/no_image_100x100.jpg";
                    }
                    else
                    {
                        img_Logo.ImageUrl = General.EMP_LOGO + mu.UserName + "/" + Context.Profile.GetPropertyValue("Organization.Logo").ToString();
                    }
                    OrganizationName_txt.Text = Context.Profile.GetPropertyValue("Organization.OrganizationName").ToString();
                    Website_txt.Text = Context.Profile.GetPropertyValue("Organization.Website").ToString();

                    BriefInfo_txt.Text = Context.Profile.GetPropertyValue("Organization.BriefInfo").ToString();
                    Address1_txt.Text = Context.Profile.GetPropertyValue("Organization.Address1").ToString();
                    Phone1_txt.Text = Context.Profile.GetPropertyValue("Organization.PhoneNumber1").ToString();
                    FaxNumber_txt.Text = Context.Profile.GetPropertyValue("Organization.FaxNumber").ToString();
                    ListItem selectedItem_City = ddlJobLocation.Items.FindByValue(Context.Profile.GetPropertyValue("Organization.City").ToString());
                    if (selectedItem_City != null)
                    {
                        selectedItem_City.Selected = true;
                    }
                    ListItem selectedItem_Country = ddlCitizenship.Items.FindByValue(Context.Profile.GetPropertyValue("Organization.Country").ToString());
                    if (selectedItem_Country != null)
                    {
                        selectedItem_Country.Selected = true;
                    }
                    ListItem selectedItem_OrgType = OrganizationType.Items.FindByValue(Context.Profile.GetPropertyValue("Organization.OrganizationType").ToString());
                    if (selectedItem_OrgType != null)
                    {
                        selectedItem_OrgType.Selected = true;
                    }
                    ListItem selectedItem_schType = ddl_SchoolType.Items.FindByValue(Context.Profile.GetPropertyValue("Organization.SchoolType").ToString());
                    if (selectedItem_schType != null)
                    {
                        selectedItem_schType.Selected = true;
                    }
                    ZipCode_txt.Text = Context.Profile.GetPropertyValue("Organization.ZipCode").ToString();

                }
                else
                    Response.Redirect("~/publicArea/errorpages/Error403.aspx");
            }
        }
コード例 #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Form.DefaultButton = btn_Search.UniqueID;

            facade = new BusinessFacade(myConn);

            dl_adminCate.DataSource = facade.GetChildCategory(1);
            dl_adminCate.DataBind();
            dl_Fromk12Cate.DataSource = facade.GetChildCategory(2);
            dl_Fromk12Cate.DataBind();
            dl_AcademicCate.DataSource = facade.GetChildCategory(3);
            dl_AcademicCate.DataBind();

            dl_Joblevel.DataSource = facade.GetAllJobRole();
            dl_Joblevel.DataBind();

            dl_WorkPlace.DataSource = facade.GetAllLocation();
            dl_WorkPlace.DataBind();

            Assembly ass = Assembly.Load("App_GlobalResources");
            ResourceManager rm = new ResourceManager("Resources.Resource", ass);

            ddl_citizenship.Items.Insert(0, new ListItem(rm.GetString("Pleaseselect"), string.Empty));
            List<Citizenship> ctList = facade.GetAllCitizenship();
            foreach (Citizenship ct in ctList)
            {
                ListItem li = Utils.DecideLangDropdown(ct.CitizenshipName, ct.CitizenshipName_vn);
                if (li.Value == "Afghanistan" || li.Value == "Afghanistan")
                {
                    ListItem l = new ListItem("------------------------------", "");
                    ddl_citizenship.Items.Add(l);
                }
                ddl_citizenship.Items.Add(li);
            }

            ddl_YearOfExp.Items.Insert(0, new ListItem(rm.GetString("Pleaseselect"), string.Empty));
            List<YearOfExp> yeList = facade.GetYearsOfExp();
            foreach (YearOfExp ye in yeList)
            {
                ListItem li = Utils.DecideLangDropdown(ye.Name_en, ye.Name_vi);
                ddl_YearOfExp.Items.Add(li);
            }

            ddl_EduLevel.Items.Insert(0, new ListItem(rm.GetString("Pleaseselect"), string.Empty));
            List<EduLevelcs> elList = facade.GetEduLevel();
            foreach (EduLevelcs el in elList)
            {
                ListItem li = Utils.DecideLangDropdown(el.Name_en, el.Name_vi);
                ddl_EduLevel.Items.Add(li);
            }
        }
コード例 #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                Form.DefaultButton = btn_Search.UniqueID;

                facade = new BusinessFacade(myConn);

                dl_adminCate.DataSource = facade.GetChildCategory(1);
                dl_adminCate.DataBind();
                dl_Fromk12Cate.DataSource = facade.GetChildCategory(2);
                dl_Fromk12Cate.DataBind();
                dl_AcademicCate.DataSource = facade.GetChildCategory(3);
                dl_AcademicCate.DataBind();

                dl_Joblevel.DataSource = facade.GetAllJobRole();
                dl_Joblevel.DataBind();

                dl_WorkPlace.DataSource = facade.GetAllLocation();
                dl_WorkPlace.DataBind();

                Assembly ass = Assembly.Load("App_GlobalResources");
                ResourceManager rm = new ResourceManager("Resources.Resource", ass);

                ddl_citizenship.Items.Insert(0, new ListItem(rm.GetString("Pleaseselect"), string.Empty));
                List<Citizenship> ctList = facade.GetAllCitizenship();
                foreach (Citizenship ct in ctList)
                {
                    ListItem li = Utils.DecideLangDropdown(ct.CitizenshipName, ct.CitizenshipName_vn);
                    if (li.Value == "Afghanistan" || li.Value == "Afghanistan")
                    {
                        ListItem l = new ListItem("------------------------------", "");
                        ddl_citizenship.Items.Add(l);
                    }
                    ddl_citizenship.Items.Add(li);
                }

                dl_emplType.DataSource = facade.GetAllEmploymentType();
                dl_emplType.DataBind();

                ddl_OrgType.Items.Insert(0, new ListItem(rm.GetString("Pleaseselect"), string.Empty));
                List<OrganizationType> oType = facade.GetAllOrganizationType();
                foreach (OrganizationType ot in oType)
                {
                    ListItem li = Utils.DecideLangDropdown(ot.Name, ot.Name_vn);
                    ddl_OrgType.Items.Add(li);
                }

                ddl_SchoolType.Items.Insert(0, new ListItem(rm.GetString("Pleaseselect"), string.Empty));
                List<SchoolType> stList = facade.GetSchoolType();
                foreach (SchoolType st in stList)
                {
                    ListItem li = Utils.DecideLangDropdown(st.Name, st.Name_vn);
                    ddl_SchoolType.Items.Add(li);
                }

                //Load job title
                TitleList = new AdvanceSearchLogic(myConn).GetAllJobTitle();
                ArrTitle = "";
                foreach (String str in TitleList)
                {
                    ArrTitle += str + ",";
                }
            }
            catch (Exception ex)
            {
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "PopupScript", "<script>alert('"+ex.Message+"');</script>");
            }
        }
コード例 #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            String userId = null;
            try
            {
                MembershipUser mu = Membership.GetUser();
                Username = mu.UserName;
                userId = mu.ProviderUserKey.ToString();
            }
            catch (NullReferenceException)
            {
                Response.Redirect("~/publicArea/errorpages/Error404.aspx");
            }

            facade = new BusinessFacade(myConn);
            if (!IsPostBack)
            {
                //List<OrganizationType> otType = facade.GetAllOrganizationType();
                //OrganizationType.Items.Insert(0, new ListItem(string.Empty, string.Empty));
                //foreach (OrganizationType ot in otType)
                //{
                //    ListItem li = new ListItem(ot.Name, ot.Name);
                //    OrganizationType.Items.Add(li);
                //}

                //List<Location> loList = facade.GetAllLocation();
                //ddlJobLocation.Items.Insert(0, new ListItem(string.Empty, string.Empty));
                //foreach (Location l in loList)
                //{
                //    ListItem li = new ListItem(l.LName, l.LName);
                //    ddlJobLocation.Items.Add(li);
                //}

                List<Citizenship> ciList = facade.GetAllCitizenship();
                //ddlCitizenship.Items.Insert(0, new ListItem(string.Empty, string.Empty));
                ddl_Citizenship_em.Items.Insert(0, new ListItem(string.Empty, string.Empty));
                foreach (Citizenship ci in ciList)
                {
                    ListItem li = new ListItem(ci.CitizenshipName, ci.CitizenshipName);
                    //ddlCitizenship.Items.Add(li);
                    ddl_Citizenship_em.Items.Add(li);
                }

                ddl_Gender_em.Items.Insert(0, new ListItem(string.Empty, "n"));
            }
        }