private string AddData() { string userid = Session["UserId"].ToString(); string app_name = txtApplicationName.Text; string description = txtDescription.Text; CommonLibrary.Application.ApplicationController app_obj = new CommonLibrary.Application.ApplicationController(); string result = app_obj.Insert(app_name, description); return(result); }
protected int UpdateData() { string app_id = Request.QueryString["id"]; string app_name = txtApplicationName.Text; string description = txtDescription.Text; CommonLibrary.Application.ApplicationController app_obj = new CommonLibrary.Application.ApplicationController(); int i = app_obj.Update(app_id, app_name, description); return(i); }
private void LoadApplicationList2DDL() { ApplicationController obj_data = new ApplicationController(); DataTable dtNodes = obj_data.GetApps(); ddlApplicationList.Items.Clear(); ddlApplicationList.DataSource = dtNodes; ddlApplicationList.DataTextField = "ApplicationName"; ddlApplicationList.DataValueField = "ApplicationId"; ddlApplicationList.DataBind(); //ddlApplicationList.Items.Insert(0, new ListItem("- Chọn -", "")); ddlApplicationList.SelectedIndex = 0; }
private void LoadApplicationList2DDL(string selected_value) { ddlApplicationList.Items.Clear(); CommonLibrary.Application.ApplicationController app_obj = new CommonLibrary.Application.ApplicationController(); DataTable dt_app = app_obj.GetApps(); ddlApplicationList.DataSource = dt_app; ddlApplicationList.DataTextField = "ApplicationName"; ddlApplicationList.DataValueField = "ApplicationId"; ddlApplicationList.DataBind(); ddlApplicationList.SelectedValue = selected_value; ddlApplicationList.Enabled = false; }
private void ShowApp(string selected_value) { ddlApp.Items.Clear(); //DROPDOWNLIST CommonLibrary.Application.ApplicationController app_obj = new CommonLibrary.Application.ApplicationController(); DataTable dt_app = app_obj.GetApps(); //select all the nodes from DB ddlApp.AutoPostBack = true; ddlApp.DataSource = dt_app; ddlApp.DataTextField = "ApplicationName"; ddlApp.DataValueField = "ApplicationId"; ddlApp.SelectedValue = selected_value; ddlApp.Items.Insert(0, new ListItem("-Chọn ứng dụng-", " ")); ddlApp.DataBind(); }
private void LoadApplicationList2DDL() { ddlApplicationList.Items.Clear(); ApplicationController application_obj = new ApplicationController(); DataTable dtNodes = application_obj.GetApps(); ddlApplicationList.DataSource = dtNodes; ddlApplicationList.DataTextField = "ApplicationName"; ddlApplicationList.DataValueField = "ApplicationId"; ddlApplicationList.DataBind(); ddlApplicationList.Items.Insert(0, new ListItem("- Chọn -", "")); //DROPDOWNLIST ddlApplicationList.SelectedIndex = 0; ddlApplicationList.AutoPostBack = true; }
private void LoadApplicationList2DDL() { ddlApplicationList.Items.Clear(); CommonLibrary.Application.ApplicationController app_obj = new CommonLibrary.Application.ApplicationController(); DataTable dt_app = app_obj.GetApps(); ddlApplicationList.AutoPostBack = true; ddlApplicationList.DataSource = dt_app; ddlApplicationList.DataTextField = "ApplicationName"; ddlApplicationList.DataValueField = "ApplicationId"; ddlApplicationList.DataBind(); //ddlApplicationList.Items.Insert(0, new ListItem("-Chọn ứng dụng-", "")); ddlApplicationList.SelectedIndex = 0; }
public CascadingDropDownNameValue[] GetApplicationList(string knownCategoryValues, string category) { ApplicationController application_obj = new ApplicationController(); DataTable dt = application_obj.GetApps(); List<CascadingDropDownNameValue> application_list = new List<CascadingDropDownNameValue>(); foreach (DataRow dRow in dt.Rows) { string ApplicationId = dRow["ApplicationId"].ToString(); string ApplicationName = dRow["ApplicationName"].ToString(); application_list.Add(new CascadingDropDownNameValue(ApplicationName, ApplicationId)); } return application_list.ToArray(); }
private void LoadApplicationList2DDL() { ddlApplicationList.Items.Clear(); CommonLibrary.Application.ApplicationController app_obj = new CommonLibrary.Application.ApplicationController(); DataTable dt_app = app_obj.GetApps(); ddlApplicationList.AutoPostBack = true; ddlApplicationList.DataSource = dt_app; ddlApplicationList.DataTextField = "ApplicationName"; ddlApplicationList.DataValueField = "ApplicationId"; ddlApplicationList.DataBind(); ddlApplicationList.Items.Insert(0, new ListItem("-Chọn ứng dụng-", "")); ddlApplicationList.SelectedIndex = 0; }
private void PopulateApplicationList2DDL() { ddlApplicationList.Items.Clear(); CommonLibrary.Application.ApplicationController app_obj = new CommonLibrary.Application.ApplicationController(); DataTable dt_app = app_obj.GetApps(); ddlApplicationList.AutoPostBack = true; ddlApplicationList.DataSource = dt_app; ddlApplicationList.DataTextField = "ApplicationName"; ddlApplicationList.DataValueField = "ApplicationId"; ddlApplicationList.DataBind(); if(Session["ApplicationId"] !=null && Session["ApplicationId"].ToString() !=string.Empty) ddlApplicationList.SelectedValue = Session["ApplicationId"].ToString(); else ddlApplicationList.SelectedIndex = 0; ddlApplicationList.AutoPostBack = true; }
private void PopulateApplicationList2DDL() { ddlApplicationList.Items.Clear(); CommonLibrary.Application.ApplicationController app_obj = new CommonLibrary.Application.ApplicationController(); DataTable dt_app = app_obj.GetApps(); ddlApplicationList.AutoPostBack = true; ddlApplicationList.DataSource = dt_app; ddlApplicationList.DataTextField = "ApplicationName"; ddlApplicationList.DataValueField = "ApplicationId"; ddlApplicationList.DataBind(); if (Session["ApplicationId"] != null && Session["ApplicationId"].ToString() != string.Empty) { ddlApplicationList.SelectedValue = Session["ApplicationId"].ToString(); } else { ddlApplicationList.SelectedIndex = 0; } ddlApplicationList.AutoPostBack = true; }
protected int UpdateData() { string app_id = Request.QueryString["id"]; string app_name = txtApplicationName.Text; string description = txtDescription.Text; CommonLibrary.Application.ApplicationController app_obj = new CommonLibrary.Application.ApplicationController(); int i = app_obj.Update(app_id, app_name, description); return i; }
private string AddData() { string userid = Session["UserId"].ToString(); string app_name = txtApplicationName.Text; string description = txtDescription.Text; CommonLibrary.Application.ApplicationController app_obj = new CommonLibrary.Application.ApplicationController(); string result = app_obj.Insert(app_name, description); return result; }
private void LoadApplicationList2DDL(string selected_value) { ApplicationController obj_data = new ApplicationController(); DataTable dtNodes = obj_data.GetApps(); ddlApplicationList.Items.Clear(); ddlApplicationList.DataSource = dtNodes; ddlApplicationList.DataTextField = "ApplicationName"; ddlApplicationList.DataValueField = "ApplicationId"; ddlApplicationList.DataBind(); ddlApplicationList.Items.Insert(0, new ListItem("- Chọn -", "")); ddlApplicationList.SelectedValue = selected_value; ddlApplicationList.AutoPostBack = true; }