示例#1
0
        private void FillTable()
        {
            int count = 0;

            AutoCodeItems.RefreshCache();
            AutoCodeConds.RefreshCache();
            _listAutoCodeConds = AutoCodeConds.GetDeepCopy();
            listForCode        = AutoCodeItems.GetListForCode(AutoCodeCur.AutoCodeNum);
            tbAutoItem.ResetRows(listForCode.Count);
            tbAutoItem.SetGridColor(Color.Gray);
            tbAutoItem.SetBackGColor(Color.White);
            for (int i = 0; i < listForCode.Count; i++)
            {
                tbAutoItem.Cell[0, i] = ProcedureCodes.GetProcCode(listForCode[i].CodeNum).ProcCode;
                tbAutoItem.Cell[1, i] = ProcedureCodes.GetProcCode(listForCode[i].CodeNum).Descript;
                count = 0;
                for (int j = 0; j < _listAutoCodeConds.Count; j++)
                {
                    if (_listAutoCodeConds[j].AutoCodeItemNum == listForCode[i].AutoCodeItemNum)
                    {
                        if (count != 0)
                        {
                            tbAutoItem.Cell[2, i] += ", ";
                        }
                        tbAutoItem.Cell[2, i] += _listAutoCodeConds[j].Cond.ToString();
                        count++;
                    }
                }
            }
            tbAutoItem.LayoutTables();
        }
示例#2
0
        private void FillTable()
        {
            int count = 0;

            AutoCodeItems.Refresh();
            AutoCodeConds.Refresh();
            AutoCodeItems.GetListForCode(AutoCodeCur.AutoCodeNum);
            tbAutoItem.ResetRows(AutoCodeItems.ListForCode.Length);
            tbAutoItem.SetGridColor(Color.Gray);
            tbAutoItem.SetBackGColor(Color.White);
            for (int i = 0; i < AutoCodeItems.ListForCode.Length; i++)
            {
                tbAutoItem.Cell[0, i] = ProcedureCodes.GetProcCode(AutoCodeItems.ListForCode[i].CodeNum).ProcCode;
                tbAutoItem.Cell[1, i] = ProcedureCodes.GetProcCode(AutoCodeItems.ListForCode[i].CodeNum).Descript;
                count = 0;
                for (int j = 0; j < AutoCodeConds.List.Length; j++)
                {
                    if (AutoCodeConds.List[j].AutoCodeItemNum == AutoCodeItems.ListForCode[i].AutoCodeItemNum)
                    {
                        if (count != 0)
                        {
                            tbAutoItem.Cell[2, i] += ", ";
                        }
                        tbAutoItem.Cell[2, i] += AutoCodeConds.List[j].Cond.ToString();
                        count++;
                    }
                }
            }
            tbAutoItem.LayoutTables();
        }