コード例 #1
0
		private void DoKuMenTYUCiteLu_Detach(DokumentyUcitelu entity)
		{
			entity.Ucitele = null;
		}
コード例 #2
0
        private void addFileToDb(uint ucitel_id, string path)
        {
            DokumentyUcitelu d;

            using (var db = DrivingScoolContextHelper.CreateDataContext2())
            {
                try
                {
                    db.DokumentyUcitelu.InsertOnSubmit(d = new DokumentyUcitelu() 
                    {
                        DatumVlozeni = DateTime.Now,
                        Dokument = System.IO.File.ReadAllBytes(path),
                        DokumentNazev = Path.GetFileName(path),
                        UcitelID = ucitel_id,
                    });
                    db.SubmitChanges();
                }
                catch (MySqlException)
                {
                    throw new HttpResponseException(HttpStatusCode.InternalServerError);
                }
            }


            //HttpResponseMessage response = Request.CreateResponse();
            //return response;

        }
コード例 #3
0
		private void DoKuMenTYUCiteLu_Attach(DokumentyUcitelu entity)
		{
			entity.Ucitele = this;
		}