示例#1
0
        protected void btnSaveProduct_Click(object sender, EventArgs e)
        {
            RequestData data = new RequestData();

            hdReqIdStock.Value = data.RequestID_Stock;

            Item item = null;

            foreach (ListItem chb in chbProdect.Items)
            {
                item = new Item();

                string reqId = hdReqIdStock.Value;

                if (chb.Selected == true)
                {
                    item.Code = chb.Value;
                    item.Name = chb.Text;

                    //insert to table request_stock
                    ItemDal dal = new ItemDal();

                    dal.RequestStockInsert(item, reqId);

                    lblStatus.Text      = "บันทึกสินค้า เรียบร้อย";
                    lblStatus.ForeColor = System.Drawing.Color.Red;
                }
            }
        }//btnSaveProduct_Click