Click here to Skip to main content
15,894,405 members
Home / Discussions / C#
   

C#

 
QuestionAutomation for WPF application with using Coded UI tool Pin
Member 1114888912-Oct-14 23:04
Member 1114888912-Oct-14 23:04 
AnswerRe: Automation for WPF application with using Coded UI tool Pin
Pete O'Hanlon13-Oct-14 0:08
mvePete O'Hanlon13-Oct-14 0:08 
Questionmovable combobox in datagridview in C# windows application Pin
ranjeet1112-Oct-14 21:51
ranjeet1112-Oct-14 21:51 
QuestionAccessing WCF from Excel/VBA Pin
devvvy12-Oct-14 5:19
devvvy12-Oct-14 5:19 
QuestionRe: Accessing WCF from Excel/VBA Pin
Richard MacCutchan12-Oct-14 8:57
mveRichard MacCutchan12-Oct-14 8:57 
AnswerRe: Accessing WCF from Excel/VBA Pin
CHill6012-Oct-14 9:11
mveCHill6012-Oct-14 9:11 
AnswerRe: Accessing WCF from Excel/VBA Pin
devvvy14-Oct-14 8:04
devvvy14-Oct-14 8:04 
AnswerRe: Accessing WCF from Excel/VBA Pin
Mycroft Holmes12-Oct-14 12:46
professionalMycroft Holmes12-Oct-14 12:46 
GeneralRe: Accessing WCF from Excel/VBA Pin
devvvy13-Oct-14 9:29
devvvy13-Oct-14 9:29 
GeneralRe: Accessing WCF from Excel/VBA Pin
Mycroft Holmes13-Oct-14 12:28
professionalMycroft Holmes13-Oct-14 12:28 
GeneralRe: Accessing WCF from Excel/VBA Pin
devvvy14-Oct-14 8:05
devvvy14-Oct-14 8:05 
Questionhow to delete a member of list<class> (list is Generic), by clicking button in form. Pin
cicill12-Oct-14 4:42
cicill12-Oct-14 4:42 
AnswerRe: how to delete a member of list<class> (list is Generic), by clicking button in form. Pin
BillWoodruff12-Oct-14 5:21
professionalBillWoodruff12-Oct-14 5:21 
QuestionHow to get the license key from here? Pin
Jassim Rahma11-Oct-14 10:11
Jassim Rahma11-Oct-14 10:11 
AnswerRe: How to get the license key from here? Pin
Garth J Lancaster11-Oct-14 13:11
professionalGarth J Lancaster11-Oct-14 13:11 
Questionmultiple Update query after Filter in datagridview Pin
AsthreA11-Oct-14 4:42
AsthreA11-Oct-14 4:42 
AnswerRe: multiple Update query after Filter in datagridview Pin
Richard Deeming13-Oct-14 2:21
mveRichard Deeming13-Oct-14 2:21 
Questioncreate Web browser in C# without using web browser control Pin
Member 1114079710-Oct-14 9:44
Member 1114079710-Oct-14 9:44 
AnswerRe: create Web browser in C# without using web browser control Pin
Eddy Vluggen10-Oct-14 9:46
professionalEddy Vluggen10-Oct-14 9:46 
AnswerRe: create Web browser in C# without using web browser control Pin
Pete O'Hanlon10-Oct-14 9:56
mvePete O'Hanlon10-Oct-14 9:56 
Questionhi friends Pin
Member 111430869-Oct-14 22:52
Member 111430869-Oct-14 22:52 
AnswerRe: hi friends Pin
Eddy Vluggen10-Oct-14 7:51
professionalEddy Vluggen10-Oct-14 7:51 
QuestionPlaying media with 2 different channels in stereo file using NAudio library Pin
Praveen Raghuvanshi9-Oct-14 17:55
professionalPraveen Raghuvanshi9-Oct-14 17:55 
AnswerRe: Playing media with 2 different channels in stereo file using NAudio library Pin
Eddy Vluggen10-Oct-14 7:53
professionalEddy Vluggen10-Oct-14 7:53 
QuestionWinform Change Label Text from secondary form action Pin
Derek Kennard9-Oct-14 1:56
professionalDerek Kennard9-Oct-14 1:56 
Okay, I've spent 2 days trying this and I give up/surrender. Please help... Cry | :((

I have a form (form1) and it has 3 labels (label1, label2, laebel3). On form1_load, label1, 2, & 3 load with values from a stored procedure. From a menu item, I select form2. form2 has a textbox (tb1). I populate tb1 with the #2. I press change and pass 2 and the value of form1.label1 into a stored procedure. Also, pressing change closes form2. The stored procedure from form2 retrieves three values. I want to pass the three values back to form1 and repopulate label1, 2, & 3. That is where the problem is. I pass values into form2's procedure just fine. I return the values just fine. I just cannot get the form1 labels to refresh with the new data.

I have some code below that I tried, but nothing seems to work. I was thinking a refresh or application do events or initialize components... nothing.

C#
private void ChgLoc()
            {
            GetPrimeLocBal.UidDal = Login.PassUserIdText;
            GetPrimeLocBal.NewLoc = tbLocId.Text;
            }

        private void RunChgLoc()
            {
            lblHoldSecLoc.Text = GetPrimeLocBal.SecondaryLoc;
            lblHoldTeam.Text = GetPrimeLocBal.TeamName;
            lblHoldUserName.Text = GetPrimeLocBal.UserNameId;
            }

        private void TransferMain()
            {
            new MainDesktop
            {
                PrimeLoc = lblHoldSecLoc.Text,
                UserNameId = lblHoldUserName.Text,
                TeamName = lblHoldTeam.Text
            };
            }

        private void MainReload()
            {
            var md = new MainDesktop();
            md.panel1_Enter();
            }

        private void btnChange_Click( object sender, EventArgs e )
            {
            ChgLoc();
            RunChgLoc();
            TransferMain();
            MainReload();
            Close();
            }

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.