Exemple #1
0
        public void MRemove(int mUniqueID)
        {
            LMaterialsDataContext tmpMC = new LMaterialsDataContext();

            Table <TStudy>      Materials = tmpMC.GetTable <TStudy>();
            IQueryable <TStudy> tmpQ      = from iter in Materials
                                            where iter.theUniqueID == mUniqueID
                                            select iter;
            TStudy tt = tmpQ.Where(x => x.theUniqueID == mUniqueID).Single();

            Materials.DeleteOnSubmit(tt);
            tmpMC.SubmitChanges();
        }
Exemple #2
0
        public int AddMaterials(ref CMaterials aMaterials)
        {
            LMaterialsDataContext tmpMC = new LMaterialsDataContext();

            TStudy tmpMaterials = new TStudy();

            tmpMaterials.theNumber     = 0;
            tmpMaterials.theTitle      = aMaterials.theTitle;
            tmpMaterials.theAttachFile = aMaterials.theAttachFile;
            //tmpMaterials.theAttachFile = "abc.hwp";
            // tmpMaterials.theAttachFile = Request.Form["materials"];
            //tmpMaterials.theFileName = aMaterials.theFile;
            //tmpMaterials.theFileName = "123.jpg";
            tmpMaterials.theWriter   = aMaterials.theWriter;
            tmpMaterials.theDate     = DateTime.Now;
            tmpMaterials.theFileName = aMaterials.theFileName;
            //     theNotices.Add(tmpNotice);

            tmpMC.TStudy.InsertOnSubmit(tmpMaterials);
            tmpMC.SubmitChanges();

            aMaterials.theDate = DateTime.Now;
            return(1);
        }
Exemple #3
0
 partial void UpdateTStudy(TStudy instance);
Exemple #4
0
 partial void DeleteTStudy(TStudy instance);
Exemple #5
0
 partial void InsertTStudy(TStudy instance);