protected void btnSubmit_click(object sender, EventArgs e) { try { using ( dbmodel dbContext = new dbmodel()) { GoodsInDetails gdin = new GoodsInDetails(); gdin.GoodsInID = int.Parse(txtorderID.Text); gdin.ProductID = int.Parse(txtbox1.Text); //**Add ProductID x amount of times dependednt on value in //txtQuanitity.text;*** dbContext.Add(gdin); dbContext.SaveChanges(); lblMessage.Text = "Succesfully added!"; } } catch (Exception ex) { lblMessage.Text = ex.Message; } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)