Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > Windows Azure > Windows Azure (Mobile Services) and iOS (iPhone , iPad) > How to update data to Mobile Services - iOS / iPhone (Windows Azure)



Clound SSD Virtual Server

How to update data to Mobile Services - iOS / iPhone (Windows Azure)

How to update data to Mobile Services - iOS / iPhone (Windows Azure) สรุปวิธีการบันทึก Update แก้ไขข้อมูลบน Table ของ Mobile Services บน Windows Azure ด้วย iOS / iPhone แบบสั้น ๆ ง่าย ๆ

-(void)updateItem:(NSMutableDictionary *)mutable completion:(QSCompletionBlock)completion
{
    
    // Update the item in the TodoItem table and remove from the items array on completion
    [self.table update:mutable completion:^(NSDictionary *item, NSError *error) {
        
        [self logErrorIfNotNil:error];

        // Let the caller know that we have finished
        completion();
    }];
}

- (IBAction)btnSave:(id)sender {

    // Find item that was commited for editing (update)
    NSDictionary *item = [self.memberService.items objectAtIndex:0];
    
    NSMutableArray *mutableItems = (NSMutableArray *) upItems;
    
    // Set the item to be complete (we need a mutable copy)
    NSMutableDictionary *mutable = [item mutableCopy];
    [mutable setObject:txtUsername.text forKey:@"username"];
    [mutable setObject:txtPassword.text forKey:@"password"];
    [mutable setObject:txtName.text forKey:@"name"];
    [mutable setObject:txtEmail.text forKey:@"email"];
    [mutable setObject:txtTel.text forKey:@"tel"];
    
    // Replace the original in the items array
    NSUInteger index = [upItems indexOfObjectIdenticalTo:item];
    [mutableItems replaceObjectAtIndex:index withObject:mutable];

    // Ask the todoService to set the item's complete value to YES, and remove the row if successful
    [self.memberService updateItem:mutable completion:^(NSUInteger index)
     {
         UIAlertView *av =
         [[UIAlertView alloc]
          initWithTitle:@"Update Data"
          message:@"Update Data Successfully."
          delegate: self
          cancelButtonTitle:@"OK"
          otherButtonTitles:nil
          ];
         [av show];
         
          //ViewController *view2 = [[[ViewController alloc] initWithNibName:nil bundle:nil] autorelease];
          //[self presentViewController:view2 animated:YES completion:NULL];
         
     }];
    
}


Example

Show Case 3 : Update Data (iOS / iPhone and Mobile Services)







   
Share

Property & Method (Others Related)

ตอนที่ 5 : iOS / iPhone สร้างตาราง Table บน Mobile Services และการ Insert ข้อมูล
How to read data in Mobile Services - iOS / iPhone (Windows Azure)
How to insert data to Mobile Services - iOS / iPhone (Windows Azure)
How to delete data in Mobile Services - iOS / iPhone (Windows Azure)

ช่วยกันสนับสนุนรักษาเว็บไซต์ความรู้แห่งนี้ไว้ด้วยการสนับสนุน Source Code 2.0 ของทีมงานไทยครีเอท


ลองใช้ค้นหาข้อมูล


   


Bookmark.   
       
  By : ThaiCreate.Com Team (บทความเป็นลิขสิทธิ์ของเว็บไทยครีเอทห้ามนำเผยแพร่ ณ เว็บไซต์อื่น ๆ)
  Score Rating :  
  Create/Update Date : 2013-07-24 15:02:15 / 2013-07-24 15:14:29
  Download : No files
 Sponsored Links / Related

 
ตอนที่ 1 : รู้จัก iOS กับ Mobile Services บน Windows Azure คืออะไร
Rating :

 
ตอนที่ 2 : เตรียมความพร้อมของ iOS / iPhone ก่อนที่จะเขียนบน Mobile Services
Rating :

 
ตอนที่ 3 : การสร้าง iOS / iPhone กับ Mobile Services และการเรียกใช้งานแบบง่าย ๆ
Rating :

 
ตอนที่ 4 : สร้าง Project iOS / iPhone และการเชื่อมต่อกับ Library ของ Mobile Services
Rating :

 
ตอนที่ 5 : iOS / iPhone สร้างตาราง Table บน Mobile Services และการ Insert ข้อมูล
Rating :

 
ตอนที่ 6 : iOS / iPhone อ่าน Data จาก Table ของ Mobile Service และแสดงผลบน App
Rating :

 
ตอนที่ 7 : อ่านข้อมูล Mobile Services แบบมีเงื่อนไข Where และแสดงผล iOS / iPhone
Rating :

 
ตอนที่ 8 : การทำ Authentication in Azure Mobile Services ด้วย iOS / iPhone
Rating :

 
ตอนที่ 9 : การทำ Push Notifications in Mobile Services ด้วย iOS / iPhone
Rating :

 
ตอนที่ 10 : การทำ Validate และ Modify data in Mobile Services บน iOS / iPhone
Rating :

 
ตอนที่ 11 : การทำ Refine Mobile Services queries with paging บน iOS / iPhone
Rating :

 
ตอนที่ 12 : การเขียน Scripts to authorize users in Mobile Services บน iOS / iPhone
Rating :

 
ตอนที่ 13 : Show Case 1 : Register Form (iOS / iPhone and Mobile Services)
Rating :

 
ตอนที่ 14 : Show Case 2 : Login User Password (iOS / iPhone and Mobile Services)
Rating :

 
ตอนที่ 15 : Show Case 3 : Update Data (iOS / iPhone and Mobile Services)
Rating :

 
ตอนที่ 16 : Show Case 4 : Delete Data (iOS / iPhone and Mobile Services)
Rating :

 
ตอนที่ 17 : บทความอื่น ๆ เกี่ยวกับ iOS / iPhone Mobile Services บน Windows Azure
Rating :


ThaiCreate.Com Forum


Comunity Forum Free Web Script
Jobs Freelance Free Uploads
Free Web Hosting Free Tools

สอน PHP ผ่าน Youtube ฟรี
สอน Android การเขียนโปรแกรม Android
สอน Windows Phone การเขียนโปรแกรม Windows Phone 7 และ 8
สอน iOS การเขียนโปรแกรม iPhone, iPad
สอน Java การเขียนโปรแกรม ภาษา Java
สอน Java GUI การเขียนโปรแกรม ภาษา Java GUI
สอน JSP การเขียนโปรแกรม ภาษา Java
สอน jQuery การเขียนโปรแกรม ภาษา jQuery
สอน .Net การเขียนโปรแกรม ภาษา .Net
Free Tutorial
สอน Google Maps Api
สอน Windows Service
สอน Entity Framework
สอน Android
สอน Java เขียน Java
Java GUI Swing
สอน JSP (Web App)
iOS (iPhone,iPad)
Windows Phone
Windows Azure
Windows Store
Laravel Framework
Yii PHP Framework
สอน jQuery
สอน jQuery กับ Ajax
สอน PHP OOP (Vdo)
Ajax Tutorials
SQL Tutorials
สอน SQL (Part 2)
JavaScript Tutorial
Javascript Tips
VBScript Tutorial
VBScript Validation
Microsoft Access
MySQL Tutorials
-- Stored Procedure
MariaDB Database
SQL Server Tutorial
SQL Server 2005
SQL Server 2008
SQL Server 2012
-- Stored Procedure
Oracle Database
-- Stored Procedure
SVN (Subversion)
แนวทางการทำ SEO
ปรับแต่งเว็บให้โหลดเร็ว


Hit Link
   







Load balance : Server 00
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่