private void FormTaskSetup_Load(object sender, EventArgs e) { UserList = Userods.GetNotHidden(); UserListOld = Userods.GetNotHidden(); TrunkList = TaskLists.RefreshMainTrunk(Security.CurUser.UserNum); listMain.Items.Add(Lan.g(this, "none")); for (int i = 0; i < TrunkList.Count; i++) { listMain.Items.Add(TrunkList[i].Descript); } FillGrid(); }
private void FormTaskSendUser_Load(object sender, EventArgs e) { List <Userod> UserList = Userods.GetNotHidden(); List <TaskList> TrunkList = TaskLists.RefreshMainTrunk(Security.CurUser.UserNum); FilteredList = new List <TaskList>(); for (int i = 0; i < UserList.Count; i++) { if (UserList[i].TaskListInBox == 0) { continue; } for (int t = 0; t < TrunkList.Count; t++) { if (TrunkList[t].TaskListNum == UserList[i].TaskListInBox) { FilteredList.Add(TrunkList[t]); listMain.Items.Add(TrunkList[t].Descript); } } } }
private void FillGrid() { gridMain.BeginUpdate(); gridMain.Columns.Clear(); ODGridColumn col; col = new ODGridColumn("User Name", 120); gridMain.Columns.Add(col); col = new ODGridColumn("Group Name", 120); gridMain.Columns.Add(col); col = new ODGridColumn("Show CDS", 80, HorizontalAlignment.Center); gridMain.Columns.Add(col); col = new ODGridColumn("Show i", 80, HorizontalAlignment.Center); gridMain.Columns.Add(col); col = new ODGridColumn("Edit CDS", 80, HorizontalAlignment.Center); gridMain.Columns.Add(col); col = new ODGridColumn("Source", 80, HorizontalAlignment.Center); gridMain.Columns.Add(col); col = new ODGridColumn("Problem", 80, HorizontalAlignment.Center); gridMain.Columns.Add(col); col = new ODGridColumn("Medication", 80, HorizontalAlignment.Center); gridMain.Columns.Add(col); col = new ODGridColumn("Allergy", 80, HorizontalAlignment.Center); gridMain.Columns.Add(col); col = new ODGridColumn("Demographic", 80, HorizontalAlignment.Center); gridMain.Columns.Add(col); col = new ODGridColumn("Labs", 80, HorizontalAlignment.Center); gridMain.Columns.Add(col); col = new ODGridColumn("Vitals", 80, HorizontalAlignment.Center); gridMain.Columns.Add(col); gridMain.Rows.Clear(); ODGridRow row; List <Userod> ListUsers = Userods.GetNotHidden(); UserGroup[] ArrayGroups = UserGroups.List; //if(radioUser.Checked) {//by user for (int i = 0; i < ListUsers.Count; i++) { row = new ODGridRow(); row.Cells.Add(ListUsers[i].UserName); for (int g = 0; g < ArrayGroups.Length; g++) //group name. { if (ListUsers[i].UserGroupNum != ArrayGroups[g].UserGroupNum) { continue; } row.Cells.Add(ArrayGroups[g].Description); break; } for (int p = 0; p < _listCdsPermissions.Count; p++) { if (ListUsers[i].UserNum != _listCdsPermissions[p].UserNum) { continue; } row.Cells.Add((_listCdsPermissions[p].ShowCDS ?"X":"")); //"X" if user has permission row.Cells.Add((_listCdsPermissions[p].SetupCDS ?"X":"")); //"X" if user has permission row.Cells.Add((_listCdsPermissions[p].ShowInfobutton ?"X":"")); //"X" if user has permission row.Cells.Add((_listCdsPermissions[p].EditBibliography ?"X":"")); //"X" if user has permission row.Cells.Add((_listCdsPermissions[p].ProblemCDS ?"X":"")); //"X" if user has permission row.Cells.Add((_listCdsPermissions[p].MedicationCDS ?"X":"")); //"X" if user has permission row.Cells.Add((_listCdsPermissions[p].AllergyCDS ?"X":"")); //"X" if user has permission row.Cells.Add((_listCdsPermissions[p].DemographicCDS ?"X":"")); //"X" if user has permission row.Cells.Add((_listCdsPermissions[p].LabTestCDS ?"X":"")); //"X" if user has permission row.Cells.Add((_listCdsPermissions[p].VitalCDS ?"X":"")); //"X" if user has permission row.Tag = _listCdsPermissions[p].CDSPermissionNum; //used to edit correct permission. break; } gridMain.Rows.Add(row); } //} //else {//by user group // for(int g=0;g<ArrayGroups.Length;g++) { // row=new ODGridRow(); // row.Cells.Add("");//No User Name // row.Cells.Add(ArrayGroups[g].Description); //TODO: Later. No time now for group level permission editing. // gridMain.Rows.Add(row); // } //} gridMain.EndUpdate(); }