Exemple #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();
            }
        }
Exemple #2
0
		private void detach_Events(Event entity)
		{
			this.SendPropertyChanging();
			entity.Action = null;
		}
Exemple #3
0
		private void attach_Events(Event entity)
		{
			this.SendPropertyChanging();
			entity.Action = this;
		}
Exemple #4
0
 partial void DeleteEvent(Event instance);
Exemple #5
0
 partial void UpdateEvent(Event instance);
Exemple #6
0
 partial void InsertEvent(Event instance);
Exemple #7
0
 private void select_Click(object sender, EventArgs e)
 {
     SelectedEvent = (Event)eventsGrid.SelectedRows[0].DataBoundItem;
        DialogResult = System.Windows.Forms.DialogResult.OK;
 }