예제 #1
0
        private void btnRef_Click(object sender, EventArgs e)
        {
            if (cmbGroup.EditValue == null)
            {
                MessageBox.Show("请选择品类组!");
                return;
            }
            var groupNo = cmbGroup.EditValue.ToString();
            var dt      = new Data.GetData().GetGroupItemDetail(groupNo);

            dt.Columns.Add("chk", System.Type.GetType("System.Boolean"));
            dgv.DataSource = dt;
            gridView1.BestFitColumns();
        }
예제 #2
0
        private void FrmMain_Load(object sender, EventArgs e)
        {
            try
            {
                dgv.Init(gridView1);
                gridView1.SetAutoFilterRow();
                gridView1.OptionsBehavior.Editable         = true;
                gridView1.OptionsSelection.MultiSelect     = true;
                gridView1.OptionsSelection.MultiSelectMode =
                    DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.RowSelect;
                repositoryItemCheckEdit2.CheckedChanged += new EventHandler(repositoryItemCheckEdit1_CheckedChanged);

                GridCheckEdit(gridView1, chkFileName, 30); var group = new Data.GetData().GetGroups();
                cmbGroup.Properties.DataSource = group;
                if (group.Rows.Count > 0)
                {
                    cmbGroup.ItemIndex = 0;
                }
                byte[] btListFilePath = new byte[1024];
                Int32  len            = CON_GetSDKVersion(btListFilePath);
                string str            = Encoding.Unicode.GetString(btListFilePath, 0, (len) * 2);
                this.Text += "_" + str;

                len = CON_GetSupportPrinters(btListFilePath, 1024);
                str = Encoding.Unicode.GetString(btListFilePath, 0, (len) * 2);
                string[] strPrints = str.Split(new Char[] { ',' });
                for (int i = 0; i < strPrints.Length; ++i)
                {
                    PrintList.Add(strPrints[i]);
                }
                OpenPrint();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }