コード例 #1
0
        public void hienthi()
        {
            txtProduct.Text = row.Cells[1].Value.ToString();
            try {
                pbavatar.Image = Image.FromFile(row.Cells[2].Value.ToString());
            }
            catch (FileNotFoundException)
            {
                MessageBox.Show("sai đường dẫn ảnh");
            }
            txtprice.Text      = row.Cells[3].Value.ToString();
            cbSize.Text        = row.Cells[4].Value.ToString();
            cbBrand.Text       = row.Cells[5].Value.ToString();
            txtcolor.BackColor = row.Cells[6].Style.BackColor;
            cbgender.Text      = row.Cells[7].Value.ToString();
            nudAmount.Text     = row.Cells[8].Value.ToString();
            txtDesc.Text       = row.Cells[9].Value.ToString();
            colorpro           = colorpro = "" + txtcolor.BackColor.A + "," + txtcolor.BackColor.R + "," + txtcolor.BackColor.G + ", " + txtcolor.BackColor.B + "";

            this.FormBorderStyle = FormBorderStyle.None;
            List <CategoriesDTO> categories = categoryBLL.categories();

            for (int i = 0; i < categories.Count; i++)
            {
                if (int.Parse(row.Cells[12].Value.ToString()) == categories[i].ID)
                {
                    cbCategori.Text = categories[i].Name;
                }
                cbCategori.Items.Add(categories[i].Name);
            }
        }
コード例 #2
0
ファイル: fAddProduct.cs プロジェクト: pham2000long/QLBD
        private void fAddProduct_Load(object sender, EventArgs e)
        {
            this.FormBorderStyle = FormBorderStyle.None;
            List <CategoriesDTO> categories = categoryBLL.categories();

            for (int i = 0; i < categories.Count; i++)
            {
                cbCategori.Items.Add(categories[i].Name);
            }
        }