public ActionResult AddOrEditEducationFund(V_HR_EducationFundWithName educationFund)//AddEducationFund保存相应
        {
            DirectResult r = new DirectResult();
            T_HR_EducationFund educationFundupdate = entities.T_HR_EducationFund.Find(educationFund.ID);

            if (educationFundupdate == null)//为空为添加
            {
                T_HR_EducationFund educationFundadd = new T_HR_EducationFund();
                educationFundadd.ID = Tool.ProduceSed64();
                educationFundadd.StaffID = educationFund.StaffID;
                educationFundadd.Style = educationFund.Style;
                educationFundadd.Money = educationFund.Money;
                educationFundadd.StartTime = educationFund.StartTime;
                educationFundadd.EndTime = educationFund.EndTime;
                educationFundadd.Valid = true;
                educationFundadd.Remark = educationFund.Remark;
                educationFundadd.CreaterName = new LoginUser().EmployeeId;//后期改为用户名
                educationFundadd.CreateTime = DateTime.Now;
                entities.T_HR_EducationFund.Add(educationFundadd);
                try
                {
                    entities.SaveChanges();
                    r.Success = true;
                    X.Msg.Alert("提示", "保存成功!", new JFunction { Fn = "closewindow" }).Show();
                }
                catch (Exception e)
                {
                    X.Msg.Alert("警告", "数据保存失败!<br /> note:" + e.Message, new JFunction { Fn = "closewindow" }).Show();
                    r.Success = false;
                }
            }
            else//否则为修改
            {
                educationFundupdate.StaffID = educationFund.StaffID;
                educationFundupdate.Style = educationFund.Style;
                educationFundupdate.Money = educationFund.Money;
                educationFundupdate.StartTime = educationFund.StartTime;
                educationFundupdate.EndTime = educationFund.EndTime;
                educationFundupdate.Valid = true;
                educationFundupdate.Remark = educationFund.Remark;
                educationFundupdate.EditorName = new LoginUser().EmployeeId;//后期改为用户名
                educationFundupdate.EditeTime = DateTime.Now;
                try
                {
                    entities.SaveChanges();
                    r.Success = true;
                    X.Msg.Alert("提示", "修改成功!", new JFunction { Fn = "closewindow" }).Show();
                }
                catch (Exception e)
                {
                    X.Msg.Alert("警告", "数据修改失败!<br /> note:" + e.Message, new JFunction { Fn = "closewindow" }).Show();
                    r.Success = false;
                }
            }
            return r;
        }
        public ActionResult AddEducationFund(string educationFundid)//在修改时传递的为contractid
        {
            if (educationFundid == "-1")//-1为添加
            {
                return View();
            }
            else//否则为修改
            {
                V_HR_EducationFundWithName item = (from o in entities.V_HR_EducationFundWithName
                                                   where o.ID == educationFundid
                                                   select o).First();

                return View(item);
            }
        }