Example #1
0
        /// <summary>
        /// 保存经验
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btn_Exp_Save_Click(object sender, EventArgs e)
        {
            long                id  = lb_id.Text.ToInt32();
            DataEntities        ent = new DataEntities();
            JobResumeExperience ex  = new JobResumeExperience();

            if (id > 0)
            {
                ex = (from l in ent.JobResumeExperience where l.ID == id select l).FirstOrDefault();
            }
            ex.ResumeID    = WS.RequestLong("id");
            ex.CompanyName = txt_Exp_CompanyName.Text;
            ex.Intro       = txt_Exp_Intro.Text;
            ex.Post        = ddl_exp_Post.SelectedValue.ToInt32();
            ex.StartTime   = new DateTime(ddl_exp_StartTime_Year.SelectedValue.ToInt32(), ddl_exp_StartTime_Month.SelectedValue.ToInt32(), 1);
            ex.LeftTime    = new DateTime(ddl_exp_LeftTime_Year.SelectedValue.ToInt32(), ddl_exp_LeftTime_Month.SelectedValue.ToInt32(), 1);
            if (id < 0)
            {
                ent.AddToJobResumeExperience(ex);
            }
            ent.SaveChanges();

            txt_Exp_Intro.Text       = "";
            txt_Exp_CompanyName.Text = "";
            lb_id.Text = "";
            ddl_exp_Post.SetValue("");
            ddl_exp_StartTime_Year.SetValue("");
            ddl_exp_StartTime_Month.SetValue("");
            ddl_exp_LeftTime_Year.SetValue("");
            ddl_exp_LeftTime_Month.SetValue("");

            ent.Dispose();
            LoadExps();
        }
Example #2
0
 public void AddToJobResumeExperience(JobResumeExperience jobResumeExperience)
 {
     base.AddObject("JobResumeExperience", jobResumeExperience);
 }
Example #3
0
 public static JobResumeExperience CreateJobResumeExperience(long id)
 {
     JobResumeExperience jobResumeExperience = new JobResumeExperience();
     jobResumeExperience.ID = id;
     return jobResumeExperience;
 }