public void Delete(string ID) { EWC_DBHelper.RunTSQL("delete EWC_Photo where PhotoID=@pid", new Dictionary <string, object> { { "@pid", ID } }); }
//public void Update(EWC_SignUp s) //{ // EWC_DBHelper.RunTSQL("update EWC_ActivitySignUpDetail set Name=@name where ActivityID=@id", // new Dictionary<string, object> { // { "@id" , a.ActivityID } , // { "@name" , a.Name } // }); //} public void Delete(string ID) { EWC_DBHelper.RunTSQL("delete EWC_ActivitySignUpDetail where EmployeeID=@eid", new Dictionary <string, object> { { "@eid", ID } }); }
public void Delete(string ID) { EWC_DBHelper.RunTSQL("delete EWC_Album where AlbumID=@abid", new Dictionary <string, object> { { "@abid", ID } }); }
public void Delete(string ID) { EWC_DBHelper.RunTSQL("delete EWC_Activity where ActivityID=@id", new Dictionary <string, object> { { "@id", ID } }); }
// if (a.note == "") // { // DBNull.Value //}else //a.note public void Update(EWC_Activity a) { EWC_DBHelper.RunTSQL("update EWC_Activity set Type=@type, Title=@title, Photo=@photo, ActivityDescription=@desc , ActiveDate=@ad , StartDate=@sd , EndDate=@ed , StartTime=@st , EndTime=@et , Location=@locat , ActivitySchedule=@sche , AllowSignUp=@as , StartSignUpDate=@ssd , EndSignUpDate=@esd , CompanyAmount=@ca , Charge=@charge , Bus=@bus , Note=@note where ActivityID=@id", new Dictionary <string, object> { { "@id", a.ActivityID }, { "@type", a.Type }, { "@title", a.Title }, { "@photo", a.Photo }, { "@desc", a.ActivityDescription }, { "@ad", a.ActiveDate }, { "@sd", a.StartDate }, { "@ed", a.EndDate }, { "@st", a.StartTime }, { "@et", a.EndTime }, { "@locat", a.Location }, { "@sche", a.ActivitySchedule }, { "@as", a.AllowSignUp }, { "@ssd", a.StartSignUpDate }, { "@esd", a.EndSignUpDate }, { "@ca", a.CompanyAmount }, { "@charge", a.Charge }, { "@bus", a.Bus }, { "@note", a.Note } }); }
public void Insert(EWC_Activity a) { EWC_DBHelper.RunTSQL("insert into EWC_Activity values(@id ,@type, @title, @photo, @desc , @ad , @sd , @ed , @st , @et , @locat , @sche , @as , @ssd , @esd , @ca , @charge , @bus , @note)", new Dictionary <string, object> { { "@id", a.ActivityID }, { "@type", a.Type }, { "@title", a.Title }, { "@photo", a.Photo }, { "@desc", a.ActivityDescription }, { "@ad", a.ActiveDate }, { "@sd", a.StartDate }, { "@ed", a.EndDate }, { "@st", a.StartTime }, { "@et", a.EndTime }, { "@locat", a.Location }, { "@sche", a.ActivitySchedule }, { "@as", a.AllowSignUp }, { "@ssd", a.StartSignUpDate }, { "@esd", a.EndSignUpDate }, { "@ca", a.CompanyAmount }, { "@charge", a.Charge }, { "@bus", a.Bus }, { "@note", a.Note } }); }
public void Update(EWC_Photo p) { EWC_DBHelper.RunTSQL("update EWC_Photo set PhotoDesc=@pd where PhotoID=@pid", new Dictionary <string, object> { { "@pid", p.PhotoID }, { "@pd", p.PhotoDesc } }); }
public void UpdateDefaultPhoto(string AlbumID, string DefaultPhoto) { EWC_DBHelper.RunTSQL("update EWC_Album set DefaultPhoto=@df where AlbumID=@abid", new Dictionary <string, object> { { "@abid", AlbumID }, { "@df", DefaultPhoto } }); }
//更新相片資訊 public void Update(string p) { string[] ary = p.Split(','); EWC_DBHelper.RunTSQL("update EWC_Photo set PhotoDesc=@pd where PhotoID=@pid", new Dictionary <string, object> { { "@pid", ary[0] }, { "@pd", ary[1] } }); }
public void Insert(EWC_Photo p) { EWC_DBHelper.RunTSQL("insert into EWC_Photo values(@pid ,@abid, @fp, @pd)", new Dictionary <string, object> { { "@pid", p.PhotoID }, { "@abid", p.AlbumID }, { "@fp", p.FilePath }, { "@pd", p.PhotoDesc }, }); }
public void Update(string a) { string [] ary = a.Split(','); EWC_DBHelper.RunTSQL("update EWC_Album set AlbumTitle=@abt,AlbumDesc=@abdesc where AlbumID=@abid", new Dictionary <string, object> { { "@abid", ary[0] }, { "@abt", ary[1] }, { "@abdesc", ary[2] } }); }
public void Insert(EWC_Album a) { EWC_DBHelper.RunTSQL("insert into EWC_Album values(@abid ,@atid, @abtitle, @abdesc, @df)", new Dictionary <string, object> { { "@abid", a.AlbumID }, { "@atid", a.ActivityID }, { "@abtitle", a.AlbumTitle }, { "@abdesc", a.AlbumDesc }, { "@df", a.DefaultPhoto } }); }
public void Insert(EWC_SignUp s) { EWC_DBHelper.RunTSQL("insert into EWC_ActivitySignUpDetail values(@suid ,@aid, @eid, @name, @ise , @tb)", new Dictionary <string, object> { { "@suid", s.ActivitySignUpDetailID }, { "@aid", s.ActivityID }, { "@eid", s.EmployeeID }, { "@name", s.Name }, { "@ise", s.IsEmployee }, { "@tb", s.TourBus } }); }