예제 #1
0
 public void Delete(string ID)
 {
     EWC_DBHelper.RunTSQL("delete EWC_Photo where PhotoID=@pid",
                          new Dictionary <string, object> {
         { "@pid", ID }
     });
 }
예제 #2
0
    //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 }
        });
    }
예제 #3
0
 public void Delete(string ID)
 {
     EWC_DBHelper.RunTSQL("delete EWC_Album where AlbumID=@abid",
                          new Dictionary <string, object> {
         { "@abid", ID }
     });
 }
예제 #4
0
 public void Delete(string ID)
 {
     EWC_DBHelper.RunTSQL("delete EWC_Activity where ActivityID=@id",
                          new Dictionary <string, object> {
         { "@id", ID }
     });
 }
예제 #5
0
 //    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 }
     });
 }
예제 #6
0
 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 }
     });
 }
예제 #7
0
 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 }
     });
 }
예제 #8
0
 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 }
     });
 }
예제 #9
0
    //更新相片資訊
    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] }
        });
    }
예제 #10
0
 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 },
     });
 }
예제 #11
0
    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] }
        });
    }
예제 #12
0
 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 }
     });
 }
예제 #13
0
 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 }
     });
 }