protected void btnSave_Click(object sender, EventArgs e) { if (fuldMaterial.HasFile) { string path = Server.MapPath("~//Material//"); fuldMaterial.SaveAs(path + fuldMaterial.FileName); tbl_Material M = new tbl_Material(); M.WorkShopId = int.Parse(ddlWorkshop.SelectedValue); M.MaterialPath = "~//Material//" + fuldMaterial.FileName; MaterialBusiness MB = new MaterialBusiness(); MB.CreateMaterial(M); GetMaterials(); } }
protected void btnSave_Click(object sender, EventArgs e) { if (fuldMaterial.HasFile) { string path = Server.MapPath("~//Material//"); fuldMaterial.SaveAs(path + fuldMaterial.FileName); tbl_Material M = new tbl_Material(); M.WorkShopId = int.Parse(ddlWorkShop.SelectedValue); M.MaterialPath = "~//Material//" + fuldMaterial.FileName; M.MaterialDescription = txtDescription.Text; MaterialBusiness MB = new MaterialBusiness(); MB.CreateMaterial(M); lblMessage.Text = "Uploaded Successfully"; // ClearData(); GetMaterials(); } }