|
Do not repost the same question. You should edit the exiting one.
Failure is not an option; it's the default selection.
|
|
|
|
|
Hi,
I had created treeview using Arraylist as per the below code.
As seen below is the screenshot
+ RETRO
|
|
|UNAMED FOLDER CREATED
|
|ALL CANCER FOLDER
|
|___BONE AND MARROW
|
|___CANCER AND ALL
I need to add the empty folder to RETRO folder.
I need to add UNAMED FOLDER to RETRO FOLDERHow to add it.
Here initScript is the script for javascript.
namespace IHCISCore.Core.Controls
{
public class TreeView : LiteralControl
{
private ArrayList Checked;
private ArrayList TreeList = null;
public TreeView()
{
Checked = new ArrayList();
}
public TreeView(string id)
: this()
{
ID = id;
}
public TreeView(string id, ArrayList treeList)
: this(id)
{
TreeList = treeList;
}
foreach (Node folder in tree)
{
initScript += ID + ".AddFolder('" + "RETRO" + "',"
+ (folder.isSystem ? "false" : "true") + ")\n";
foreach (Node node in folder.Children)
{
if (node.Children.Count >= 1 && !node.HideChildren)
{
if (ID.Substring(0, 3) == "Lab")
initScript += ID + ".AddLabTestFolder('" + node.Title
+ "', '" + node.LOINCID + "', '"
+ LabResults(node.LOINCID.ToString())
+ "','" + ((Node)node.Children[0]).Title + "')\n";
string tabName = ID.Substring(0, 3);
if (tabName == "Cln" || tabName == "Hra")
{
initScript += ID + ".AddFolder('" + node.CategoryName + "',"
+ (folder.isSystem ? "false" : "true") + ")\n";
initScript += ID + ".AddLevel2Folder('" + node.Title + "')\n";
foreach (Node level3 in node.Children)
initScript += ID + ".AddNodeL3('" + level3.Title
+ "', '" + level3.ID + "', "
+ Checked.Contains(level3.ID.ToString()).ToString().ToLower()
+ ")\n";
}
if (tabName == "Qua")
{
initScript += ID + ".AddLevel2Folder('" + node.Title + "')\n";
foreach (Node level3 in node.Children)
initScript += ID + ".AddNodeL3('" + level3.Title
+ "', '" + level3.CONDITIONID + "', "
+ Checked.Contains(level3.CONDITIONID.ToString()).ToString().ToLower()
+ ")\n";
}
}
else
initScript += ID + ".AddNode('" + node.Title
+ "', '" + node.ID + "', "
+ Checked.Contains(node.ID.ToString()).ToString().ToLower()
+ ")\n";
}
}
}
initScript += "ShowTree(" + ID + ")\n</script>";
Page.ClientScript.RegisterStartupScript(typeof(Page), ID, initScript);
}
private string LabResults(string LabID)
{
string result = "";
foreach (string id in Checked)
if (id.StartsWith(LabID + ":") || id.StartsWith(LabID + "|"))
result += id.Substring(LabID.Length) + ",";
if (result.Length > 0)
result = "," + result;
return result;
}
}
|
|
|
|
|
Don't continue to repost the same question.
Failure is not an option; it's the default selection.
|
|
|
|
|
Hi,
I had created treeview using Arraylist as per the below code.
using System;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.ComponentModel;
using System.Collections;
using IHCISCore.Core.Entities;
using IHCISCore.Core.Pages;
using IHCIS.Common.Entities;
using System.Web.SessionState;
using System.Data;
using System.Web;
using IHCISCore.Core.Controls;
using IHCISCore.Core;
namespace IHCISCore.Core.Controls
{
public class TreeView : LiteralControl
{
private ArrayList Checked;
private ArrayList TreeList = null;
public ArrayList txtval;
public ArrayList txtchildval;
public ArrayList hiddenTreeNamesA;
public ArrayList hiddenTreeExPA;
public ArrayList hiddenTreeExCA;
public ArrayList hiddenTreeExAdvPA;
public ArrayList hiddenTreeExAdvCA;
public ArrayList hiddenTreeInAdvPA;
public ArrayList hiddenTreeInAdvCA;
public ArrayList hiddenTreeInPMinA;
public ArrayList hiddenTreeInCMinA;
public ArrayList hiddenTreeExPMinA;
public ArrayList hiddenTreeExCMinA;
public ArrayList hiddenTreeInAdvPMinA;
public ArrayList hiddenTreeInAdvCMinA;
public ArrayList hiddenTreeExAdvPMinA;
public ArrayList hiddenTreeExAdvCMinA;
public TreeView()
{
Checked = new ArrayList();
}
public TreeView(string id)
: this()
{
ID = id;
}
public TreeView(string id, ArrayList treeList)
: this(id)
{
TreeList = treeList;
}
foreach (Node folder in tree)
{
initScript += ID + ".AddFolder('" + "RETRO" + "',"
+ (folder.isSystem ? "false" : "true") + ")\n";
foreach (Node node in folder.Children)
{
if (node.Children.Count >= 1 && !node.HideChildren)
{
if (ID.Substring(0, 3) == "Lab")
initScript += ID + ".AddLabTestFolder('" + node.Title
+ "', '" + node.LOINCID + "', '"
+ LabResults(node.LOINCID.ToString())
+ "','" + ((Node)node.Children[0]).Title + "')\n";
string tabName = ID.Substring(0, 3);
if (tabName == "Cln" || tabName == "Hra")
{
initScript += ID + ".AddFolder('" + node.CategoryName + "',"
+ (folder.isSystem ? "false" : "true") + ")\n";
initScript += ID + ".AddLevel2Folder('" + node.Title + "')\n";
foreach (Node level3 in node.Children)
initScript += ID + ".AddNodeL3('" + level3.Title
+ "', '" + level3.ID + "', "
+ Checked.Contains(level3.ID.ToString()).ToString().ToLower()
+ ")\n";
}
if (tabName == "Qua")
{
initScript += ID + ".AddLevel2Folder('" + node.Title + "')\n";
foreach (Node level3 in node.Children)
initScript += ID + ".AddNodeL3('" + level3.Title
+ "', '" + level3.CONDITIONID + "', "
+ Checked.Contains(level3.CONDITIONID.ToString()).ToString().ToLower()
+ ")\n";
}
}
else
initScript += ID + ".AddNode('" + node.Title
+ "', '" + node.ID + "', "
+ Checked.Contains(node.ID.ToString()).ToString().ToLower()
+ ")\n";
}
}
}
initScript += "ShowTree(" + ID + ")\n</script>";
Page.ClientScript.RegisterStartupScript(typeof(Page), ID, initScript);
}
private string LabResults(string LabID)
{
string result = "";
foreach (string id in Checked)
if (id.StartsWith(LabID + ":") || id.StartsWith(LabID + "|"))
result += id.Substring(LabID.Length) + ",";
if (result.Length > 0)
result = "," + result;
return result;
}
}
As seen below is the screenshot
+ RETRO
|
|
|UNAMED FOLDER CREATED
|
|ALL CANCER FOLDER
|
|___BONE AND MARROW
|
|___CANCER AND ALL
I need to add the empty folder to RETRO folder.
I need to add UNAMED FOLDER to RETRO FOLDERHow to add it.
Here initScript is the script for javascript.
Thanks
S.GuhananthTO
modified 29-Feb-12 7:39am.
|
|
|
|
|
Far too much code. Edit your post and only include what necessary to clarify your question, not all of it.
Failure is not an option; it's the default selection.
|
|
|
|
|
i had removed huge codes now.plz help on the issue.
|
|
|
|
|
No, there is still far too much useless code clouding everything up. Your question is how to create a treeview from an array list. Show the arraylist and the expected output. The for loop and all the if statements are just useless distracting drivel.
Failure is not an option; it's the default selection.
|
|
|
|
|
i had posted freshly.please answer.
|
|
|
|
|
Read my previous response. We can keep this going for a long time. If you want an answer than provide the necessary information, without the unnecessary distracting extraneous drivel
Failure is not an option; it's the default selection.
|
|
|
|
|
how to add message box with YES/NO button in asp.net using C#
|
|
|
|
|
See here[^] for guidance and samples.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
It depends how you want it to look. If you want a simple dialog with yes/no buttons then use the JavaScript confirm function. If you want more style then see the links provided by Richard
Failure is not an option; it's the default selection.
|
|
|
|
|
Hi there,
I have some files in my website for being downloaded by signed in users.
But due to the bandwidth limitation I have to restrict users to download files until the total downloaded size doesn't excess from a specefic size for example 100MB.
Now I'm looking for a way to measure the user's download size.
Any help please?
modified 29-Feb-12 6:58am.
|
|
|
|
|
Don't cross post. As was pointed out in the C# forum this question belongs here, but now that people have answered there you can't remove it or share the information here.
Failure is not an option; it's the default selection.
|
|
|
|
|
how to clear textbox when page is refreshed asp.net c#
heres my code not working
Code:
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
{
TextBox1.Text = "";
}
}
Code:
protected void Button1_Click(object sender, EventArgs e)
{
TextBox1.Text = "test";
}
|
|
|
|
|
Move textbox1.text=""; to the end of your submit button.
|
|
|
|
|
I have written an command line command to encrypt web.config connection string.
Once the command is run, i will see the connection string section in web.config file encrypted format. Then, i run the website and see the data from database has been fetched in the webpage.
I even can decrypt the connection string to make it normal. using another command line command.
Could any one tell me , few test cases that i could go for?
|
|
|
|
|
I have a huge XML file and some of the nodes in that are optional. I am not able to pull the bidder info from that, can anyone please help with this. The first 2 records of xml file are given below
<reports>
<report>
<xml-report>
<summary>
<dr-nbr>2012004</dr-nbr>
</summary>
<data>
<proj-title>
<title-code>
<title ci = "N">District 321</title>
</title-code>
</proj-title>
<p-location>
<project-location>
<title-code>
<p-county-name ci = "N">BOOLE</p-county-name>
<p-fips-county>MT101</p-fips-county>
<p-city-name ci = "N">MTELBY</p-city-name>
<p-state-id ci = "N">MT</p-state-id>
<p-zip-code ci = "N">69474</p-zip-code>
<p-zip-code5 ci = "N">69474</p-zip-code5>
<p-country-id ci = "N">USA</p-country-id>
</title-code>
</project-location>
<pct-project-county>
<title-code>
<p-county-name ci = "N">TOOLE</p-county-name>
<p-fips-county>MT101</p-fips-county>
<p-state-id>MT</p-state-id>
<p-country-id>USA</p-country-id>
</title-code>
</pct-project-county>
</p-location>
<status>
<title-code>
<status-proj-dlvry-sys ci = "N">Design-Bid-Build</status-proj-dlvry-sys>
</title-code>
</status>
</data>
</xml-report>
</report>
<report>
<xml-report>
<summary>
<dr-nbr>2011005</dr-nbr>
</summary>
<data>
<proj-title>
<title-code>
<title ci = "N">Plane Pitch</title>
</title-code>
</proj-title>
<p-location>
<project-location>
<title-code>
<p-county-name ci = "A">SUMMIT</p-county-name>
<p-fips-county>MI153</p-fips-county>
<p-city-name ci = "A">AVON</p-city-name>
<p-state-id ci = "A">MI</p-state-id>
<p-zip-code ci = "C">44308</p-zip-code>
<p-zip-code5 ci = "C">44308</p-zip-code5>
<p-country-id ci = "A">USA</p-country-id>
</title-code>
</project-location>
<pct-project-county>
<title-code>
<p-county-name ci = "A">SUMMIT</p-county-name>
<p-fips-county>OH153</p-fips-county>
<p-state-id>OH</p-state-id>
<p-country-id>USA</p-country-id>
</title-code>
</pct-project-county>
</p-location>
<project-bidder-information>
<title-code>
<bid-header>
<bid-header-desc ci = "N">Low Bidders</bid-header-desc>
<bid-title>
<bid-details>
<contact-information>
<firm-name>Many Stocks</firm-name>
<contact-name>Many Moree</contact-name>
</contact-information>
</bid-details>
<bid-details>
<contact-information>
<firm-name>Who Constrcution</firm-name>
</contact-information>
</bid-details>
</bid-title>
</bid-header>
</title-code>
</project-bidder-information>
</data>
</xml-report>
</report>
</reports>
my Code ************
Dim xtr As New XmlTextReader("C:\Test2.xml")
xtr.WhitespaceHandling = WhitespaceHandling.None
Dim X As New XmlDocument()
X.Load(xtr)
If Not (X Is Nothing) Then
Try
Dim ArticleList As XmlNodeList = X.SelectNodes("reports/report/xml-report")
For Each Article As XmlNode In ArticleList
Response.Write("**************New Record**********")
Response.Write("<br />")
Try
Dim CatNodesList As XmlNodeList = Article.SelectNodes("summary/dr-nbr")
Dim ProjectID As String
For Each category As XmlNode In CatNodesList
If category IsNot Nothing Then
Response.Write("Project No:" & category.InnerText)
ProjectID = category.InnerText
Response.Write("<br />")
End If
Next
Dim ProjectBidCompanyNodsList As XmlNodeList = Article.SelectNodes("data/project-bidder-informaton/title-code/bid-header/bid-title/bid-details/contact-information/firm-name")
For Each ProjCompanyNode As XmlNode In ProjectBidCompanyNodsList
If ProjCompanyNode IsNot Nothing Then
Response.Write("Bid Company:" & ProjCompanyNode.Value)
Response.Write("<br />")
End If
Next
Catch ex As Exception
Response.Write(ex)
Response.Write("<br />")
End Try
Next
Catch ex As Exception
Response.Write(ex)
End Try
End If
I am able to pull the Project No(dr-nbr) but not the bid companies that are in second row, what am i doing wrong. Thanks in advance
Thanks
Murari
|
|
|
|
|
Features required
There is need to implement the User Management solution for project, which would include:
simple website with header, footer and central part
simple user management with 3 roles – public user, registered user, website admin
Users should be able to register through registration form
Users should be able to log in and log out
Technical requirements
database – sql server 2008
ASP.NET MVC
front-end - jquery
The documentation with brief solution overview has to be prepared too.
|
|
|
|
|
I don't think anyone here would have the time to do your work for you. I suggest you try some studying and see what you can do for yourself or, if you do not have developer skills, then you need to advertise on vWorker[^] or similar sites.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Try something and then post any problems you face here - someone might be able to help you.
|
|
|
|
|
If this is homework then speak to your tutor/teacher and explain you don't understand any of it.
If this is a project that someone is paying you for then give back the money and apologise.
Why would you think that anyone would do all of that for you when, clearly, you haven't bothered to do anything for yourself?
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
First of all, This is not a question. It's just like an order for waiter in hotel.
Anyway Go step by step. Check this resource .... Education Needed[^]
LekshmiM wrote: The documentation with brief solution overview has to be prepared too. Actually you have to create documentation for your project/application.
thatrajaNobody remains a virgin, Life screws everyone
|
|
|
|
|
Hi friends,
Thanx for urreplies.Actually I m windows.net programmer.Dont much know about web.Now learn some gud documents from net and googled for sample codes.Around 70% completed
|
|
|
|
|
Hi all,
I am using vs2010 with .net 4.0 and jquery AJAX to call to a static method in code behind.
I was success to call it but cant get the page's control. Following is my sample code :
[WebMethod]
public static string UpdateContent()
{
Page page = HttpContext.Current.Handler as Page;
TextBox tb = (TextBox)page.FindControl("txt");
tb.Text = "some string here";
if (db.UpdateTable()){return "success";}
else { return "failed"; }
}
So,my question is how can i access the page's control in my static method?
any tips are welcome
thanks in advance
cocoon
|
|
|
|