Exemple #1
0
 /// <remarks/>
 public void upsertAsync(string externalIDFieldName, sObject[] sObjects) {
     this.upsertAsync(externalIDFieldName, sObjects, null);
 }
Exemple #2
0
 /// <remarks/>
 public void upsertAsync(string externalIDFieldName, sObject[] sObjects, object userState) {
     if ((this.upsertOperationCompleted == null)) {
         this.upsertOperationCompleted = new System.Threading.SendOrPostCallback(this.OnupsertOperationCompleted);
     }
     this.InvokeAsync("upsert", new object[] {
                 externalIDFieldName,
                 sObjects}, this.upsertOperationCompleted, userState);
 }
Exemple #3
0
 /// <remarks/>
 public void updateAsync(sObject[] sObjects, object userState) {
     if ((this.updateOperationCompleted == null)) {
         this.updateOperationCompleted = new System.Threading.SendOrPostCallback(this.OnupdateOperationCompleted);
     }
     this.InvokeAsync("update", new object[] {
                 sObjects}, this.updateOperationCompleted, userState);
 }
Exemple #4
0
 /// <remarks/>
 public void updateAsync(sObject[] sObjects) {
     this.updateAsync(sObjects, null);
 }
Exemple #5
0
 /// <remarks/>
 public void createAsync(sObject[] sObjects) {
     this.createAsync(sObjects, null);
 }
Exemple #6
0
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                mypartner.SforceService binding = new mypartner.SforceService();
                mypartner.LoginResult lr = binding.login("*****@*****.**", "xyz6854XhuVzAcbHWENCYLHNQX41z943");
                if (!lr.passwordExpired)
                {
                    binding.Url = lr.serverUrl;
                    binding.SessionHeaderValue = new mypartner.SessionHeader();
                    binding.SessionHeaderValue.sessionId = lr.sessionId;

                    mypartner.sObject[] accs = new mypartner.sObject[1];

                    mypartner.sObject sObj = new mypartner.sObject();
                    System.Xml.XmlElement[] acct = new System.Xml.XmlElement[14];
                    System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
                    acct[0] = doc.CreateElement("Name");
                    acct[0].InnerText = txtName.Text.Trim();
                    acct[1] = doc.CreateElement("FirstPlayer__c");
                    acct[1].InnerText = txtFirstPlayer.Text;
                    acct[2] = doc.CreateElement("SecondPlayer__c");
                    acct[2].InnerText = txtSecondPlayer.Text;
                    acct[3] = doc.CreateElement("MoveList__c");
                    acct[3].InnerText = txtMoveList.Text;
                    acct[4] = doc.CreateElement("Description__c");
                    acct[4].InnerText = txtDescription.Text;
                    acct[5] = doc.CreateElement("Event__c");
                    acct[5].InnerText = txtEvent.Text;
                    acct[6] = doc.CreateElement("Round__c");
                    acct[6].InnerText = txtRound.Text;
                    acct[7] = doc.CreateElement("PlayDate__c");
                    acct[7].InnerText = txtPlayDate.Text;
                    acct[8] = doc.CreateElement("RedFirst__c");
                    acct[8].InnerText = txtRed.Text;
                    acct[9] = doc.CreateElement("Result__c");
                    acct[9].InnerText = txtResult.Text;
                    acct[10] = doc.CreateElement("SharedBy__c");
                    acct[10].InnerText = txtSharedBy.Text;
                    acct[11] = doc.CreateElement("SharedToken__c");
                    acct[11].InnerText = txtSharedToken.Text;
                    acct[12] = doc.CreateElement("Source__c");
                    acct[12].InnerText = txtSource.Text;
                    acct[13] = doc.CreateElement("XiangqiType__c");
                    acct[13].InnerText = txtXiangqiType.Text;
                    sObj.type = "Xiangqi__c";
                    sObj.Any = acct;
                    accs[0] = sObj;

                    mypartner.SaveResult[] sr = binding.create(accs);
                    for (int k = 0; k < sr.Length; k++)
                    {
                        if (sr[k].success)
                        {
                        }
                        else
                        {
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Exemple #7
0
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                mypartner.SforceService binding = new mypartner.SforceService();
                mypartner.LoginResult lr = binding.login("*****@*****.**", "+v+h@0+v6854XhuVzAcbHWENCYLHNQX41z943");
                if (!lr.passwordExpired)
                {
                    binding.Url = lr.serverUrl;
                    binding.SessionHeaderValue = new mypartner.SessionHeader();
                    binding.SessionHeaderValue.sessionId = lr.sessionId;

                    mypartner.sObject[] accs = new mypartner.sObject[1];

                    mypartner.sObject sObj = new mypartner.sObject();
                    System.Xml.XmlElement[] acct = new System.Xml.XmlElement[12];
                    System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
                    acct[0] = doc.CreateElement("Name");
                    acct[0].InnerText = txtName.Text.Trim();
                    acct[1] = doc.CreateElement("Author__c");
                    acct[1].InnerText = txtAuthor.Text;
                    acct[2] = doc.CreateElement("MoveList__c");
                    acct[2].InnerText = txtMoveList.Text;
                    acct[3] = doc.CreateElement("Description__c");
                    acct[3].InnerText = txtDescription.Text;
                    acct[4] = doc.CreateElement("RedFirst__c");
                    acct[4].InnerText = txtRed.Text;
                    acct[5] = doc.CreateElement("Result__c");
                    acct[5].InnerText = txtResult.Text;
                    acct[6] = doc.CreateElement("SharedBy__c");
                    acct[6].InnerText = txtSharedBy.Text;
                    acct[7] = doc.CreateElement("SharedToken__c");
                    acct[7].InnerText = txtSharedToken.Text;
                    acct[8] = doc.CreateElement("Source__c");
                    acct[8].InnerText = txtSource.Text;
                    acct[9] = doc.CreateElement("Comments__c");
                    acct[9].InnerText = txtComments.Text;
                    acct[10] = doc.CreateElement("Variations__c");
                    acct[10].InnerText = txtVariations.Text;
                    acct[11] = doc.CreateElement("Fen__c");
                    acct[11].InnerText = txtFen.Text;
                    sObj.type = "XiangqiQuiz__c";
                    sObj.Any = acct;
                    accs[0] = sObj;

                    mypartner.SaveResult[] sr = binding.create(accs);

                    for (int k = 0; k < sr.Length; k++)
                    {
                        if (sr[k].success)
                        {
                            MessageBox.Show(sr[k].id.ToString());
                        }
                        else
                        {
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }