private void LoadData() { OperationResult objOperationResult = new OperationResult(); Utils.LoadDropDownList(cboTipoCuenta, "Value1", "Id", BLL.Utils.GetSystemParameterForCombo(ref objOperationResult, 310, null), DropDownListAction.All); this.grdTicketDetalle.DisplayLayout.AutoFitStyle = AutoFitStyle.ResizeAllColumns; if (_mode == "New") { int Year = DateTime.Now.Year; int Month = DateTime.Now.Month; int intNodeId = int.Parse(Globals.ClientSession.GetAsList()[2]); txtFecha.Text = DateTime.Now.ToString("dd/MM/yyyy"); txtNServicio.Text = _serviceId; } else if (_mode == "Edit") { objticketDtoo = _objTicketBl.GetTicket(ref objOperationResult, _tickId); txtNTicket.Text = objticketDtoo.v_TicketId; txtFecha.Text = objticketDtoo.d_Fecha.ToString(); txtNServicio.Text = objticketDtoo.v_ServiceId; if (objticketDtoo.i_ConCargoA == (int)CargoHospitalizacion.Paciente) { rbPaciente.Checked = true; } else { rbMedicoTratante.Checked = true; } cboTipoCuenta.SelectedValue = objticketDtoo.i_TipoCuentaId.ToString(); var dataListPc = _objTicketBl.GetTicketDetails(ref objOperationResult, _tickId); if (objticketDtoo.i_TicketInterno == 1) { chkTicketInterno.Checked = true; } else { chkTicketInterno.Checked = false; } grdTicketDetalle.DataSource = dataListPc; _tmpTicketDetalleList = dataListPc; if (objOperationResult.Success != 1) { MessageBox.Show("Error en operación:" + System.Environment.NewLine + objOperationResult.ExceptionMessage, "ERROR!", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }