コード例 #1
0
        /// <summary>
        /// Converts an API dto objec to a business object
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public IBusinessObjectEntity ToBusinessFormat(IAPIEntity entity)
        {
            ExperienceLevelAPI other = entity as ExperienceLevelAPI;
            ExperienceLevel clone = new ExperienceLevel();

            clone.Level = other.Level;
            clone.ExperienceRequired = other.ExperienceRequired;

            return clone;
        }
コード例 #2
0
        public void Initialize()
        {
            storageInfo = new ExperienceLevelStorageInformation("1");

            level = new ExperienceLevel
            {
                ExperienceRequired = 100,
                Level = 1
            };
        }
コード例 #3
0
ファイル: RPGCustomCharacter.cs プロジェクト: MRCulpo/RPGCore
 /// <summary>
 /// Contrutor sem parametro
 /// </summary>
 public RPGCustomCharacter()
 {
     this.name = "";
     this.typeClass = new Class();
     this.level = new ExperienceLevel();
     this.life = new Life();
     this.damage = new Damage();
     this.armor = new Armor();
     this.attributes = new Attributes();
     this.inventory = new Inventory();
     this.abilityManager = new AbilityManager();
     this.effects = new List<Effect>();
     this.level = new ExperienceLevel();
 }
コード例 #4
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        try
        {
            DataTable data = GetAllMyResumes(Convert.ToInt32(User1.UserId));
            if (data.Rows.Count >= 3)
            {
                JavaScriptAleart("Bạn đã tạo tối đa 3 hồ sơ. Vui lòng kiểm tra lại");
                return;
            }
            var resumeTitle = txtResumeName.Text;
            var user = new User(User1.Email, User1.UserId);
            var certificate = new Certificate(ddlDegrees.SelectedValue, ddlDegrees.SelectedItem.Text);
            var salary = new JobSalaryLevel(ddlExpectedSalary.SelectedValue, ddlExpectedSalary.SelectedItem.Text);
            var langSkill = new LangSkill(ddlLangSkill.SelectedValue, ddlLangSkill.SelectedItem.Text, txtDescription.Text);
            var location = new Province(ddlRegions.SelectedValue, ddlRegions.SelectedItem.Text);
            var category = new JobIndustries(ddlCategories.SelectedValue, ddlCategories.SelectedItem.Text);
            //var curentPostion = new JobPosition(ddlCurrentPosition.SelectedValue, ddlCurrentPosition.SelectedItem.Text);
            var expectedPosition = new JobPosition(ddlExpectedPosition.SelectedValue,
                ddlExpectedPosition.SelectedItem.Text);
            var jobExperienceLevel = new ExperienceLevel(ddlExp.SelectedValue,
                ddlExp.SelectedItem.Text);
            var worktype = new WorkType(ddlworktype.SelectedValue, ddlworktype.SelectedItem.Text);
            var jobAchievement = ta1.Value;
            var careerGoal = ta2.Value;
            var experience = ta3.Value;
            var literacy = ta6.Value;
            var skill = ta5.Value;
            var reference = ta4.Value;
            var contactmail = txtContactMail.Text;
            var attachmentPath = "";
            if (this.fuResume.HasFile)
            {
                string imgThumb = "E:\\DOCUMENTS\\School\\ASP.NETWorkSpaces\\WebFindingJobsMVCmodel\\FileSticky\\" + this.fuResume.FileName;
                this.fuResume.SaveAs(imgThumb);
                attachmentPath = "/FileSticky/" + this.fuResume.FileName;
            }
            Resume1 = new Resume();

            var returnValue = false;
            var query = Request.QueryString["resumeId"];
            if (query != null)
            {
                returnValue = Resume1.SetFullResumeInfoUpdate(resumeTitle, certificate, salary, langSkill, location,
                    category, expectedPosition, jobExperienceLevel, worktype,
                    jobAchievement, careerGoal, experience, literacy, skill, reference, user, contactmail, query, attachmentPath);
            }
            else
            {
                returnValue = Resume1.SetFullResumeInfo(resumeTitle, certificate, salary, langSkill, location, category, expectedPosition, jobExperienceLevel, worktype,
               jobAchievement, careerGoal, experience, literacy, skill, reference, user, contactmail, attachmentPath);
            }
            if (returnValue)
            {
                JavaScriptAleart("Thực hiện thành công");
            }
            else
            {
                JavaScriptAleart("Thực hiện không thành công. Vui lòng load lại trang và thử lại");
            }
        }
        catch (Exception exception)
        {

            JavaScriptAleart(exception.Message);

        }
    }
コード例 #5
0
    protected void btnSubmitRecuitmentInfo_OnClick(object sender, EventArgs e)
    {
        try
        {
            Recruitor1 = (Recruitor)Session["Recruitor"];
            var jobTitle = txtJobTitle.Text;
            var numsApplicant = txtNumsApplicant.Text;
            var recruitor = new Recruitor(Recruitor1.Email, Recruitor1.RecruitorId);
            var certificate = new Certificate(ddlDegrees.SelectedValue, ddlDegrees.SelectedItem.Text);
            var salary = new JobSalaryLevel(ddlSalary.SelectedValue, ddlSalary.SelectedItem.Text);
            var location = new Province(ddlRegions.SelectedValue, ddlRegions.SelectedItem.Text);
            var category = new JobIndustries(ddlCategories.SelectedValue, ddlCategories.SelectedItem.Text);
            var jobPostion = new JobPosition(ddlJobPosition.SelectedValue, ddlJobPosition.SelectedItem.Text);
            var jobExperienceLevel = new ExperienceLevel(ddlJobExperienceLevel.SelectedValue,
                ddlJobExperienceLevel.SelectedItem.Text);
            var worktype = new WorkType(ddlWorkType.SelectedValue, ddlWorkType.SelectedItem.Text);
            var jobDatail = txtJobDetail.Value;
            var jobDescription = txtDescription.Value;
            var deadLine = Convert.ToDateTime(tbDeadline.Value);
            Jobs1 = new Jobs();
            var jobid = Request.QueryString["jobid"];
            if (jobid != null)
            {
                  var  returnValue = Jobs1.SetFullJobInfo(jobTitle, certificate, salary, location, category, jobDatail,
                    jobDescription, deadLine, jobPostion, jobExperienceLevel, worktype, recruitor, numsApplicant, jobid);

                if (returnValue)
                {
                    Session["Job"] = Jobs1;
                    var emailContent = BuidRecommendResume(jobid);
                    SendEmailMember(emailContent, Recruitor1.EmailToSendResume);
                    JavaScriptAleart("Thực hiện thành công");
                }
                else
                {
                    JavaScriptAleart("Thực hiện không thành công. Vui lòng load lại trang và thử lại");
                }
            }
            else
            {
               var returnValue1 = Jobs1.SetFullJobInfo(jobTitle, certificate, salary, location, category, jobDatail,
                    jobDescription, deadLine, jobPostion, jobExperienceLevel, worktype, recruitor, numsApplicant);

               if (returnValue1>0)
               {

                   Session["Job"] = Jobs1;
                   var emailContent = BuidRecommendResume(returnValue1.ToString());
                   JavaScriptAleart(emailContent);
                   SendEmailMember(emailContent, Recruitor1.EmailToSendResume);
                   JavaScriptAleart("Thực hiện thành công");
               }
               else
               {
                   JavaScriptAleart("Thực hiện không thành công. Vui lòng load lại trang và thử lại");
               }
            }
        }
        catch (Exception exception)
        {
            JavaScriptAleart(exception.Message);
        }
    }
コード例 #6
0
        /// <summary>
        /// A way to get the items into the table storage for now.
        /// @ TO DO Figure out how we actually want to do this
        /// </summary>
        public async Task StoreExperienceLevelDefintiions()
        {
            List<ExperienceLevelTableStorage> exls = new List<ExperienceLevelTableStorage>();
            ExperienceLevel exl;
            ExperienceLevelStorageInformation storageInfo;

            exl = new ExperienceLevel
            {
                Level = 1,
                ExperienceRequired = 0,
            };
            storageInfo = new ExperienceLevelStorageInformation(exl.Level.ToString());
            exls.Add((ExperienceLevelTableStorage)storageInfo.ToTableStorage(exl));

            exl = new ExperienceLevel
            {
                Level = 2,
                ExperienceRequired = 100,               
            };
            storageInfo = new ExperienceLevelStorageInformation(exl.Level.ToString());
            exls.Add((ExperienceLevelTableStorage)storageInfo.ToTableStorage(exl));

            exl = new ExperienceLevel
            {
                Level = 3,
                ExperienceRequired = 300,
            };
            storageInfo = new ExperienceLevelStorageInformation(exl.Level.ToString());
            exls.Add((ExperienceLevelTableStorage)storageInfo.ToTableStorage(exl));

            exl = new ExperienceLevel
            {
                Level = 4,
                ExperienceRequired = 700,
            };
            storageInfo = new ExperienceLevelStorageInformation(exl.Level.ToString());
            exls.Add((ExperienceLevelTableStorage)storageInfo.ToTableStorage(exl));

            AzureTableStorage storage = new AzureTableStorage();
            await storage.SetTable("ExperienceLevel");
            await storage.DeleteTable();
            await storage.SetTable("ExperienceLevel");
            await storage.InsertOrReplace<ExperienceLevelTableStorage>(exls);             
        }