public ActionResult _AdvancedSearch() { DropdownList list = new DropdownList(); list.Departments = list.DepartmentList(); list.CoorList = list.CoorNameList(); list.AppointmentMode = list.Dropdown(); list.types = list.TypeList(); return(PartialView("_AdvancedSearch", list)); }
public JsonResult GetProjects(string text) { IEnumerable <ProjectLookUp> projects = DropdownList.ProjectManagerPMS((long)Session[Constants.SessionEmpID], (long)(Session[Constants.SessionRoleID])); if (!string.IsNullOrEmpty(text)) { projects = projects.Where(p => p.ProjectName.Contains(text)); } return(Json(projects, JsonRequestBehavior.AllowGet)); }
public ActionResult Index(string message = null) { if (string.IsNullOrEmpty(message) && TempData.ContainsKey("ProjectCreated")) { message = TempData["ProjectCreated"].ToString(); TempData.Remove("ProjectCreated"); } ViewBag.Message = message ?? ""; ViewBag.GrantList = DropdownList.GrantList(); return(View()); }
public CategoryService( QueryOptions queryOptions, DropdownList dropdownList, ModelValidator modelValidator, IUriHelper uriHelper, JSInterop js, DataContextFactory contextFactory) : base(queryOptions, modelValidator) { DropdownList = dropdownList; _uriHelper = uriHelper; _js = js; _contextFactory = contextFactory; }
public void ResetContexts() { BA_ContextTypes = new DropdownList <string>() { { "MOVE", "MOVE" }, { "SHOOT", "SHOOT" }, { "BUILD", "BUILD" } }; NewContext = ""; }
public JsonResult GetMembers(string text) { IEnumerable <EmployeeLookUp> emps = DropdownList.EmployeeListViaRole((long)Session[Constants.SessionEmpID], (long)(Session[Constants.SessionRoleID])); if (!string.IsNullOrEmpty(text)) { emps = emps.Where(p => p.EmpName.Contains(text)); } return(Json(emps, JsonRequestBehavior.AllowGet)); }
private void GetDefaults() { ViewBag.RoleList = DropdownList.RoleList(); ViewBag.GrantList = DropdownList.GrantList(); ViewBag.ThemeList = DropdownList.ThemeList(); ViewBag.ResearchList = DropdownList.ResearchList(); ViewBag.ResearchTypeList = DropdownList.ResearchTypeList(); ViewBag.projectList = DropdownList.ProjectListAdmin(); ViewBag.ProjectID = TempData["projectid"]; ViewBag.costList = DropdownList.CostCenterList(); }
private void MakeAttributeList() { if (!target.schema) { attributes = null; } attributes = new DropdownList <Analysis.Attribute>(target.schema.attributes, (Analysis.Attribute attr) => $"{attr.label} ({attr.type}) ", target.attribute); //MakeCheckpointList(); //target.attribute = null; }
public JsonResult GetGrantTypes(long?projectId, string text) { var empId = (Int64)Session[Constants.SessionEmpID]; IEnumerable <MasterLookUp> projects = projectId.HasValue ? DropdownList.GetGrantListByProjectId(projectId.Value, empId) : DropdownList.GrantList(empId); if (!string.IsNullOrEmpty(text)) { projects = projects.Where(p => p.MstCode.ToLower().Contains(text.ToLower())); } return(Json(projects, JsonRequestBehavior.AllowGet)); }
public JsonResult GetProjects(long?grantID, string text) { IEnumerable <ProjectLookUp> projects = grantID.HasValue ? DropdownList.GetProjectListByGrantId(Convert.ToInt64(Session[Constants.SessionEmpID]), Convert.ToInt64(Session[Constants.SessionRoleID]), grantID.Value) : DropdownList.ProjectList(Convert.ToInt64(Session[Constants.SessionEmpID]), Convert.ToInt64(Session[Constants.SessionRoleID])); if (!string.IsNullOrEmpty(text)) { projects = projects.Where(p => p.ProjectName.ToLower().Contains(text.ToLower())); } return(Json(projects, JsonRequestBehavior.AllowGet)); }
public JsonResult GetGrantType(string text) { if (!string.IsNullOrEmpty(text)) { var emails = (from x in DropdownList.GrantList().Where(x => x.MstCode.ToLower().Contains(text.ToLower())) select new { x.MstCode, x.MstID }).ToList(); return(Json(emails, JsonRequestBehavior.AllowGet)); } else { return(Json(new List <string>(), JsonRequestBehavior.AllowGet)); } }
public ActionResult Edit(int?id) { ViewBag.ProjectList = DropdownList.ProjectList((long)Session[Constants.SessionEmpID], (long)(Session[Constants.SessionRoleID])); try { var entry = DB.EmpTimeSheet.Where(x => x.TsID == id).Select(x => new { x.Quart }).FirstOrDefault(); return(View("Index", BindData(entry.Quart))); } catch (Exception ex) { LogHelper.ErrorLog(ex); throw ex; } }
public DropdownList <string> GetLanguage() { var result = new DropdownList <string>(); foreach (var obj in Resources.FindObjectsOfTypeAll(typeof(ScriptableObject)) as ScriptableObject[]) { if (EditorUtility.IsPersistent(obj)) { string pathToAsset = UnityEditor.AssetDatabase.GetAssetPath(obj); if (pathToAsset.StartsWith("Assets/Resources/Datas/Localization")) { result.Add(obj.name, obj.name); } } } return(result); }
private void CreateDropDowns(BusskortServiceReference.Anmälan anmälan, bool GetSelectedValue) { DropdownList dropdown = new DropdownList(); if (GetSelectedValue) { ViewBag.DropDownYears = dropdown.GetSelectedValueFromDropDownYear(anmälan.Årskurs); // Årskurs always has a value, Beviljad does not if (anmälan.Beviljad != null) { ViewBag.DropDownBeviljad = dropdown.GetSelectedValueFromBeviljadDropDown(anmälan.Beviljad); } else { ViewBag.DropDownBeviljad = dropdown.GetBeviljadDropDown(); } } }
// GET: NewEntryOnBehalfOne public ActionResult Index(string quarter = null) { //ViewBag.EmployeeList = DropdownList.EmployeeListViaRole((long)Session[Constants.SessionEmpID], (long)(Session[Constants.SessionRoleID])); // ViewBag.ProjectList = DropdownList.ProjectList((long)Session[Constants.SessionEmpID], (long)(Session[Constants.SessionRoleID])); ViewBag.Quadrent = quarter ?? GetQuardrent(); long empId = (long)Session[Constants.SessionEmpID]; ViewBag.QuarterList = DropdownList.PreviousAndQuarterListNewEntryOnBehalf(empId); NewEntryByProjectSelection model = new NewEntryByProjectSelection { Quarter = ViewBag.Quadrent, Month1 = "Jan-2019" }; return(View(model)); }
public ActionResult Index() { Common.DropdownList dropdown = new DropdownList(); List <SelectListItem> ss = new List <SelectListItem>(); ss.Add(new SelectListItem { Text = "顶级分类", Value = "顶级分类" }); List <SelectListItem> s = dropdown.Get_nav(0); ss.AddRange(s); ViewData["list"] = ss; List <Category> list = bCategory.GetCategoriesList(0); ViewData["dtable"] = list; ViewData["count"] = bCategory.GetCount(); return(View()); }
public IDropdownList GetAssetNames() { var values = new DropdownList <string>() { { "None", string.Empty } }; for (var i = 0; i < _scenes.Length; i++) { if (_scenes[i] == null || !_scenes[i].editorAsset || string.IsNullOrEmpty(_scenes[i].AssetGUID)) { continue; } values.Add(_scenes[i].editorAsset.name, _scenes[i].AssetGUID); } return(values); }
public DropdownList <string> GetTextName() { var result = new DropdownList <string>(); var inGameText = InGameText.GetInstance(); if (inGameText) { var textList = inGameText.GetTextList(); foreach (var text in textList.texts) { result.Add(text.name, text.name); } } else { LogHelper.LogWarning("Missing In Game Text instance for Text Localization"); } return(result); }
public ActionResult Edit() { try { int ProjectId = Convert.ToInt16(Session["ProjectId"]); ViewBag.GrantList = DropdownList.GrantList(); ViewBag.ResearchList = DropdownList.ResearchList(); ViewBag.ResearchTypeList = DropdownList.ResearchTypeList(); ProjectMasterModel projectmasterlist = DB.ProjectMaster.Where(x => x.ProjectID == ProjectId).FirstOrDefault(); Session["ProjectDetails"] = projectmasterlist; //return Json(new { data= projectmasterlist }); return(RedirectToAction("ProjectEdit", "ProjectMaster")); } catch (Exception ex) { LogHelper.ErrorLog(ex); throw ex; } }
public ActionResult CateEdit(string id) { int ids = id == null ? 0 : int.Parse(id); Common.DropdownList drop = new DropdownList(); List <SelectListItem> ss = new List <SelectListItem>(); ss.Add(new SelectListItem { Text = "顶级分类", Value = "顶级分类" }); List <SelectListItem> s = drop.Get_nav(0); ss.AddRange(s); ViewData["selectlist"] = ss; Category a = bCategory.GetById(ids); ViewData["CateE"] = a; return(View()); }
private void HookupWidgets() { _animationDropdownList = _widget.FindWidgetByUniqueName <DropdownList>(AnimationTypeDropdownListName); PopulateDropdownList(); _animationDropdownList.Change += AnimationDropdownListOnChange; _selectedFrameTimeLabel = _widget.FindWidgetByUniqueName <Label>(SelectedFrameTimeLabelName); _animationCopyButton = _widget.FindWidgetByUniqueName <Button>(AnimationCopyButtonName); _animationPasteButton = _widget.FindWidgetByUniqueName <Button>(AnimationPasteButtonName); _frameCreateButton = _widget.FindWidgetByUniqueName <Button>(FrameCreateButtonName); _frameCreateButton.Click += FrameCreateButtonOnClick; _frameSaveButton = _widget.FindWidgetByUniqueName <Button>(FrameSaveButtonName); _frameSaveButton.Click += FrameSaveButtonOnClick; _frameLoadButton = _widget.FindWidgetByUniqueName <Button>(FrameLoadButtonName); _frameLoadButton.Click += FrameLoadButtonOnClick; _frameDeleteButton = _widget.FindWidgetByUniqueName <Button>(FrameDeleteButtonName); _frameDeleteButton.Click += FrameDeleteButtonOnClick; _frameDuplicateButton = _widget.FindWidgetByUniqueName <Button>(FrameDuplicateButtonName); _frameTimeline = _widget.FindWidgetByUniqueName <Timeline>(FrameTimelineName); _frameTimeline.MarkerDoubleClick += (sender, args) => MarkerDoubleClick(args.Marker.Id); _frameTimeline.MarkerClick += (sender, args) => MarkerSingleClick(args.Marker.Id); _frameTimeline.MarkerMove += (sender, args) => MarkerMove(args.Marker.Id); _frameTimeline.TimelineClick += FrameTimelineOnTimelineClick; _secondsTimeline = _widget.FindWidgetByUniqueName <Timeline>(SecondsTimelineName); _secondsTimeline.MarkerDoubleClick += (sender, args) => MarkerDoubleClick(args.Marker.Id); _secondsTimeline.MarkerClick += (sender, args) => MarkerSingleClick(args.Marker.Id); _secondsTimeline.MarkerMove += (sender, args) => MarkerMove(args.Marker.Id); _secondsTimeline.TimelineClick += SecondsTimelineOnTimelineClick; _playButton = _widget.FindWidgetByUniqueName <ToggleButton>(PlayButtonName); _playButton.Toggled += PlayButtonOnToggled; }
public ActionResult EmployeeEdit(long ProjectId, long EmployeeID) { try { ProjectEmpList GetDetails = DB.Database.SqlQuery <ProjectEmpList>( @"exec " + Constants.P_GetEmp_Project_Details_Edit + " @EmpId,@ProjectId", new object[] { new SqlParameter("@ProjectId", ProjectId), new SqlParameter("@EmpId", EmployeeID) }).ToList().FirstOrDefault(); ViewBag.ProjectId = ProjectId; ViewBag.RoleList = DropdownList.RoleList(); ViewBag.RoleID = GetDetails.RoleID; return(View(GetDetails)); } catch (Exception ex) { LogHelper.ErrorLog(ex); throw ex; } }
public ActionResult Index(string quarter = null) { quarter = quarter ?? GetQuarter(); long empId = Convert.ToInt64(Session[Constants.SessionEmpID]); ViewBag.QuarterList = DropdownList.PreviousAndQuarterList(empId, true); if (TempData["EmailNotificationErrors"] != null) { var emailErrors = (TempData["EmailNotificationErrors"] as List <string>); if (emailErrors.Any()) { ViewBag.EmailNotificationErrors = "Unable to send notification email for the below projects line" + string.Join("lineline", emailErrors); } else { ViewBag.EmailNotificationErrors = ""; } } else { ViewBag.EmailNotificationErrors = ""; } return(View(BindData(quarter))); }
public override VisualElement CreatePropertyGUI(SerializedProperty property) { /// _property = property; _valueProperty = property.FindPropertyRelative("floatValue"); _colorProperty = property.FindPropertyRelative("colorValue"); _propertyTypeProperty = property.FindPropertyRelative("propertyType"); var treePath = this.GetAssetPath() + TREE_NAME; var styleSheetPath = this.GetAssetPath() + STYLE_SHEET; _mainContainer = ROJOEditor.LoadAssetTree(treePath); _mainContainer.name = _mainContainer.GetHashCode().ToString(); _mainContainer.LoadStyleSheet(styleSheetPath); _propertyName = property.FindPropertyRelative("propertyName"); var component = property.serializedObject.targetObject as MonoBehaviour; _targetObject = component.gameObject; var typeField = _mainContainer.Q <EnumField>(name: "typeField"); typeField.Init(AnimationType.Punch); typeField.BindProperty(property.FindPropertyRelative("AnimationType")); _shaderPropertiesField = _mainContainer.Q <DropdownList>(name: "shaderPropertiesField"); _valueContainer = _mainContainer.Q <VisualElement>(name: "valueContainer"); var durationField = _mainContainer.Q <FloatField>(name: "duration"); durationField.BindProperty(property.FindPropertyRelative("duration")); GetShader(_propertyName.stringValue); InitShaderPropertiesField(_enumValue); SetShaderProperty(_shaderPropertiesField.value); return(_mainContainer); }
public ActionResult UpdateEmployee(ProjectEmpList EEP) { try { if (EEP.StartDate == DateTime.MinValue || EEP.EndDate == DateTime.MinValue) { ViewBag.RoleList = DropdownList.RoleList(); ViewBag.Message = "Please enter valid start date or end date"; return(View("EmployeeEdit", EEP)); } if (EEP.EndDate < EEP.StartDate) { ViewBag.RoleList = DropdownList.RoleList(); ViewBag.Message = "End Date Can not be less than the start date"; return(View("EmployeeEdit", EEP)); } long empid = EEP.EmployeeID; DateTime startDate = Convert.ToDateTime(EEP.StartDate); DateTime endDate = Convert.ToDateTime(EEP.EndDate); DateTime currentDate = DateTime.Now; //long projectID = Convert.ToInt64(Session["ProjectId"]); List <int> totalInvolvement = DB.Employee.Where(x => x.EmployeeID == empid).Select(x => x.TotalInvolvement ?? 100).ToList(); decimal? currentInvolvement = (from x in DB.ProjectEmployee join y in DB.ProjectMaster on x.ProjectID equals y.ProjectID where x.EmployeeID == empid && (x.EndDate >= DateTime.Now || !x.EndDate.HasValue) && x.ProjectID != EEP.ProjectID select x.InvPercentage).Sum(); // currentInvolvement = currentInvolvement + EEP.InvPercentage; if (totalInvolvement[0] >= (currentInvolvement ?? 0)) { decimal?availableInvolvement = totalInvolvement[0] - (currentInvolvement ?? 0); if (availableInvolvement >= EEP.InvPercentage) { // var projectId = Convert.ToInt64(Session["ProjectId"].ToString()); ProjectEmployeesModel emp = DB.ProjectEmployee.AsQueryable().FirstOrDefault(x => x.EmployeeID == EEP.EmployeeID && x.ProjectID == EEP.ProjectID); if (emp != null) { emp.CheckRole = EEP.CheckRole; emp.InvPercentage = EEP.InvPercentage; emp.ModifiedBy = (long)Session[Constants.SessionEmpID]; emp.ModifiedDate = DateTime.Now; emp.StartDate = EEP.StartDate; emp.EndDate = EEP.EndDate; emp.RefRole = EEP.IsRDProject == 1 ? EEP.RoleID : 0; DB.Entry(emp).State = System.Data.Entity.EntityState.Modified; DB.SaveChanges(); } } else { ViewBag.RoleList = DropdownList.RoleList(); ViewBag.Message = "The maximum limit of involvement percentage is exceed. Please edit Percentage of Involvment field"; return(View("EmployeeEdit", EEP)); } } else { ViewBag.RoleList = DropdownList.RoleList(); ViewBag.Message = "Exceeds the Total Involvement Percentage Limit"; return(View("EmployeeEdit", EEP)); } return(RedirectToAction("ProjectEdit", "ProjectMaster", new { id = EEP.ProjectID })); } catch (Exception ex) { LogHelper.ErrorLog(ex); throw ex; } }
public void selection(DropdownList mdropdownList) { dropdownList = mdropdownList; }
public void init() { dropdownList = new DropdownList(); AddActionClassesToList(dropdownList); }
public async Task UpdateAsync(DropdownList entity) { await _dropdownListRepository.UpdateAsync(entity); }
public async Task <DropdownList> CreateAsync(DropdownList entity) { entity.Id = await _dropdownListRepository.InsertAndGetIdAsync(entity); return(entity); }
public JsonResult GetEmpRoleList() { return(Json(DropdownList.RoleList(), JsonRequestBehavior.AllowGet)); }