Esempio n. 1
0
    public void btnSave_Clicked(object sender, EventArgs e)
    {
        MonkData db = new MonkData();
        Monks.jkp_Site site;
        if(SiteId != null)
        {
            site = db.jkp_Sites.First(p=>p.Site_ID == SiteId);
        }
        else
        {
            site = new Monks.jkp_Site();
            site.Site_ID = Guid.NewGuid();
        }

        site.Site_EnglishName = txtEnglishName.Text;
        site.Site_Description = txtDescription.Text;

        if(SiteId == null)
            db.jkp_Sites.InsertOnSubmit(site);
        db.SubmitChanges();
        mvAddEdit.ActiveViewIndex = 1;
    }
Esempio n. 2
0
		private void detach_jkp_Sites(jkp_Site entity)
		{
			this.SendPropertyChanging();
			entity.jkp_Address = null;
		}