private void LoadData()
        {
            CultureClass culture_obj = new CultureClass();
            DataTable    dt          = culture_obj.GetDetails(_idx);

            txtCultureCode.Text = dt.Rows[0]["CultureCode"].ToString();
            txtCultureName.Text = dt.Rows[0]["CultureName"].ToString();
            txtDescription.Text = dt.Rows[0]["Description"].ToString();
            LoadStatusList2DDL(dt.Rows[0]["Discontinued"].ToString());
        }
Exemple #2
0
        protected void PopulateCulture2DDL(string selected_value)
        {
            CultureClass culture_obj  = new CultureClass();
            string       Discontinued = "1";
            DataTable    dt           = culture_obj.GetListByDiscontinued(Discontinued);

            ddlCultureList.Items.Clear();
            ddlCultureList.DataSource     = dt;
            ddlCultureList.DataTextField  = "CultureName";
            ddlCultureList.DataValueField = "CultureCode";
            ddlCultureList.DataBind();
            ddlCultureList.SelectedValue = selected_value;
        }
        protected void PopulateLanguage2DDL()
        {
            CultureClass culture_obj  = new CultureClass();
            string       Discontinued = "1";
            DataTable    dt           = culture_obj.GetListByDiscontinued(Discontinued);

            ddlLanguageList.Items.Clear();
            ddlLanguageList.DataSource     = dt;
            ddlLanguageList.DataTextField  = "CultureName";
            ddlLanguageList.DataValueField = "CultureCode";
            ddlLanguageList.DataBind();
            ddlLanguageList.SelectedIndex = 0;
        }
        private int UpdateData()
        {
            int    i            = 0;
            string CultureCode  = txtCultureCode.Text;
            string CultureName  = txtCultureName.Text;
            string Description  = txtDescription.Text;
            int    Discontinued = Convert.ToInt32(rdlDiscontinued.SelectedValue);

            CultureClass culture_obj = new CultureClass();

            i = culture_obj.Update(_idx, CultureCode, CultureName, Description, Discontinued);
            return(i);
        }
Exemple #5
0
        private void ShowLanguage(string selected_value)
        {
            CultureClass culture_obj  = new CultureClass();
            string       Discontinued = "1";
            DataTable    dt           = culture_obj.GetListByDiscontinued(Discontinued);

            ddlCultureCode.Items.Clear();
            ddlCultureCode.DataSource     = dt;
            ddlCultureCode.DataTextField  = "CultureName";
            ddlCultureCode.DataValueField = "CultureCode";
            ddlCultureCode.DataBind();
            ddlCultureCode.SelectedValue = selected_value;
        }
Exemple #6
0
        protected void PopulateCulture2DDL(string selected_value)
        {
            int          PortalId    = Convert.ToInt32(ddlPortalList.SelectedValue);
            CultureClass culture_obj = new CultureClass();
            DataTable    dt          = culture_obj.GetListByPortalId(PortalId);

            ddlCultureList.Items.Clear();
            ddlCultureList.DataSource     = dt;
            ddlCultureList.DataTextField  = "CultureName";
            ddlCultureList.DataValueField = "CultureCode";
            ddlCultureList.DataBind();
            ddlCultureList.SelectedValue = selected_value;
            ddlCultureList.AutoPostBack  = true;
        }
        private void ShowLanguage()
        {
            CultureClass culture_obj  = new CultureClass();
            string       Discontinued = "1";
            DataTable    dt           = culture_obj.GetListByDiscontinued(Discontinued);

            ddlCultureCode.Items.Clear();
            ddlCultureCode.DataSource     = dt;
            ddlCultureCode.DataTextField  = "CultureName";
            ddlCultureCode.DataValueField = "CultureCode";
            ddlCultureCode.DataBind();
            ddlCultureCode.Items.Insert(0, new ListItem("- Chọn -", "0"));
            ddlCultureCode.SelectedIndex = 1;
        }
        private int AddData()
        {
            int i = 0;

            if (txtCultureCode.Text != string.Empty && txtCultureName.Text != string.Empty)
            {
                string CultureCode  = txtCultureCode.Text;
                string CultureName  = txtCultureName.Text;
                string Description  = txtDescription.Text;
                int    Discontinued = Convert.ToInt32(rdlDiscontinued.SelectedValue);

                CultureClass culture_obj = new CultureClass();
                i = culture_obj.Insert(CultureCode, CultureName, Description, Discontinued);
            }
            return(i);
        }