void avCardViewer_OnButtonClick(object sender, PFGA_Cards.CardViewerEventArgs args) { frmParent frm = (frmParent)this.ParentForm; frm.showList(); this.Close(); this.Dispose(); }
private void makeCardsToolStripMenuItem_Click(object sender, EventArgs e) { MembershipTableAdapters.QueriesTableAdapter da = new MembershipTableAdapters.QueriesTableAdapter(); da.qryCards(thisYear()); frmParent frm = (frmParent)this.ParentForm; frm.showCards(); this.Close(); this.Dispose(); }
private void viewCardLIstToolStripMenuItem_Click(object sender, EventArgs e) { try { frmParent frm = (frmParent)this.ParentForm; frm.showCardList(); this.Close(); this.Dispose(); } catch (Exception ex) { ErrorLogger.Log("Error Showing Card List: ", ex, true); } }
private void btnNew_Click(object sender, EventArgs e) { try { frmParent frm = (frmParent)this.ParentForm; frm.newMember(); this.Close(); this.Dispose(); } catch (Exception ex) { ErrorLogger.Log("Error trying to create a new user", ex, true); } }
private void EditMember(DataGridViewCellEventArgs e) { try { int ID = Int32.Parse(dgMemberList.Rows[e.RowIndex].Cells[dgMemberList.Columns["colID"].Index].Value.ToString()); frmParent frm = (frmParent)this.ParentForm; frm.editMember(ID); this.Close(); this.Dispose(); } catch (Exception ex) { ErrorLogger.Log("Error Editing Member: ", ex, true); } }
private void btnCancel_Click(object sender, EventArgs e) { try { if ((!IsExtra) && Promote == -1 && ID > 0) { frmParent frm = (frmParent)this.ParentForm; frm.showList(); } this.Close(); this.Dispose(); } catch (Exception ex) { ErrorLogger.Log("Error trying to cancel", ex, true); } }
private void btnSave_Click(object sender, EventArgs e) { double tmpPal; MemoryStream ms = new MemoryStream(); try { mbr.LastName = last_NameTextBox.Text; mbr.FirstName = first_NameTextBox.Text; mbr.BirthDate = birth_DateDateTimePicker.Value; mbr.Address = addressTextBox.Text; mbr.CityProv = city__ProvTextBox.Text; mbr.Postal = postalTextBox.Text; mbr.Phone = phoneTextBox.Text; mbr.Email = email_AddressTextBox.Text; mbr.UserName = website_UsernamesTextBox.Text; if (!double.TryParse(palTextBox.Text, out tmpPal)) { tmpPal = 0; } mbr.Pal = tmpPal; mbr.PalExpDate = pal_Exp_DateDateTimePicker.Value; mbr.MemberTypeID = int.Parse(cboMemberType.SelectedValue.ToString()); mbr.JoinedDate = date_JoinedDateTimePicker.Value; mbr.Walk = cboWalk.Text; mbr.SectionFlag = _Sections.Mask; mbr.NoBackTrack = noBackTrackCheckBox.Checked; mbr.NoEmail = noEmailingCheckBox.Checked; mbr.Active = chkActive.Checked; mbr.Card = int.Parse(txtCardNumber.Text); mbr.Notes = txtNotes.Text; mbr.Sponsor = txtSponsor.Text; mbr.SwipeCard = chkSwipe.Checked; mbr.Executive = chkExecutive.Checked; mbr.Cell = txtCell.Text; mbr.ParticipationOther = txtOther.Text; mbr.Participation = _Participation.Mask; mbr.CardMade = chkCardMade.Checked; if (Badge.Image != null) { Badge.Image.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg); mbr.BadgeImage = ms.ToArray(); ms.Dispose(); /* * string imagesFiled = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "images"); * if (!Directory.Exists(imagesFiled)) * { * Directory.CreateDirectory(imagesFiled); * } * if (mbr.Card > 0) * { * Badge.Image.Save(string.Format(@"{0}\{1}.jpg", imagesFiled, mbr.Card.ToString())); * } */ } mbr.Save(); if ((!IsExtra) && ((Promote == -1 && ID > 0) || Application.OpenForms.Count == 2)) { frmParent frm = (frmParent)this.ParentForm; frm.showList(); } this.Close(); this.Dispose(); } catch (Exception ex) { ErrorLogger.Log("Error trying to Save the Member", ex, true); } }