internal void CreatePhoneNumbers2(int count = 1) { for (int i = 0; i < count; i++) { Qualifications.Add(new Qualification()); } }
public IResult CreateQualification(QualificationViewModel qualification) { var result = new Result { Operation = Operation.Create, Status = Status.Success }; try { var duplicatequalification = _qualificationRepository.GetFirstOrDefault(x => x.Name == qualification.Name); if (duplicatequalification != null) { result.Status = Status.Fail; result.Message = QualificationStatusNotification.DuplicateQualification; result.Body = null; } else { var qualificationModel = new Qualifications(); qualificationModel.MapFromViewModel(qualification, (ClaimsIdentity)_principal.Identity); _qualificationRepository.Create(qualificationModel); _qualificationRepository.SaveChanges(); result.Body = qualificationModel; } } catch (Exception e) { result.Message = e.Message; result.Status = Status.Error; } return(result); }
public ActionResult Delete(Qualifications Qua, String UserID) { CompanyDM Result = new CompanyDM(); Qua.UserID = UserID; try { Com.QuaDelete(Qua); } catch (Exception ex) { Result.msg = ex.Message; } var list = CompanyMapper.CompanyInfo(Com.ComPanys(UserID), Url, Com.CompanyCredit(UserID)); Result.CompanyName = list.CompanyName; Result.UserRealName = list.UserRealName; Result.UserPhone = list.UserPhone; Result.CompanyStates = list.CompanyState; Result.CompanyLicense = list.CompanyLicense; Result.CompanyQualification = list.CompanyQualification; Result.CompanyClimbCard = list.CompanyClimbCard; Result.CompanyWelderCard = list.CompanyWelderCard; Result.CompanyForkliftCard = list.CompanyForkliftCard; Result.CompanyElectricianCard = list.CompanyElectricianCard; Result.CompanySafeCard = list.CompanySafeCard; Result.CompanyInsuranceCard = list.CompanyInsuranceCard; Result.EvalAccident = list.EvalAccident; Result.EvalManagement = list.EvalManagement; Result.EvalQuality = list.EvalQuality; Result.EvalReachRate = list.EvalReachRate; Result.EvalSatisfied = list.EvalSatisfied; Result.msg = "删除成功"; return(Json(Result, JsonRequestBehavior.AllowGet)); }
protected void btn_notaParcial_Click(object sender, EventArgs e) { EvaluationPlan evaluation = new EvaluationPlan(); long personId = long.Parse(GridView1.SelectedRow.Cells[1].Text); long stuModId = proxySM.GetStudentModuleId((long)Session["TeachModID"], personId); long evalPlanId = long.Parse(ddl_Evaluacion.SelectedValue); float value = float.Parse(TextBox1.Text); entity = new Qualifications(); evaluation = GetPlanEvaluacion(evalPlanId); //lbl_Ponderacion.Text = evaluation.Consideration+""; try { entity.Qualification = value; entity.StudentModuleCode = stuModId; entity.EvaluationPlanCode = evalPlanId; proxyQ.InsertQualification(entity); TextBox1.Text = ""; lbl_mensaje.Text = "ÉXITO. La calificación se ha registrado."; } catch (Exception ex) { lbl_mensaje.Text = "ERROR. La calificación NO se ha registrado."; } }
public ActionResult GetEmployeeEditDlg() { Qualifications q = new Qualifications(); var jobClasses = q.GetJobClass(); List <SelectListItem> opArea = new List <SelectListItem>(new[] { new SelectListItem { Text = "", Value = "NONE" }, new SelectListItem { Text = "GW", Value = "GW" }, new SelectListItem { Text = "Pipeline", Value = "PL" }, new SelectListItem { Text = "ULS", Value = "ULS" }, }); ViewData["JobClasses"] = jobClasses; ViewData["OpAreas"] = opArea; return(PartialView("EmployeeEditDlg", ViewData)); }
public ActionResult GetAdminQualifications(string sidx, string sord, int page, int rows) { Qualifications qual = new Qualifications(); var quals = qual.GetGridQualAdmin(); var dataJson = new { total = page = 1, records = 10000, rows = (from q in quals select new { id = q.rownum, cell = new string[] { q.qualID, q.qualDesc, q.qualCompany } }).ToArray() }; return(Json(dataJson, JsonRequestBehavior.AllowGet)); }
public override async void OnNavigatedTo(NavigationParameters parameters) { Title = "Τύποι Προσόντων"; //TODO: Get Language from parameters //var language = parameters["language"]; var language = "el"; try { Qualifications.Clear(); var qualifications = QualificationAppService.GetQualificationsByCriteria(language, SearchSettings.LevelId, SearchSettings.BodyId, SearchSettings.SectorId, SearchSettings.TypeId, SearchSettings.Text); foreach (var qf in qualifications) { Qualifications.Add(qf); } base.OnNavigatedTo(parameters); } catch (Exception e) { //TODO: Find how to properly handle Exceptions await App.Current.MainPage.DisplayAlert("Error", $"Application was not able to retrieve qualifications: {e.Message}", "OK"); } }
public Course() { Graduation = new Graduation(); Qualification = new Qualifications(); Coordination = new Coordenation(); CurricularYearsList = new HashSet <CurricularYear>(); }
public async Task <IActionResult> Edit(int id, [Bind("QualID,QualName")] Qualifications qualifications) { if (id != qualifications.QualID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(qualifications); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!QualificationsExists(qualifications.QualID)) { return(NotFound()); } else { throw; } } return(RedirectToAction("Index")); } return(View(qualifications)); }
public async Task <IActionResult> OnPostSubmitAsync() { Qualifications = _context.Qualifications.ToList(); if (!string.IsNullOrWhiteSpace(nameFilter)) { Qualifications = Qualifications.Where(s => s.Name.Contains(nameFilter, StringComparison.CurrentCultureIgnoreCase)) .OrderBy(s => s.Name).ToList(); } if (passMarkFilter != -1) { Qualifications = Qualifications.Where(s => s.PassMark == passMarkFilter).OrderBy(s => s.Name).ToList(); } if (!string.IsNullOrWhiteSpace(parChiFilter)) { Qualifications = Qualifications.Where(s => s.ParOrChi.Contains(parChiFilter, StringComparison.CurrentCultureIgnoreCase)) .OrderBy(s => s.Name).ToList(); } if (!string.IsNullOrWhiteSpace(parentFilter)) { Qualifications = Qualifications.Where(s => s.Parent.Contains(parentFilter, StringComparison.CurrentCultureIgnoreCase)) .OrderBy(s => s.Name).ToList(); } if (numChiFilter != -1) { Qualifications = Qualifications.Where(s => s.NumOfChi == numChiFilter).OrderBy(s => s.Name).ToList(); } if (minChiFilter != -1) { Qualifications = Qualifications.Where(s => s.MinChiPass == minChiFilter).OrderBy(s => s.Name).ToList(); } return(Page());// RedirectToPage("./Qualification"); }
public virtual Result Add() { try { Result result = null; Qualifications Qualification = new Qualifications(); Qualification.QualificationDegreeID = this.QualificationDegree.QualificationDegreeID; Qualification.QualificationName = this.QualificationName; //QualificationDegreeID Qualification.DirectPoints = this.DirectPoints; Qualification.IndirectPoints = this.IndirectPoints; Qualification.CreatedDate = DateTime.Now; Qualification.CreatedBy = this.LoginIdentity.EmployeeCodeID; this.QualificationID = new QualificationsDAL().Insert(Qualification); result = new Result(); result.Entity = this; result.EnumType = typeof(QualificationsValidationEnum); result.EnumMember = QualificationsValidationEnum.Done.ToString(); return(result); } catch { throw; } }
public ActionResult GetEmpWRComment(string id, string type, string date) { Qualifications q = new Qualifications(); var comment = q.GetQualEmpWarnComment(id, type, date); return(Content(comment)); }
public void InsertQualification(Qualifications entity) { using (var context = new QualificationsDBEntities()) { context.Qualifications.Attach(entity); context.ObjectStateManager.ChangeObjectState(entity, System.Data.EntityState.Added); context.SaveChanges(); } }
private void LoadQualifications() { Qualifications.Clear(); var qualifications = QualificationsService.GetAllQualifications(); foreach (var v in qualifications) { Qualifications.Add(v); } }
public ActionResult GetCertRptDlg() { Qualifications q = new Qualifications(); var qualEmps = q.GetEmployees(); ViewData["Employees"] = qualEmps; return(PartialView("QualEmployees", ViewData)); }
public ActionResult GetEmpWarnRecogDates(string id, string type) { Qualifications q = new Qualifications(); var qualWRDates = q.GetQualEmpWarnRecogs(id, type); ViewData["EmpWarnRecogDates"] = qualWRDates; return(PartialView("QualEmpWarnRecogDates", ViewData)); }
public async Task <IActionResult> Create([Bind("QualID,QualName")] Qualifications qualifications) { if (ModelState.IsValid) { _context.Add(qualifications); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(qualifications)); }
private async Task LoadQualificationsAsync() { Qualifications.Clear(); var qualifications = await _repository.Qualification.GetRangeAsync(); foreach (var qualification in qualifications) { Qualifications.Add(new QualificationModel(qualification, _repository)); await Task.Delay(500); } }
public ActionResult GetQualEditDlg(string strCompany) { Qualifications q = new Qualifications(); var qualDesc = q.GetQualDescriptions(strCompany); var qualCodes = q.GetQualCodes(strCompany); ViewData["QualDescr"] = qualDesc; ViewData["QualCodes"] = qualCodes; return(PartialView("QualEditDlg", ViewData)); }
private async Task SaveAddQualificationAsync() { try { await Task.Run(() => _repository.Qualification.AddAsync(NewQualification.ModelCopy)); Qualifications.Add(new QualificationModel(NewQualification.ModelCopy, _repository)); } catch (Exception e) { MessageBox.Show("Unable to add. Reason: " + e.Message); } }
internal QualificationsBLL MapQualification(Qualifications item) { return(item != null ? new QualificationsBLL() { QualificationID = item.QualificationID, QualificationName = item.QualificationName, DirectPoints = item.DirectPoints, IndirectPoints = item.IndirectPoints, QualificationDegree = item.QualificationDegreeID.HasValue ? new QualificationsDegreesBLL().MapQualificationDegree(item.QualificationsDegrees) : null, CreatedBy = item.CreatedBy.HasValue ? new EmployeesCodesBLL().MapEmployeeCode(item.EmployeesCodes) : null, CreatedDate = item.CreatedDate.Value } : null); }
public Qualifications CreateQualificationsFor(Person person) { if (person.Qualifications != null) { throw new InvalidOperationException("Person already has a Qualifications object attached"); } var qual = new Qualifications { Person = person, }; person.Qualifications = qual; person.Validate(); return(qual); }
public void QuaDelete(Qualifications Qua) { BD_UserInfo user = db.UserInfo.Find(Qua.UserID); if (user != null) { if (!String.IsNullOrEmpty(Qua.CompanyQualification)) { user.CompanyQualification = null; } if (!String.IsNullOrEmpty(Qua.CompanyClimbCard)) { user.CompanyClimbCard = null; } if (!String.IsNullOrEmpty(Qua.CompanyWelderCard)) { user.CompanyWelderCard = null; } if (!String.IsNullOrEmpty(Qua.CompanyForkliftCard)) { user.CompanyForkliftCard = null; } if (!String.IsNullOrEmpty(Qua.CompanyElectricianCard)) { user.CompanyElectricianCard = null; } if (!String.IsNullOrEmpty(Qua.CompanySafeCard)) { user.CompanySafeCard = null; } if (!String.IsNullOrEmpty(Qua.CompanyInsuranceCard)) { user.CompanyInsuranceCard = null; } if (!String.IsNullOrEmpty(Qua.CompanyLicense)) { user.CompanyLicense = null; } db.UserInfo.Attach(user); db.Entry <BD_UserInfo>(user).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); } else { throw new ArgumentException("查找不到该安装公司!"); } }
public override int GetHashCode() { unchecked { var hashCode = (int)Gender; hashCode = (hashCode * 397) ^ (FamilyName != null ? FamilyName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Title != null ? Title.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Languages != null ? Languages.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Qualifications != null ? Qualifications.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (TelefoneNumbers != null ? TelefoneNumbers.GetHashCode() : 0); hashCode = (hashCode * 397) ^ ID.GetHashCode(); hashCode = (hashCode * 397) ^ (Offices != null ? Offices.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (KVNWebsite != null ? KVNWebsite.GetHashCode() : 0); return(hashCode); } }
public override async void LoadData() { var service = Ioc.Container.Resolve <IQualificationService>(); var result = await service.GetQualifications(); if (result.IsOk) { foreach (var qualification in result.Data.Where(x => x.Subjects != null && x.Subjects.Count > 0)) { Qualifications.Add(new QualificationDataModel(qualification)); } } getData.OnNext(new NotifyDataResult { Result = result.Result, ErrorMessage = result.ErrorMessage }); }
public ActionResult EditQual(Nullable <int> id, FormCollection formValues) { // this method used just for delete now uls_dbDataContext db = new uls_dbDataContext(); Qualifications qual = new Qualifications(); try { string strOper = formValues.GetValues("oper")[0]; // string[] strParms = formValues.GetValues("strData")[0].Split('|'); // string strEmployeeID = strParms[0]; // string strQualID = strParms[1]; string strEmployeeID = formValues.GetValues("intEmployeeID")[0]; string strQualID = formValues.GetValues("strQualID")[0]; empQual empQ; if (strOper == "del") { string[] arrQualids; arrQualids = strQualID.Split(','); foreach (string strQid in arrQualids) { empQ = db.empQuals.Single(e => e.employeeId == Convert.ToInt32(strEmployeeID) && e.qualId == strQid); db.empQuals.DeleteOnSubmit(empQ); } db.SubmitChanges(); } return(Content("Success")); } catch (Exception ex) { string strErr = ex.Message; return(Content(strErr)); } }
public ActionResult Edit(Nullable <int> id, FormCollection formValues) { // this method used just for delete now uls_dbDataContext db = new uls_dbDataContext(); Qualifications qual = new Qualifications(); int intQualCnt = 0; try { string strOper = formValues.GetValues("oper")[0]; string strEmployeeID = formValues.GetValues("id")[0]; employee emp; if (strOper == "del") { intQualCnt = qual.GetQualCount(strEmployeeID); if (intQualCnt == 0) { emp = db.employees.Single(e => e.employeeID == Convert.ToInt32(strEmployeeID)); db.employees.DeleteOnSubmit(emp); db.SubmitChanges(); } } if (intQualCnt == 0) { return(Content("Success")); } else { return(Content("Failure to delete- make sure qualifications for this employee are deleted first!")); } } catch (Exception ex) { string strErr = ex.Message; return(Content(strErr)); } }
public async Task HandleAsync(AddQualification command, ICorrelationContext context) { Institute institute = await _institutessRepo.GetAsync(command.InstituteId); if (institute == null) { throw new MedParkException("qualification_institute_does_not_Exist", $"The institute {command.Id } does not exist."); } Qualifications q = new Qualifications(command.Id) { InstituteId = command.InstituteId, QualificationName = command.QualificationName, YearObtained = command.YearObtained, CredentialId = command.CredentialId }; await _qualificationsRepo.AddAsync(q); }
public List <Qualifications> Get(int UserId) { var reader = this.GetReader($"select * from Qualifications where UserId='{UserId}' "); var qualifications = new List <Qualifications>(); while (reader.Read()) { var qualification = new Qualifications(); qualification.QualificationId = reader.GetInt32(0); qualification.UserId = reader.GetInt32(1); qualification.HighestQualification = reader.GetString(2); qualification.Courses = reader.GetString(3); qualification.Specilization = reader.GetString(4); qualification.PassingYear = reader.GetString(5); qualification.Universiy = reader.GetString(6); qualification.CourseType = reader.GetString(7); qualifications.Add(qualification); } return(qualifications); }
public void InitializeQualifications() { var candidateQualifications = CandidateQualificationService.GetAll().Where(c => c.CandidateId == OldCandidate.Id); Qualifications.Clear(); foreach (var v in QualificationsService.GetAllAndMapToQualificationWithCheckBoxDto()) { if (candidateQualifications.Any(d => d.CandidateId == OldCandidate.Id && d.QualificationId == v.Qualification.Id)) { v.IsSelected = true; } else { v.IsSelected = false; } Qualifications.Add(v); } }