protected void dataGrid_UpdateCommand(object source, DataGridCommandEventArgs e) { using (SamplePortal.Data.Templates templates = new SamplePortal.Data.Templates()) { string fileName = ViewState["editf"].ToString(); string title = ((TextBox)e.Item.Cells[3].Controls[0]).Text; string description = ((TextBox)e.Item.Cells[4].Controls[0]).Text; templates.UpdateTemplate(fileName, title, description, null); } dataGrid.EditItemIndex = -1; BindData(null); }
protected void btnContinue_Click(object sender, EventArgs e) { using (SamplePortal.Data.Templates templates = new SamplePortal.Data.Templates()) { foreach (UploadItem i in ConflictUploadItems) { templates.UpdateTemplate(i); // Overwrite the existing entry with the new one and delete the old package. SuccessfulUploadItems.Add(i); // Add the item to the list of successfully uploaded packages. } ConflictUploadItems.Clear(); // Remove all conflict items. } UpdatePanelVisibility(); }
protected void dataGrid_UpdateCommand(object source, DataGridCommandEventArgs e) { using (SamplePortal.Data.Templates templates = new SamplePortal.Data.Templates()) { string fileName = ViewState["editf"].ToString(); string title = ((TextBox)e.Item.Cells[3].Controls[0]).Text; string description = ((TextBox)e.Item.Cells[4].Controls[0]).Text; templates.UpdateTemplate(fileName, title, description, null); } dataGrid.EditItemIndex = -1; BindData(null); }
protected void btnContinue_Click(object sender, EventArgs e) { using (SamplePortal.Data.Templates templates = new SamplePortal.Data.Templates()) { foreach (UploadItem i in ConflictUploadItems) { templates.UpdateTemplate(i); // Overwrite the existing entry with the new one and delete the old package. SuccessfulUploadItems.Add(i); // Add the item to the list of successfully uploaded packages. } ConflictUploadItems.Clear(); // Remove all conflict items. } UpdatePanelVisibility(); }