/**************************************************************************/ protected void AddDispDocPic(int index) { ListItem li; li = new ListItem(); li.Text = "Select"; li.Value = ""; int ct = 0; DropDownList1.Items.Clear(); DropDownList1.Items.Add(li); foreach (GridLinks g in GL) { if (g.GeneID == FT2[index].ID) { FileLink fl = new FileLink(); fl = GetFL1(g.FilePicLinkID); if (fl == null) return; li = new ListItem(); li.Text = fl.Description; li.Value = fl.Directory + "/" + fl.FileName + "." + fl.FileExt; DropDownList1.Items.Add(li); ct = DropDownList1.Items.Count; } } Image1.Visible = false; TextBox1.Visible = false; }
/*****************************************************************************************************/ protected void Click_CopyRecordToBookTable(object sender, EventArgs e) { int result = 0; string temp = ""; FileLink ft = new FileLink(); temp = LinkEntryTextBox.Text; int.TryParse(temp, out result); ft.Link2GeneEntry = result; ft.FileName = LinkFileNameTextBox.Text; ft.FileExt = file_ext; ft.Directory = directoryLink; ft.Description = DescriptionTextBox.Text; string m_connectionString = ConfigurationManager.ConnectionStrings["connection_string"].ConnectionString; CustomAdapter ca = new CustomAdapter(); ca.UpdateFLRecord(m_connectionString, ft); }