private void Update_Foto() { try { var BL = new tb_me_productosBL(); var BE = new tb_me_productos(); BE.moduloid = moduloiddes.SelectedValue.ToString(); if (moduloiddes.SelectedValue.ToString() == "0000") { MessageBox.Show("Seleccione Almacen", "Information"); return; } BE.local = localdes.SelectedValue.ToString(); BE.productid = productid.Text.Trim(); BE.docname = _nombreFoto.ToString(); var ms = new System.IO.MemoryStream(); if (modulo == "0500") { if (go_foto.Image != null) { go_foto.Image.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg); } } BE.Foto = ms.GetBuffer(); BL.Update_Foto(EmpresaID, BE); } catch (Exception) { throw; } }