Exemplo n.º 1
0
        private void UpdateMarkInfo()
        {
            MarkCellDao markDao = new MarkCellDao();

            MarkCell mark = markDao.GetMarkCellById(MarkId);
            Types    type = typesDao.GetTypeById(mark.TypeId);

            foreach (var v in lstCate)
            {
                if (v.CateId == type.CateId)
                {
                    cmbMarkCategory.Text = string.Format("{0}_{1}", v.CateId, v.CategoryName);
                    break;
                }
            }
            cmbMarkType.Text = string.Format("{0}_{1}", type.TypeId, type.CellType);

            txtRemark.Text = Remark;
        }
Exemplo n.º 2
0
        private void GetInfo(TreeNodeTag tag)
        {
            Category cate;
            Types    cellType;

            switch (tag.NodeType)
            {
            case TreeNodeType.Category:
                cate             = cateDao.GetCategory(tag.Id);
                cmbCateID.Text   = cate.CateId.ToString();
                txtCateName.Text = cate.CategoryName;
                break;

            case TreeNodeType.Type:
                cellType            = typesDao.GetTypeById(tag.Id);
                cmbCateID.Text      = cellType.CateId.ToString();
                txtTypeId.Text      = cellType.TypeId.ToString();
                txtCellType.Text    = cellType.CellType;
                txtCellCode.Text    = cellType.CellCode;
                txtDescription.Text = cellType.Description;
                cate             = cateDao.GetCategory(cellType.CateId);
                txtCateName.Text = cate.CategoryName;
                if (cellType.ColorStr != null && cellType.ColorStr != "NULL")
                {
                    btnColor.BackColor = ColorTranslator.FromHtml(cellType.ColorStr);
                }
                else
                {
                    btnColor.BackColor = Color.Black;
                }
                break;

            default:
                break;
            }
        }