Пример #1
0
        private void Cargar()
        {
            _objOperationResult = new OperationResult();
            var objRecetaBl = new RecetaBl();

            try
            {
                Task.Factory.StartNew(() =>
                {
                    _dataReporte = objRecetaBl.GetRecetaToReport(ref _objOperationResult, _serviceId);
                }, TaskCreationOptions.LongRunning).ContinueWith(t =>
                {
                    if (_objOperationResult.Success == 0)
                    {
                        MessageBox.Show(_objOperationResult.ErrorMessage, @"Error", MessageBoxButtons.OK,
                                        MessageBoxIcon.Error);
                        return;
                    }
                    ultraGrid1.DataSource = _dataReporte;
                },
                                                                 TaskScheduler.FromCurrentSynchronizationContext());
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Пример #2
0
 public frmRecetaMedica(List <DiagnosticRepositoryList> ListaDX, string serviceId, string protocolId)
 {
     _serviceId = serviceId;
     InitializeComponent();
     _objRecetaBl                   = new RecetaBl();
     _pobjOperationResult           = new OperationResult();
     _listDiagnosticRepositoryLists = ListaDX;
     _protocolId = protocolId;
 }
Пример #3
0
 public frmAddRecipe(ActionForm actionForm, string idDiagnosticRepository, int recipeId, string protocolId, string serviceId, string categoryName, string LineId)
 {
     InitializeComponent();
     _recipeId = recipeId;
     _idDiagnosticRepository = idDiagnosticRepository;
     _pobjOperationResult    = new OperationResult();
     _objRecetaBl            = new RecetaBl();
     _actionForm             = actionForm;
     _protocolId             = protocolId;
     Text          = actionForm == ActionForm.Add ? "Agregar Nueva Receta" : "Editar Receta";
     _serviceId    = serviceId;
     _categoryName = categoryName;
     _LineId       = LineId;
 }
Пример #4
0
        private void ultraButton1_Click(object sender, EventArgs e)
        {
            try
            {
                _objOperationResult = new OperationResult();
                var objRecetaBl = new RecetaBl();
                var data        = (List <recetadespachoDto>)ultraGrid1.DataSource;
                objRecetaBl.UpdateDespacho(ref _objOperationResult, data);
                if (_objOperationResult.Success == 0)
                {
                    MessageBox.Show(_objOperationResult.ErrorMessage, @"Error", MessageBoxButtons.OK,
                                    MessageBoxIcon.Error);
                    return;
                }

                Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }