public void PopulateData(int iclientUID) { client = new Client(HeaderInfo.Instance); client.UID = iclientUID; var repclient = RepClient.Read(client.UID); var response = repclient.responseStatus; // var response = client.Read(); if (response.ReturnCode == 1 && response.ReasonCode == 1) { clientOtherInfoList = ClientOtherInfo.List(client.UID); clientOtherInfoBindingSource.DataSource = clientOtherInfoList; var codeValue = new CodeValue(); var list = new List <CodeValue>(); var codeValueResponse = codeValue.ListS(CodeType.CodeTypeValue.ClientOtherField, list); codeValueBindingSource.DataSource = list; } else { MessageBox.Show(response.Message, "Error Populating Data.", MessageBoxButtons.OK, response.Icon); } }
/// <summary> /// Refresh cache /// </summary> /// <returns></returns> public static void LoadReferenceDataInCache(HeaderInfo headerInfo) { if (CachedInfo.ListOfCodeTypes == null) { CachedInfo.ListOfCodeTypes = new List <CodeType>(); } var codeType = new CodeType(); codeType.List(headerInfo); ListOfCodeTypes.Clear(); ListOfCodeTypes = codeType.codeTypeList; if (ListOfCodeValues != null) { ListOfCodeValues.Clear(); } var codeValue = new CodeValue(); ListOfCodeValues = codeValue.ListS(); if (ListOfScreensAllowedToUser != null) { ListOfScreensAllowedToUser.Clear(); } CachedInfo.ListOfScreensAllowedToUser = BUSReferenceData.GetListScreensForUser(Utils.UserID); return; }
/// <summary> /// List screens /// </summary> private void ListScreens() { tvScreenList.Nodes.Clear(); var codeValue = new CodeValue(); var listOfScreens = new List <CodeValue>(); codeValue.ListS(FCMConstant.CodeTypeString.SCREENCODE, listOfScreens); // List roles // CodeValue rootScreen = new CodeValue(); rootScreen.ID = "ROOT"; rootScreen.Description = "ROOT Screen"; var rootScreenNode = new TreeNode( rootScreen.ID, FCMConstant.Image.Folder, FCMConstant.Image.Folder); rootScreenNode.Tag = rootScreen; tvScreenList.Nodes.Add(rootScreenNode); foreach (var screen in listOfScreens) { var roleNode = new TreeNode( screen.Description, FCMConstant.Image.Checked, FCMConstant.Image.Checked); roleNode.Tag = screen; rootScreenNode.Nodes.Add(roleNode); } }