public ActionResult Education(string id) { EducationBLL _educationBLL = new EducationBLL(); Gradera.Education.Entities.Education education = _educationBLL.GetEducation(id); return(View(education)); }
protected void Button1_Click(object sender, EventArgs e) { MembershipUser CurrentUser = Membership.GetUser(); Guid UserId = (Guid)CurrentUser.ProviderUserKey; string SchoolName = TextBox1.Text.ToString(); string SchoolLocation = TextBox3.Text.ToString(); string FieldOfStudy = TextBox2.Text.ToString(); string From = TextBox4.Text.ToString(); string To = TextBox5.Text.ToString(); EducationBLL.InsertUserEducation(SchoolName, From, To, SchoolLocation, FieldOfStudy, UserId); }
public decimal GetedDecimal(string deptId, string userid) { var deptcode = new DepartmentBLL().GetEntity(deptId).EnCode; var timeNow = DateTime.Now; var from = new DateTime(timeNow.Year, timeNow.Month, 1); var to = new DateTime(timeNow.Year, timeNow.Month, 1).AddMonths(1).AddDays(-1); //人均培训学时 decimal xs = 0; var redata = ed.GetGroupCount(deptcode, from, to.AddDays(1)); redata.Columns.Add("total"); redata.Columns.Add("avg"); EducationBLL edubll = new EducationBLL(); foreach (DataRow row in redata.Rows) { decimal learns = 0; var edulist = edubll.GetAllList().Where(x => x.BZId == row[0].ToString() && x.ActivityDate >= from && x.ActivityDate < to); foreach (EduBaseInfoEntity e in edulist) { learns += Convert.ToDecimal(e.LearnTime * e.AttendNumber); } row["total"] = learns; if (row[3].ToString() == "" || row[2].ToString() == "0") { row["avg"] = "0"; } else { row["avg"] = Math.Round(Convert.ToDecimal(row[3]) / Convert.ToDecimal(row[2]), 2); xs = xs + Math.Round(Convert.ToDecimal(row[3]) / Convert.ToDecimal(row[2]), 2); } } return(xs); }
public IActionResult Index() { personBLL = new PersonBLL(); var modelPerson = personBLL.GetPerson(); if (modelPerson == null) { return(NotFound()); } else { ViewBag.Person = modelPerson; } //Education educationBLL = new EducationBLL(); var modelEducation = educationBLL.GetCollectionEducation(); if (modelEducation == null) { return(NotFound()); } else { ViewBag.Education = modelEducation; } //Experience experienceBLL = new ExperienceBLL(); var modelExperience = experienceBLL.GetCollectionExperience(); if (modelExperience == null) { return(NotFound()); } else { ViewBag.Experience = modelExperience; } //Skill Coding skillBLL = new SkillBLL(); var modelSkillCode = skillBLL.GetCollectionSkillsByType("C"); if (modelSkillCode == null) { return(NotFound()); } else { ViewBag.SkillsCoding = modelSkillCode; } //Skill Others var modelSkillOthers = skillBLL.GetCollectionSkillsByType("O"); if (modelSkillOthers == null) { return(NotFound()); } else { ViewBag.SkillsOthers = modelSkillOthers; } //Pricing Freelancer Skill pricingSkillBLL = new PricingBLL(); var modelPricing = pricingSkillBLL.GetPricingByType("FL"); if (modelPricing == null) { return(NotFound()); } else { ViewBag.PricingSkillFreelancer = modelPricing; } //Pricing Freelancer Skills Collection var modelPSCollection = pricingSkillBLL.GetCollectionPricingSkill("FL"); if (modelPSCollection == null) { return(NotFound()); } else { ViewBag.PricingSkillCollectionFreelancer = modelPSCollection; } //Pricing Fulltime Skill var modelPricingFullTime = pricingSkillBLL.GetPricingByType("FT"); if (modelPricingFullTime == null) { return(NotFound()); } else { ViewBag.PricingSkillFulltime = modelPricingFullTime; } //Pricing FullTime Skills Collection var modelPSFullTimeCollection = pricingSkillBLL.GetCollectionPricingSkill("FT"); if (modelPSFullTimeCollection == null) { return(NotFound()); } else { ViewBag.PricingSkillCollectionFulltime = modelPSFullTimeCollection; } //Project Work projectWorkBLL = new ProjectWorkBLL(); var modelProjectWork = projectWorkBLL.GetCollectionProjectWorkFactory(); if (modelProjectWork == null) { return(NotFound()); } else { ViewBag.ProjectWorkCollection = modelProjectWork; } //Comments commentBLL = new CommentBLL(); var modelComment = commentBLL.GetCollectionComment(); if (modelComment == null) { return(null); } else { ViewBag.Comments = modelComment; } //Contacts contactBLL = new ContactBLL(); var modelContact = contactBLL.GetCollectionContact(); if (modelContact == null) { return(null); } else { ViewBag.Contacts = modelContact; } return(View()); }
///<summary> ///首页(管理层界面-班组) /// </summary> /// <returns></returns> public manageindex GetTotalWork(string deptId, string userid) { manageindex index = new manageindex(); var deptcode = new DepartmentBLL().GetEntity(deptId).EnCode; var depts = new DepartmentBLL().GetSubDepartments(deptId, null); var deptlist = depts.Select(x => x.DepartmentId).ToArray(); var deptstr = string.Join(",", deptlist); object[] total = new object[12] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; var timeNow = DateTime.Now; var from = new DateTime(timeNow.Year, timeNow.Month, 1); var to = new DateTime(timeNow.Year, timeNow.Month, 1).AddMonths(1).AddDays(-1); int dataTotal = 0; //班前班后会 var dic = new Dictionary <string, string>(); dic.Add("meetingstarttime", from.ToString("yyyy-MM-dd")); dic.Add("meetingstarttimetwo", to.AddDays(1).ToString("yyyy-MM-dd")); work.GetDataNew(1, 10000, out dataTotal, dic, deptlist); index.bqbhh = dataTotal; //危险预知训练 var yxyzdata = Dservice.GetTrainingsApp(deptstr, from, to.AddDays(1)); dataTotal = yxyzdata.Count(); index.wxyzxl = dataTotal; //安全日活动 班务会 政治学习 民主管理会 var hddata = Aservice.GetList(2, deptstr, from, to.AddDays(1)); var hdtotaldata = hddata.Where(x => x.ActivityType == "安全日活动").ToList(); dataTotal = hdtotaldata.Count(); index.aqrhd = dataTotal; hdtotaldata = hddata.Where(x => x.ActivityType == "班务会").ToList(); dataTotal = hdtotaldata.Count(); index.bwh = dataTotal; hdtotaldata = hddata.Where(x => x.ActivityType == "政治学习").ToList(); dataTotal = hdtotaldata.Count(); index.zzxx = dataTotal; hdtotaldata = hddata.Where(x => x.ActivityType == "民主管理会" || x.ActivityType == "民主生活会").ToList(); dataTotal = hdtotaldata.Count(); index.mzglh = dataTotal; // 技术讲课 技术问答 事故预想 反事故演习 var jsdata = baseService.GetList(new string[] { deptstr }, from, to.AddDays(1)).ToList(); /// 教育培训类型 1.技术讲课 2.技术问答 3.事故预想 4.反事故预想 5.新技术问答 var Totaldata = jsdata.Where(x => x.EduType == "1").ToList(); dataTotal = Totaldata.Count(); index.jsjk = dataTotal; Totaldata = jsdata.Where(x => x.EduType == "2" || x.EduType == "5").ToList(); dataTotal = Totaldata.Count(); index.jswd = dataTotal; Totaldata = jsdata.Where(x => x.EduType == "3").ToList(); dataTotal = Totaldata.Count(); index.sgyx = dataTotal; Totaldata = jsdata.Where(x => x.EduType == "4").ToList(); dataTotal = Totaldata.Count(); index.fsgyx = dataTotal; //人均培训学时 decimal xs = 0; var redata = ed.GetGroupCount(deptcode, from, to.AddDays(1)); redata.Columns.Add("total"); redata.Columns.Add("avg"); EducationBLL edubll = new EducationBLL(); foreach (DataRow row in redata.Rows) { decimal learns = 0; var edulist = edubll.GetAllList().Where(x => x.BZId == row[0].ToString() && x.ActivityDate >= from && x.ActivityDate < to); foreach (EduBaseInfoEntity e in edulist) { learns += Convert.ToDecimal(e.LearnTime * e.AttendNumber); } row["total"] = learns; if (row[3].ToString() == "" || row[2].ToString() == "0") { row["avg"] = "0"; } else { row["avg"] = Math.Round(Convert.ToDecimal(row[3]) / Convert.ToDecimal(row[2]), 2); xs = xs + Math.Round(Convert.ToDecimal(row[3]) / Convert.ToDecimal(row[2]), 2); } } index.rjpxxs = xs; //获取应急演练列表 var dyresult = webClientEmergency <GetDrillRecordBaseList>("EmergencyPlatform/GetDrillRecordBaseList", "{\"userid\":\"" + userid + "\",\"pageindex\":" + 1 + ",\"pagesize\":" + 2000 + ",\"data\":{\"startdate\":\"" + from.ToString("yyyy-MM-dd") + "\",\"enddate\":\"" + to.AddDays(1).ToString("yyyy-MM-dd") + "\"} }"); if (dyresult.Code == 0) { if (dyresult.data.Count > 0) { dataTotal = dyresult.Count; } } index.yjylcs = dataTotal; return(index); }
public EducationController() { _educationBLL = new EducationBLL(); }
public JsonResult GetEducation(string userid) { var data = new EducationBLL().GetMonthTotal(userid); return(Json(data, JsonRequestBehavior.AllowGet)); }