public CascadingDropDownNameValue[] GetStepsByGradeId(string knownCategoryValues, string category) { StringDictionary kv = CascadingDropDown.ParseKnownCategoryValuesString(knownCategoryValues); string gradeId; if (!kv.ContainsKey("Grade")) { return(null); } gradeId = kv["Grade"]; List <CascadingDropDownNameValue> values = new List <CascadingDropDownNameValue>(); List <StepEntity> list = new StepMapper().ListByGradeId(gradeId); foreach (StepEntity ent in list) { string text = (ent.Id); CascadingDropDownNameValue cdnv = new CascadingDropDownNameValue(text, ent.Id.ToString()); values.Add(cdnv); } return(values.ToArray()); }
public FixedList <StepDescriptorDto> SearchSteps(SearchStepsCommand searchCommand) { Assertion.Require(searchCommand, "searchCommand"); var list = Step.GetList(searchCommand); return(StepMapper.MapToShortModel(list)); }
public StepDto GetStep(string stepUID) { Assertion.Require(stepUID, "stepUID"); var step = Step.Parse(stepUID); return(StepMapper.Map(step)); }
private void UpdateDisplayedSteps() { var item = cmbAttributes.SelectedItem as ObjectCollectionItem <AttributeMetadata>; if (item == null) { return; } var action = GetCurrentAction(); if (action.HasFlag(Logic.Action.Delete)) { clbSteps.LoadItems(DeleteSteps); } else if (txtNewAttributeName.Text == item.Value.SchemaName && !action.HasFlag(Logic.Action.ChangeType)) { // Exactly Equal if (action.HasFlag(Logic.Action.RemoveTemp)) { clbSteps.LoadItems(RenameSteps); } else { clbSteps.Items.Clear(); } } else if (action.HasFlag(Logic.Action.ChangeCase)) { var steps = chkMigrate.Checked ? StepMapper.Select(v => v.Key) : StepMapper.Where(p => p.Value != Logic.Steps.MigrateDataToTemp && p.Value != Logic.Steps.MigrateDataToNewAttribute).Select(v => v.Key); // Change Case clbSteps.LoadItems(steps.ToObjectArray()); } else if (action.HasFlag(Logic.Action.RemoveTemp)) { // Partial Completion. Need to allow for Migrate to Temp and Remove var steps = StepMapper.Where(p => (p.Value == Logic.Steps.MigrateDataToTemp && chkMigrate.Checked) || p.Value == Logic.Steps.MigrateToNewAttribute || p.Value == Logic.Steps.RemoveTemp).Select(v => v.Key); clbSteps.LoadItems(steps.ToObjectArray()); } else if (clbSteps.Items.Count != RenameSteps.Length) { // Rename clbSteps.LoadItems(RenameSteps); } CheckAllSteps(); }
protected void ProceedButton_Click(object sender, EventArgs e) { JobDetailsSessionView jbs = new JobDetailsSessionView(); FunctionalLevelEntity flentity = new FunctionalLevelEntity(); flentity.Id = Convert.ToInt32(FunctionalLevelDropDownList.SelectedValue); flentity = new FunctionalLevelMapper().Get(flentity); jbs.FunctionalLevel = flentity; OrganizationalUnitEntity ouentity = new OrganizationalUnitEntity(); ouentity.Id = Convert.ToInt32(OrganisationalUnitDropDownList.SelectedValue); OrganizationalUnitView ouView = new OrganizationalUnitMapper().Get(ouentity); jbs.OrganisationalUnit = ouView; GradeEntity gentity = new GradeEntity(); gentity.Id = GradeDropDownList.SelectedValue; gentity = new GradeMapper().Get(gentity); jbs.Grade = gentity; JobTitleEntity job = new JobTitleEntity(); job.JobCode = JobDetailsDropDownList.SelectedValue; JobTitleView jobview = new JobTitleMapper().Get(job); jbs.Job = jobview; StepEntity sentity = new StepEntity(); sentity.Id = StepDropDownList.SelectedValue; sentity = new StepMapper().Get(sentity); jbs.Step = sentity; foreach (ListItem item in ContractsCheckBoxList.Items) { if (item.Selected == true) { jbs.ContractsTemplates.Add(new ContractTemplateEntity() { Id = Convert.ToInt32(item.Value), Title = item.Text }); } } Session.Add("JobDetails", jbs); Response.Redirect("Contract.aspx?EmployeeId=" + Request.QueryString["EmployeeId"] + "&ContractTemplateId=" + jbs.ContractsTemplates[0].Id); }
public Step FindStep(string stepName, Dictionary <string, string> parameters) { Step step = FindStepByName(stepName); //if (step == null) // step = FindStepByBaseName(stepName); if (step != null) { return(step); } StepMapper route = FindRouteByName(stepName); if (route == null) { return(null); } stepName = StringHelper.ReplaceReferences(route.RoutePath, parameters); return(FindStepByName(stepName)); }
public ProcessMap DefineStepMapper(StepMapper stepMapper) { return(DefineStepMapper(stepMapper.Name, stepMapper.RoutePath)); }
public CascadingDropDownNameValue[] GetStepsByGradeId(string knownCategoryValues, string category) { StringDictionary kv = CascadingDropDown.ParseKnownCategoryValuesString(knownCategoryValues); string gradeId; if (!kv.ContainsKey("Grade")) { return null; } gradeId = kv["Grade"]; List<CascadingDropDownNameValue> values = new List<CascadingDropDownNameValue>(); List<StepEntity> list = new StepMapper().ListByGradeId(gradeId); foreach (StepEntity ent in list) { string text = (ent.Id); CascadingDropDownNameValue cdnv = new CascadingDropDownNameValue(text, ent.Id.ToString()); values.Add(cdnv); } return values.ToArray(); }
/// <summary> /// Разместить этапы программирования /// </summary> /// <param name="Base"></param> /// <param name="Actions"></param> /// <param name="M"></param> /// <returns></returns> public static StepControl[] PlaceSteps(Control Base, Project.Action[] Actions, StepMapper M) { var Steps = new List <StepControl>(); M.Reset(); foreach (var A in Actions) { var S = M.CreateNextControl(A.Comment, A) as StepControl; Steps.Add(S); Base.Controls.Add(S); } return(Steps.ToArray()); }