private void hylbxgbutton_Click(object sender, EventArgs e) { var rows = dataGridView1.SelectedRows; if (rows.Count != 1) { MessageBox.Show("请选择一条数据"); return; } string name = rows[0].Cells[0].Value.ToString(); memberType edit = memberbll.EditMember(name); hylxedit zjhyfl = hylxedit.Create(edit, gridbind); zjhyfl.Show(); zjhyfl.Focus(); }
private void hyzjForm_Load(object sender, EventArgs e) { #region//打开摄像头 try { //连接//开启摄像头 videoDevices = new FilterInfoCollection(FilterCategory.VideoInputDevice); if (videoDevices.Count == 0) { throw new ApplicationException(); } foreach (FilterInfo device in videoDevices) { list.Add(device.Name); } CameraConn(); } catch (ApplicationException) { videoDevices = null; } #endregion #region//窗口打开的时候初始化的内容 dateTimePicker1.Value = new DateTime(DateTime.Now.Year + 2, DateTime.Now.Month, DateTime.Now.Day); //初始化会员分类 string[] str = new string[] {}; List <string> list1 = bll.selectNodes(); str = list1.ToArray(); hyflcomboBox.Items.AddRange(str); if (hyflcomboBox.Items.Count > 0) { hyflcomboBox.SelectedIndex = 0; } string name = hyflcomboBox.Text; memberType mode = bll.EditMember(name); spzktextBox.Text = mode.memberRebate; spzktextBox.ReadOnly = true; fwzktextBox.Text = "0"; fwzktextBox.ReadOnly = true; czjetextBox.Text = mode.memberTopUp; czjetextBox.ReadOnly = true; bkjetextBox.Text = mode.memberCardMoney; textBox1.Text = mode.memberTypechild; textBox1.ReadOnly = true; hyxbcomboBox.SelectedIndex = 0; ztcomboBox.SelectedIndex = 0; szmmbutton.Enabled = false; #endregion //连锁店名初始化 if (FilterClass.isadmin()) { List <string> strdp = dpbll.selectDPName(); foreach (var iteam in strdp) { lsdcomboBox.Items.Add(iteam); } lsdcomboBox.SelectedIndex = 0; } else { lsdcomboBox.Text = FilterClass.DianPu1.UserName; lsdcomboBox.Enabled = false; } List <jbcs> listname = staffbll.selectSH(); foreach (var iteam in listname) { ywycomboBox.Items.Add(iteam.AllType); } if (ywycomboBox.Items.Count > 0) { ywycomboBox.SelectedIndex = 0; } }