Ejemplo n.º 1
0
        private void AddFuWuType_Load(object sender, EventArgs e)
        {
            List <string> list = new List <string>();

            //返回会员卡的类型的名字
            list = bll.selectNodes();
            list.Insert(0, "无卡");
            tableLayoutPanel1.Height = (list.Count + 1) * 40;
            RowStyle row;
            Label    lab1;
            TextBox  teb1;

            //row = new RowStyle(SizeType.Absolute,40);
            lab1      = new Label();
            lab1.Text = "服务类别名称";
            teb1      = new TextBox();
            tableLayoutPanel1.Controls.Add(lab1, 0, 0);
            tableLayoutPanel1.Controls.Add(teb1, 1, 0);
            foreach (var i in list)
            {
                lab1      = new Label();
                lab1.Text = i;
                teb1      = new TextBox();
                row       = new RowStyle(SizeType.Absolute, 40);

                tableLayoutPanel1.Controls.Add(lab1, 0, tableLayoutPanel1.RowStyles.Count - 1);
                tableLayoutPanel1.Controls.Add(teb1, 1, tableLayoutPanel1.RowStyles.Count - 1);
                tableLayoutPanel1.RowStyles.Add(row);
            }
        }
Ejemplo n.º 2
0
        private void fuwuEdit_Load(object sender, EventArgs e)
        {
            fuwuModel model = new fuwuModel();

            model = fuwubll.selectIteam(name);
            if (model == null)
            {
                MessageBox.Show("请选择有效行!");
                return;
            }
            List <string> list = new List <string>();

            list = bll.selectNodes();
            list.Insert(0, "无卡");
            tableLayoutPanel1.Height = (list.Count + 1) * 40;
            RowStyle row;
            Label    lab1;
            TextBox  teb1;

            //row = new RowStyle(SizeType.Absolute,40);
            lab1          = new Label();
            lab1.Text     = "服务类别名称";
            teb1          = new TextBox();
            teb1.Text     = model.Name;
            teb1.ReadOnly = true;
            tableLayoutPanel1.Controls.Add(lab1, 0, 0);
            tableLayoutPanel1.Controls.Add(teb1, 1, 0);
            foreach (var i in list)
            {
                lab1      = new Label();
                lab1.Text = i;
                teb1      = new TextBox();
                row       = new RowStyle(SizeType.Absolute, 40);
                string[] str = model.neirong.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
                foreach (var iteam in str)
                {
                    string[] ss = iteam.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
                    if (i.Trim() == ss[0].Trim())
                    {
                        teb1.Text = ss[1];
                    }
                }
                tableLayoutPanel1.Controls.Add(lab1, 0, tableLayoutPanel1.RowStyles.Count - 1);
                tableLayoutPanel1.Controls.Add(teb1, 1, tableLayoutPanel1.RowStyles.Count - 1);
                tableLayoutPanel1.RowStyles.Add(row);
            }
        }
Ejemplo n.º 3
0
 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;
     }
 }