Exemplo n.º 1
0
        private void InitTestType()
        {
            DataSet ds = CodeInfoManage.GetInfoByClassID(CodeInfoManage._TEST_TYPE);

            DropDownListType.DataSource     = ds;
            DropDownListType.DataTextField  = "NAME";
            DropDownListType.DataValueField = "CODE";
            DropDownListType.DataBind();
        }
Exemplo n.º 2
0
        private void InitOrderSub()
        {
            DataSet company = CompanyManage.GetCompany();

            foreach (DataRow c in company.Tables[0].Rows)
            {
                TreeNode n1 = new TreeNode(c["NAME"] as string);
                n1.SelectAction = TreeNodeSelectAction.None;
                n1.ShowCheckBox = false;
                DataSet item = OrderItemManage.GetOrderItem(c["CODE"] as string, "1", "");
                foreach (DataRow i in item.Tables[0].Rows)
                {
                    TreeNode n2 = new TreeNode(i["SERIES_NAME"] as string);
                    n2.SelectAction = TreeNodeSelectAction.None;
                    n2.ToolTip      = "series";
                    //n2.Value = i["CODE"] as string;
                    DataSet sub = OrderItemSubManage.GetItemSub(i["CODE"] as string);
                    foreach (DataRow s in sub.Tables[0].Rows)
                    {
                        TreeNode n3 = new TreeNode(s["NAME"] as string, s["ITEM_CODE"] as string + ",1," + s["CODE"] as string + "," + s["SERIES_DEP_CODE"] + "," + s["SERIES_NAME"]);
                        n3.SelectAction = TreeNodeSelectAction.None;
                        //n3.ToolTip = n2.Value;
                        n2.ChildNodes.Add(n3);
                    }
                    n1.ChildNodes.Add(n2);
                }

                TreeViewOrderSub.Nodes.Add(n1);
            }

            TreeNode s_item = new TreeNode("单项");

            s_item.ShowCheckBox = false;
            s_item.SelectAction = TreeNodeSelectAction.None;

            DataSet type = CodeInfoManage.GetInfoByClassID(CodeInfoManage._TEST_TYPE);

            foreach (DataRow t in type.Tables[0].Rows)
            {
                TreeNode n1 = new TreeNode(t["NAME"] as string);
                n1.SelectAction = TreeNodeSelectAction.None;
                n1.ToolTip      = "series";
                DataSet item = OrderItemManage.GetOrderItem("", "2", t["CODE"] as string);
                foreach (DataRow i in item.Tables[0].Rows)
                {
                    TreeNode n2 = new TreeNode(i["NAME"] as string, i["ITEM_LIST"] as string + ",2," + i["CODE"] as string + ",,");
                    n2.SelectAction = TreeNodeSelectAction.None;
                    n1.ChildNodes.Add(n2);
                }
                s_item.ChildNodes.Add(n1);
            }
            TreeViewOrderSub.Nodes.Add(s_item);

            TreeViewOrderSub.Attributes.Add("onclick", "postBackByObject()");
        }
Exemplo n.º 3
0
        private void InitTestMethod(string testMethod)
        {
            DataSet ds = CodeInfoManage.GetInfoByClassID(CodeInfoManage._TEST_METHOD);

            DropDownListTestMethod.DataSource     = ds;
            DropDownListTestMethod.DataTextField  = "NAME";
            DropDownListTestMethod.DataValueField = "CODE";

            DropDownListTestMethod.SelectedValue = testMethod;
            DropDownListTestMethod.DataBind();
        }
        private void InitTestType(string testType)
        {
            DataSet ds = CodeInfoManage.GetInfoByClassID(CodeInfoManage._TEST_TYPE);

            DropDownListTestType.DataSource     = ds;
            DropDownListTestType.DataTextField  = "NAME";
            DropDownListTestType.DataValueField = "CODE";
            DropDownListTestType.DataBind();

            if (!string.IsNullOrEmpty(testType))
            {
                DropDownListTestType.SelectedValue = testType;
            }
        }
        private void InitItemCheckList()
        {
            DataSet ds      = CodeInfoManage.GetInfoByClassID(CodeInfoManage._TEST_TYPE);
            string  instrID = Request.QueryString["instrumentID"];

            TreeViewItemList.Nodes.Clear();
            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                TreeNode tn = new TreeNode(dr["Name"] as string);
                tn.SelectAction = TreeNodeSelectAction.None;
                DataSet items = GeneralItemManage.GetItemListExculdeInstrItem(dr["CODE"] as string, instrID);
                foreach (DataRow drItem in items.Tables[0].Rows)
                {
                    string   name   = drItem["NAME"] as string;
                    string   code   = drItem["ITEM_CODE"] as string;
                    TreeNode trItem = new TreeNode(code + name, code);
                    trItem.SelectAction = TreeNodeSelectAction.None;
                    tn.ChildNodes.Add(trItem);
                }
                TreeViewItemList.Nodes.Add(tn);
            }
        }