Example #1
0
 public bool commitDelete(int _id)
 {
     timelineDataContext objtimeDC = new timelineDataContext();
     using (objtimeDC)
     {
         var objDelTime = objtimeDC.Timelines.Single(x => x.Id == _id);
         objtimeDC.Timelines.DeleteOnSubmit(objDelTime);
         objtimeDC.SubmitChanges();
         return true;
     }
 }
Example #2
0
 public bool commitUpdate(int _id, string _image, string _text, string _date)
 {
     timelineDataContext objtimeDC = new timelineDataContext();
     using (objtimeDC)
     {
         var objUpTime = objtimeDC.Timelines.Single(x => x.Id == _id);
         objUpTime.image = _image;
         objUpTime.text = _text;
         objUpTime.date = _date;
         objtimeDC.SubmitChanges();
         return true;
     }
 }
Example #3
0
    public bool commitInsert(string _image, string _text, string _date)
    {
        timelineDataContext objtimeDC = new timelineDataContext();
        using (objtimeDC)
        {
            Timeline objNewTime = new Timeline();
            objNewTime.image = _image;
            objNewTime.text = _text;
            objNewTime.date = _date;

            objtimeDC.Timelines.InsertOnSubmit(objNewTime);
            objtimeDC.SubmitChanges();
            return true;

        }


    }