الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

apeare MenuItem Depend on RoleID

مغلق
بدأه eng_seham في 22 أبريل 2007 · 0 رد · 485 مشاهدة · في ASP.NET
مشاركة: واتساب X فيسبوك تيليجرام
#1

Firstly : Thank You Very Much for your interesting .

I'm Explain My Problem in The Firstly :

create Menu in My web site this menuItem and submenu read from XMl file called (MenuRole.XML)

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

all this item not apear for all user but some these apear depend on RoleID :

I'm Write This code to Read MenuItem and Sub Menu from DataBase and Convert To XML file to Compare with file (MenuRole.XML)

to apear in my menu for specifice RolID

/////////////////////////////// My Code ////////////////////////////////////////////////////////////////////

Session.Add("RoleID", DropDownList1.SelectedValue);

SqlConnection con = new SqlConnection();

con.ConnectionString = ConfigurationManager.ConnectionStrings["ACCITConnectionString"].ConnectionString;

string sql = "select Menu_Item_Name ,SubMenu , URl from MenuRole where Rule_Authentication_ID =" +Session["RoleID"] ;

con.Open();

SqlDataAdapter da = new SqlDataAdapter(sql, con);

DataSet ds = new DataSet();

da.Fill(ds);

ds.WriteXml(@"c:\Role.xml");

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////////////////////////////

and apear (Final.XML) but I want same format of ( MenuRole.XML) ]

But I want This OutPut and Format Created

//////////////////////////////////////////////// My Format ///////////////////////////////////////////////

<?xml version="1.0" encoding="utf-8" ?>

- <Menu>

- - <Intake>

- <DataBank>

<ExamType>ExamType.aspx</ExamType>

<ExamQuestions>ExamDatabank.aspx</ExamQuestions>

<SurveyType>SurveyType.aspx</SurveyType>

<SurveyTopic>SurveyTopic.aspx</SurveyTopic>

</DataBank>

- </Menu>

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

and the contian final.XML it's change depend on RoleID

This My Problem ........

MenuRole.xml

Role2.xml

Final.xml

هذا الموضوع مغلق.

مواضيع مشابهة

عدد الزوار حالياً

المتواجدون خلال آخر دقيقتين · يتحدّث كل ٣٠ ثانية

—الإجمالي—أعضاء مسجّلون—زوار بدون تسجيل

جارٍ التحقق من المتواجدين…