示例#1
0
 /// <versions>28-02-2018(GesAMFC-v1.0.0.3)</versions>
 private void Load_Member()
 {
     try
     {
         Find_Member_Form objFindMemberForm = new Find_Member_Form();
         if (objFindMemberForm != null)
         {
             objFindMemberForm.FormClosing += delegate
             {
                 if (Program.Member_Found) //trocar por objFindMemberForm.Member_Found e remover Program.Member_Found no futuro
                 {
                     AMFCMember objMemberSelected = objFindMemberForm.MemberSelected;
                     if (objMemberSelected != null && objMemberSelected.NUMERO >= objMemberSelected.MinNumber && objMemberSelected.NUMERO <= objMemberSelected.MaxNumber)
                     {
                         this.Member = objMemberSelected;
                         TextEdit_Lotes_Socio_Numero.Text   = objMemberSelected.NUMERO.ToString();
                         TextEdit_Lotes_Socio_Nome.Text     = objMemberSelected.NOME;
                         LayoutControl_Global_Lotes.Visible = true;
                         Get_Member_Lotes();
                     }
                 }
             };
             objFindMemberForm.Show();
             objFindMemberForm.StartPosition = FormStartPosition.CenterParent;
             objFindMemberForm.Focus();
             objFindMemberForm.BringToFront();
             objFindMemberForm.Update();
         }
     }
     catch (Exception ex)
     {
         Program.HandleError(ex.TargetSite.Name, ex.Message, Program.ErroType.EXCEPTION, true, false);
         return;
     }
 }
示例#2
0
 private void Set_Member_Payment_Receipt()
 {
     try
     {
         Find_Member_Form objFindMemberForm = new Find_Member_Form();
         objFindMemberForm.FormClosing += delegate
         {
             if (Program.Member_Found)
             {
                 AMFCMember objMember = objFindMemberForm.MemberSelected;
                 if (objMember != null && objMember.NUMERO > 0 && objMember.NUMERO < objMember.MaxNumber)
                 {
                     Form_Receipt_Details objForm_Receipt_Details = new Form_Receipt_Details(objMember.NUMERO, objMember.NOME, objMember.NUMLOTE, 0);
                     objForm_Receipt_Details.FormClosing += delegate
                     {
                         if (objForm_Receipt_Details.SelectedValue > 0 && !String.IsNullOrEmpty(objForm_Receipt_Details.SelectedDescription))
                         {
                             Form_Payment_Receipt obj_Form_Payment_Receipt = new Form_Payment_Receipt();
                             obj_Form_Payment_Receipt.MdiParent                 = this;
                             obj_Form_Payment_Receipt.Receipt_Number            = 123;
                             obj_Form_Payment_Receipt.Receipt_Value             = objForm_Receipt_Details.SelectedValue;
                             obj_Form_Payment_Receipt.Receipt_Member_Number     = objMember.NUMERO;
                             obj_Form_Payment_Receipt.Receipt_Member_Name       = objMember.NOME;
                             obj_Form_Payment_Receipt.Receipt_Member_Lote       = objMember.NUMLOTE;
                             obj_Form_Payment_Receipt.Receipt_Member_Quantia    = Program.QuantiaToExtenso(obj_Form_Payment_Receipt.Receipt_Value);
                             obj_Form_Payment_Receipt.Receipt_Member_Designacao = objForm_Receipt_Details.SelectedDescription;
                             obj_Form_Payment_Receipt.Set_Member_Pay_Receipt();
                             obj_Form_Payment_Receipt.FormClosing += delegate
                             {
                             };
                             obj_Form_Payment_Receipt.Show();
                             obj_Form_Payment_Receipt.StartPosition = FormStartPosition.CenterParent;
                             obj_Form_Payment_Receipt.Focus();
                             obj_Form_Payment_Receipt.BringToFront();
                         }
                     };
                     objForm_Receipt_Details.Show();
                     objForm_Receipt_Details.StartPosition = FormStartPosition.CenterParent;
                     objForm_Receipt_Details.Focus();
                     objForm_Receipt_Details.BringToFront();
                 }
             }
         };
         objFindMemberForm.Show();
         objFindMemberForm.StartPosition = FormStartPosition.CenterParent;
         objFindMemberForm.Focus();
         objFindMemberForm.BringToFront();
     }
     catch (Exception ex)
     {
         Program.HandleError(ex.TargetSite.Name, ex.Message, Program.ErroType.EXCEPTION, true, false);
         return;
     }
 }
示例#3
0
        /// <versions>03-05-2017(v0.0.2.51)</versions>
        private void Find_Member()
        {
            try
            {
                #region     Find Member Form
                Find_Member_Form objFindMemberForm = new Find_Member_Form();
                objFindMemberForm.FormClosing += delegate
                {
                    #region     Member Found
                    if (Program.Member_Found)
                    {
                        #region     Find Member Selected
                        AMFCMember objMemberSelected = objFindMemberForm.MemberSelected;
                        if (objMemberSelected != null && objMemberSelected.NUMERO >= objMemberSelected.MinNumber && objMemberSelected.NUMERO < objMemberSelected.MaxNumber && !String.IsNullOrEmpty(objMemberSelected.NOME) && !String.IsNullOrEmpty(objMemberSelected.MORADA) && !String.IsNullOrEmpty(objMemberSelected.CPOSTAL) && !String.IsNullOrEmpty(objMemberSelected.NUMLOTE))
                        {
                            this.Member = objMemberSelected;

                            //Fill_Member_Letter_Address_Editor();
                            Set_Member_Letter_Address();
                        }
                        #endregion  Find Member Selected
                    }
                    #endregion  Member Found
                };
                objFindMemberForm.Show();
                objFindMemberForm.StartPosition = FormStartPosition.CenterParent;
                objFindMemberForm.Focus();
                objFindMemberForm.BringToFront();
                return;

                #endregion  Find Member Form
            }
            catch (Exception ex)
            {
                Program.HandleError(ex.TargetSite.Name, ex.Message, Program.ErroType.EXCEPTION, true, false);
                return;
            }
        }