예제 #1
0
        public static void AddNewActivity(EtiAplicacao etiApp, EtiConnNetBD conn, Cliente customer)
        {
            EventsClass e = null;

            try
            {
                e = new EventsClass();

                e.AddNewActivity(etiApp, customer);
            }
            catch (Exception ex)
            {
                if (Environment.UserInteractive)
                {
                    var errorDescription = string.Format("{0}.{1}.{2}", MethodBase.GetCurrentMethod().DeclaringType.FullName, MethodBase.GetCurrentMethod().Name, ex.Message);
                    MessageBox.Show(errorDescription);
                }
                else
                {
                    throw ex;
                }
            }
            finally
            {
                e = null;
            }
        }
예제 #2
0
        public static void PrintReportPersonalized(EtiAplicacao etiApp, MovVenda sale)
        {
            EventsClass e = null;

            try
            {
                e = new EventsClass();
                e.PrintReportPersonalized(etiApp, sale);
            }
            catch (Exception ex)
            {
                if (Environment.UserInteractive)
                {
                    var errorDescription = string.Format("{0}.{1}.{2}", MethodBase.GetCurrentMethod().DeclaringType.FullName, MethodBase.GetCurrentMethod().Name, ex.Message);
                    MessageBox.Show(errorDescription);
                }
                else
                {
                    throw ex;
                }
            }
            finally
            {
                e = null;
            }
        }
예제 #3
0
        public static void GetIsNew(EtiAplicacao etiApp, EtiConnNetBD conn, Cliente customer)
        {
            EventsClass e = null;

            try
            {
                e = new EventsClass();
                e.GetIsNew(etiApp, customer);

                Functions.NewActivity(etiApp, "Subject ... ", "Notes...", customer.Codigo, "1", (int)NaturezaAtividade.Tarefa, null);
            }
            catch (Exception ex)
            {
                if (Environment.UserInteractive)
                {
                    var errorDescription = string.Format("{0}.{1}.{2}", MethodBase.GetCurrentMethod().DeclaringType.FullName, MethodBase.GetCurrentMethod().Name, ex.Message);
                    MessageBox.Show(errorDescription);
                }
                else
                {
                    throw ex;
                }
            }
            finally
            {
                e = null;
            }
        }