Exemplo n.º 1
0
        private void GetData()
        {
            int languageId    = Convert.ToInt32(Request.QueryString["LanguageId"]);
            var client        = new LanguageManagmentServiceClient();
            var languageModel = new LanguageModel();

            languageModel      = client.RetrieveLanguage(languageId);
            txtBoxLanuage.Text = languageModel.LanguageName;
            txtBoxLCID.Text    = Convert.ToString(languageModel.LanguageLCID);
        }
Exemplo n.º 2
0
        private DataSet LoadLanguage()
        {
            DataSet dataSet    = new DataSet();
            var     langClient = new LanguageManagmentServiceClient();

            dataSet = langClient.ListLanguages();


            return(dataSet);
        }
        protected void ButtonAddLanguage_Click(object sender, EventArgs e)
        {
            var client        = new LanguageManagmentServiceClient();
            var langaugeModel = new LanguageModel
            {
                LanguageLCID = Convert.ToInt32(TextBoxLanguageLCID.Text),
                LanguageName = TextBoxLanguageName.Text
            };

            client.AddLanguage(langaugeModel);
        }
Exemplo n.º 4
0
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            int languageId    = Convert.ToInt32(Request.QueryString["LanguageId"]);
            var client        = new LanguageManagmentServiceClient();
            var languageModel = new LanguageModel();

            languageModel.LanguageName = txtBoxLanuage.Text;
            languageModel.LanguageLCID = Convert.ToInt32(txtBoxLCID.Text);
            string user = (string)Session["user"];

            client.UpdateLanguage(languageId, languageModel, user);
            Response.Redirect("languagespage.aspx");
        }
        protected void Page_Load(object sender, EventArgs e)

        {
            var           client   = new LanguageManagmentServiceClient();
            LanguageModel language = new LanguageModel();

            GridView1.DataSource = client.DisplayLanguages();
            GridView1.DataBind();

            //       var client = new LanguageManagmentServiceClient();
            // List<LanguageModel>languagesList = new List<LanguageModel>();
            //  languagesList = client.DisplayLanguages();
            //  dt.LoadDataRow(languagesList);
        }