Пример #1
0
        public static void ProjectCmbBind(ToolStripComboBox p_cmb_project)
        {
            p_cmb_project.AutoCompleteSource = AutoCompleteSource.ListItems;
            p_cmb_project.AutoCompleteMode   = AutoCompleteMode.SuggestAppend;
            p_cmb_project.Items.Clear();
            DataSet   PartDS = project.FindProDataset();
            DataTable dt     = PartDS.Tables[0];

            foreach (DataRow row in dt.Rows)
            {
                ProjectCmbItem item = new ProjectCmbItem(row["description"].ToString(), row["project_id"].ToString());
                p_cmb_project.Items.Add(item);
            }
            //ProjectCmbItem itemn = new ProjectCmbItem("COSLProspector 半潜式钻井平台", "YCRO11-256");
            ////cmb_project.SelectedIndex = 7;
            //cmb_project.SelectedItem = itemn;
        }
Пример #2
0
 /// <summary>
 /// ��ȡERP����Ŀ�б�
 /// </summary>
 public void ProjectCmbBind()
 {
     cmb_project.AutoCompleteSource = AutoCompleteSource.ListItems;
     cmb_project.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
     cmb_project.Items.Clear();
     DataSet PartDS = project.FindProDataset();
     DataTable dt = PartDS.Tables[0];
     foreach (DataRow row in dt.Rows)
     {
         ProjectCmbItem item = new ProjectCmbItem(row["description"].ToString(), row["project_id"].ToString());
         cmb_project.Items.Add(item);
     }
     //ProjectCmbItem itemn = new ProjectCmbItem("COSLProspector ��DZʽ�꾮ƽ̨", "YCRO11-256");
     ////cmb_project.SelectedIndex = 7;
     //cmb_project.SelectedItem = itemn;
 }