Beispiel #1
0
        private void EditCompany(dynamic sender, EventArgs e)
        {
            long                id  = sender.Tag;
            CompanyWSClient     ws  = new CompanyWSClient();
            findCompanyResponse res = ws.findCompany(new CompanyWS.Security {
                BinarySecurityToken = authToken
            },
                                                     new findCompany {
                arg1 = id, arg1Specified = true
            });
            CompanyForm form = new CompanyForm(authToken, this, res.@return);

            form.Show();
        }
Beispiel #2
0
        private void InitializeEditUser(bool seller)
        {
            dynamic source = seller ? user.userData.userData : user.userData;

            user_name.Text                   = source.name;
            user_surname.Text                = source.surname;
            user_email.Text                  = source.email;
            user_enabled.Checked             = source.accountEnabled;
            user_document.Text               = source.idDocument;
            user_username.Text               = source.username;
            user_document_type.SelectedIndex = user_document_type.FindStringExact(source.documentType + "");
            if (seller)
            {
                CompanyWSClient     ws  = new CompanyWSClient();
                findCompanyResponse res = ws.findCompany(new CompanyWS.Security {
                    BinarySecurityToken = authToken
                },
                                                         new findCompany {
                    arg1 = user.userData.companyId, arg1Specified = true
                });
                user_company.SelectedIndex = user_company.FindStringExact([email protected] + " - " + [email protected]);
            }
        }