예제 #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            button2_Validating(sender, null);
            nameTxt_Validating(sender, null);

            if (errorProvider.GetError(button2) != "" || errorProvider.GetError(nameTxt) != "")
            {
                UIHelper.errorBox(this, "لطفا خطاها را رفع کنید.");
                this.DialogResult = System.Windows.Forms.DialogResult.None;
            }
            else
            {
                Event ev = new Event();
                ev.Action = selectedAction;
                ev.Name = nameTxt.Text;
                DivanDataContext.Instance.Events.InsertOnSubmit(ev);
                DivanDataContext.Instance.SubmitChanges();
            }
        }
예제 #2
0
		private void detach_Events(Event entity)
		{
			this.SendPropertyChanging();
			entity.Action = null;
		}
예제 #3
0
		private void attach_Events(Event entity)
		{
			this.SendPropertyChanging();
			entity.Action = this;
		}
예제 #4
0
 partial void DeleteEvent(Event instance);
예제 #5
0
 partial void UpdateEvent(Event instance);
예제 #6
0
 partial void InsertEvent(Event instance);
예제 #7
0
 private void select_Click(object sender, EventArgs e)
 {
     SelectedEvent = (Event)eventsGrid.SelectedRows[0].DataBoundItem;
        DialogResult = System.Windows.Forms.DialogResult.OK;
 }