Copyright © 2003-2009
By Suthep Sangvirotjanaphat
  Mobile: 089-967-2200, 081-915-7816
Phone: 0-2992-4877   Fax: 0-2992-4878
Fast Contact Us

GreatFriends.Biz Community

Custom Search
Copy เพื่ออ้างอิงถึงข้อความนี้:
 MESSAGE #108694 (อ่าน 1,028 ครั้ง)

Screencast - Programming SharePoint Custom List with Object Model and ASP.NET

Tags: Web, VB, .NET 3.5, WSS/MOSS, Coding, Article

ผมนำเนื้อหาที่บรรยายใน ZZ# Back Coffee 2 มาทำเป็น Screencast ให้ชมกันนะครับ

 
ส่วนเนื้อหาใน Screencast ผมทำ Format เป็นไฟล์ WMV สามารถ Download ได้จาก SkyDrive ตาม Url ด้านล่างนี้
ซึ่งเนื้อหาของ Screencast ผมจะอธิบายถึง Custom List ใน SharePoint ก่อนและตามด้วย SharePoint Object Model ใน Video File ที่ 1
จากนั้นก็จะ Demo ให้ดูใน Video File ที่ 2 ไปจนถึง Video File สุดท้ายครับ.
 
 
 
 


banpote_tt วันที่ส่ง: 17 มิ.ย. 52 12:00 GMT+7
วันที่ปรับล่าสุด: 29 มิ.ย. 52 13:14 GMT+7
REPLY #1 (108696)

banpote_tt วันที่ส่ง: 17 มิ.ย. 52 12:02 GMT+7
วันที่ปรับล่าสุด: 17 มิ.ย. 52 12:02 GMT+7
REPLY #2 (108704)

โอ้!

ขอบคุณครับท่าน



nano วันที่ส่ง: 17 มิ.ย. 52 12:20 GMT+7
วันที่ปรับล่าสุด: 17 มิ.ย. 52 12:20 GMT+7
REPLY #3 (108707)
ไม่รู้ว่า Embed มาจาก SkyDrive จะมา Post ลงไปป่าวครับ??


banpote_tt วันที่ส่ง: 17 มิ.ย. 52 12:22 GMT+7
วันที่ปรับล่าสุด: 17 มิ.ย. 52 12:22 GMT+7
REPLY #4 (108708)
ไม่รู้ว่า Embed มาจาก SkyDrive จะมา Post ลงไปได้ป่าวครับ??


banpote_tt วันที่ส่ง: 17 มิ.ย. 52 12:22 GMT+7
วันที่ปรับล่าสุด: 17 มิ.ย. 52 12:22 GMT+7
REPLY #5 (108709)


banpote_tt วันที่ส่ง: 17 มิ.ย. 52 12:25 GMT+7
วันที่ปรับล่าสุด: 17 มิ.ย. 52 12:25 GMT+7
REPLY #6 (108710)
จัดให้ครับ.


surrealist วันที่ส่ง: 17 มิ.ย. 52 12:27 GMT+7
วันที่ปรับล่าสุด: 17 มิ.ย. 52 12:27 GMT+7
REPLY #7 (108712)
ถ้า copy มาวางเลยคงไม่ได้ครับ อาจต้องให้อาจารย์ วางให้
แต่ถ้าใช้เครื่อง Windows Live Writer ช่วย จะวางได้ครับ เช่น:
 
เปิด Windows Live Writer
แล้ว copy code Embed: ไปวางบน Windows Live Writer ดังรูป
 
เลือก HTML แบบพื้นฐาน
จากนั้น copy ทั้งหมดไปวางบน กระทู้ GF
จะได้ดังนี้:
 

 
 


nano วันที่ส่ง: 17 มิ.ย. 52 12:46 GMT+7
วันที่ปรับล่าสุด: 17 มิ.ย. 52 12:46 GMT+7
REPLY #8 (108715)
แจ่มเลยครับท่านเทพนาโน..


banpote_tt วันที่ส่ง: 17 มิ.ย. 52 13:05 GMT+7
วันที่ปรับล่าสุด: 17 มิ.ย. 52 13:05 GMT+7
REPLY #9 (108736)

ผมใช้ Windows Live Writer ในการ post บทความ ประจำอะครับ สะดวกดี

อีกอย่างไม่ต้องเปลืองเนื้อที่ disk ของ GF ด้วย ดีหลายต่อ
 
 


nano วันที่ส่ง: 17 มิ.ย. 52 15:41 GMT+7
วันที่ปรับล่าสุด: 17 มิ.ย. 52 15:41 GMT+7
REPLY #10 (108746)
เบื่อคนเก่งจังเลย อยากให้คนทั้งโลก IQ IE สูงสุดอยู่แค่ 20 คงจะน่ารักดี


เฮียอ้วน วันที่ส่ง: 17 มิ.ย. 52 23:27 GMT+7
วันที่ปรับล่าสุด: 17 มิ.ย. 52 23:27 GMT+7
REPLY #11 (108774)

ตอนนี้ IE เป็น v. 8 เองครับ

ถ้า IE เป็น v. 20 ไม่รู้จะปีใหน น้อ...
เหอๆ...


nano วันที่ส่ง: 18 มิ.ย. 52 13:56 GMT+7
วันที่ปรับล่าสุด: 18 มิ.ย. 52 13:56 GMT+7
REPLY #12 (108808)
Update File เพิ่มอีกอันนะครับเป็นตัวอย่างในการแก้ไขข้อมูลใน Custom List ครับ
ตัวอย่างที่ 3



banpote_tt วันที่ส่ง: 18 มิ.ย. 52 17:07 GMT+7
วันที่ปรับล่าสุด: 18 มิ.ย. 52 17:07 GMT+7
REPLY #13 (108828)
โอ้ ขอบคุณมากครับ ............กำลังสนใจ SharePoints อยู่เลย


Leo Van Messi วันที่ส่ง: 18 มิ.ย. 52 20:19 GMT+7
วันที่ปรับล่าสุด: 18 มิ.ย. 52 20:19 GMT+7
REPLY #14 (108847)
ดีคับ


banpote_tt วันที่ส่ง: 18 มิ.ย. 52 21:31 GMT+7
วันที่ปรับล่าสุด: 18 มิ.ย. 52 21:31 GMT+7
REPLY #15 (108851)
ขอบคุณครับ จอห์น ...อุอุ


mr.l วันที่ส่ง: 18 มิ.ย. 52 22:31 GMT+7
วันที่ปรับล่าสุด: 18 มิ.ย. 52 22:31 GMT+7
REPLY #16 (108871)

ขอบคุณคุณ banpote_tt  มากครับ กำลังสนใจเรื่องนี้พอดีเลย ได้ความรู้อีกเยอะเลยครับ

 
 
ปล. ยังเตะบอลอยู่หรือเปล่าครับ ตอนนี้ว่างแล้วอยากไปค้าแข้งกับคุณครับ


*aeed* วันที่ส่ง: 19 มิ.ย. 52 09:05 GMT+7
วันที่ปรับล่าสุด: 19 มิ.ย. 52 09:05 GMT+7
REPLY #17 (108881)
ไม่ได้เตะแล้วอะคับคงต้องไปเล่นกะคุณ Leo Van Messi แทนนะคับ อิอิ 


banpote_tt วันที่ส่ง: 19 มิ.ย. 52 10:08 GMT+7
วันที่ปรับล่าสุด: 19 มิ.ย. 52 10:08 GMT+7
REPLY #18 (109395)
Source แบบ C# ครับ
 
 
Page : GetCustomerData.aspx

public partial class GetCustomerData : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

if (!Page.IsPostBack)

{

getCustomer();

}

}

private void getCustomer()

{

SPSite _Site = new SPSite(http://ชื่อเครื่อง:พอร์ท);

SPWeb _Web = _Site.OpenWeb("Sales");

SPList _List = _Web.Lists["Customer"];

DataTable dt = _List.Items.GetDataTable();

DataView dv = dt.DefaultView;

dv.Sort = "Title ASC";

this.grvCustomer.DataSource = dv;

this.grvCustomer.DataBind();

}

}
 
---------------------------  ----------------------------
 
Page : NewCustomerData.aspx
 

public partial class NewCustomerData : System.Web.UI.Page

{

protected void btnAddNewCustomer_Click(object sender, EventArgs e)

{

SPSite _Site = new SPSite(http://ชื่อเครื่อง:พอร์ท);

SPWeb _Web = _Site.OpenWeb("Sales");

SPList _List = _Web.Lists["Customer"];

_Web.AllowUnsafeUpdates = true;

SPListItem _ListItem = _List.Items.Add();

_ListItem["CustomerID"] = "New CustomerID";

_ListItem["CompanyName"] = "New CompanyName";

_ListItem["ContactTitle"] = string.Empty;

_ListItem.Update();

_List.Update();

_Web.Dispose();

_Site.Dispose();

}

}
 
--------------------------------------------------------------------------
Page :UpdateCustomerData.aspx
 

public partial class UpdateCustomerData : System.Web.UI.Page

{

SPSite _Site = new SPSite(http://ชื่อเครื่อง:พอร์ท);

static SPWeb _Web = _Site.OpenWeb("Sales");

SPList _List = _Web.Lists["Customer"];

protected void btnUpdate_Click(object sender, EventArgs e)

{

_Web.AllowUnsafeUpdates = true;

SPListItem _ListItem = _List.GetItemById(1);

_ListItem["CompanyName"] = "Yote";

_ListItem.Update();

_List.Update();

_Web.Dispose();

_Site.Dispose();

}

protected void btnUpdate2_Click(object sender, EventArgs e)

{

_Web.AllowUnsafeUpdates = true;

SPListItem _ListItem = _List.GetItemById(1);

_ListItem["CompanyName"] = "GFPT";

_ListItem.Update();

_List.Update();

_Web.Dispose();

_Site.Dispose();

}



figgaro วันที่ส่ง: 29 มิ.ย. 52 13:13 GMT+7
วันที่ปรับล่าสุด: 29 มิ.ย. 52 13:13 GMT+7
REPLY #19 (109396)
Page :UpdateCustomerData.aspx
 

public partial class UpdateCustomerData : System.Web.UI.Page

{

static SPSite _Site = new SPSite(http://ชื่อเครื่อง:พอร์ท);

static SPWeb _Web = _Site.OpenWeb("Sales");

SPList _List = _Web.Lists["Customer"];

protected void btnUpdate_Click(object sender, EventArgs e)

{

_Web.AllowUnsafeUpdates = true;

SPListItem _ListItem = _List.GetItemById(1);

_ListItem["CompanyName"] = "Yote";

_ListItem.Update();

_List.Update();

_Web.Dispose();

_Site.Dispose();

}

protected void btnUpdate2_Click(object sender, EventArgs e)

{

_Web.AllowUnsafeUpdates = true;

SPListItem _ListItem = _List.GetItemById(1);

_ListItem["CompanyName"] = "GFPT";

_ListItem.Update();

_List.Update();

_Web.Dispose();

_Site.Dispose();

}
 
แก้ให้ใหม่ครับ - - ตก static ไป


figgaro วันที่ส่ง: 29 มิ.ย. 52 13:14 GMT+7
วันที่ปรับล่าสุด: 29 มิ.ย. 52 13:14 GMT+7
กระทู้นี้มีอายุเกิน 365 วันแล้ว ท่านจะไม่สามารถตอบกระทู้นี้ได้อีก
ถ้าต้องการสนทนาต่อ กรุณาตั้งเป็นกระทู้ใหม่ได้ในหน้าโฮม
และอาจจะอ้างถึงกระทู้นี้ โดยก๊อปปี้ข้อความในกล่องสีขาวด้านล่างไปแปะในกระทู้ใหม่

copy เพื่ออ้างอิงถึงข้อความนี้:
Screencast - Programming SharePoint Custom List with Object Model and ASP.NET
http://greatfriends.biz?108694


8 ก.ย. 19:34
Online: 164