private void SetGuardarOperacionManual() { eOperacionVC eo = new eOperacionVC(); eo._Ide_Contrato = ddl_contrato_m.SelectedItem.Value; eo._Tip_Operacion = ddl_tipope_m.SelectedItem.Value; eo._Tipo_Registro = ddl_tipreg_m.SelectedItem.Value; eo._Cod_Reasegurador = ddl_reasegurador_m.SelectedItem.Value; eo._Ano_Operacion = Convert.ToInt32(Session["aniovigente"]); eo._Mes_Operacion = Session["mesvigente"].ToString(); eo._Cod_Asegurado = ddl_codasegurado_m.SelectedItem.Value; eo._Cod_Ramo = ddl_codramo_m.SelectedItem.Value; eo._Cod_Moneda = ddl_codmoneda_m.SelectedItem.Value; eo._Pri_Ced_Mes = txt_primaced_m.Text; eo._Des_Reg_Mes = "OPERACION " + ddl_tipope_m.SelectedItem.Text + " (MANUAL)"; eo._Imp_Impuesto_Mes = txt_impuesto_m.Text; eo._Pri_Xpag_Rea_Ced = txt_prima_x_pag_m.Text; eo._Pri_Xcob_Rea_Ace = txt_prima_x_cob_m.Text; eo._Sin_Directo = txt_sin_directo_m.Text; eo._Sin_Xcob_Rea_Ced = txt_sin_x_cob_m.Text; eo._Sin_Xpag_Rea_Ace = txt_sin_x_pag_m.Text; eo._Otr_Cta_Xcob_Rea_Ced = txt_otr_x_cob_m.Text; eo._Otr_Cta_Xpag_Rea_Ace = txt_otr_x_pag_m.Text; eo._Dscto_Comis_Rea = txt_dscto_comis_m.Text; eo._Estado = "A"; eo._Usu_Reg = Session["username"].ToString(); eo._Tip_Comprobante = ddl_comprobante.SelectedItem.Value; bOperacionVC bo = new bOperacionVC(); Int32 resp = bo.SetGuardarOperacionManual(eo); if (resp != 0) { MessageBox("Operación Guardada Correctamente"); } }
public static object GetSelectOperacion(int jtStartIndex, int jtPageSize, string jtSorting, String[] dataFrm) { int indexPage; int totalRow; if (jtStartIndex != 0) { indexPage = jtStartIndex / jtPageSize; } else { indexPage = jtStartIndex; } eOperacionVC eo = frmConsultaOperaciones.SetParametros(dataFrm); bOperacionVC bo = new bOperacionVC(); List<eOperacionVC> list = bo.GetSelectOperacion(eo, indexPage, jtPageSize, jtSorting.Substring(1), out totalRow); return new { Result = "OK", Records = list, TotalRecordCount = totalRow }; }
private void SetValidarCierreXTipoRegistro(String tiporegistro,Int32 mes_actual,Int32 mes_anterior,Int32 mes_x_trimestre) { int registro_procesado, registro_creado; String monto_acumulado; Int32 resp = 0; eOperacionVC ope = new eOperacionVC(); ope._Ide_Contrato = ddl_contrato_o.SelectedItem.Value; ope._Tip_Operacion = ddl_tipinfo.SelectedItem.Value; ope._Tipo_Registro = ddl_tipo_registro.SelectedItem.Value; ope._Ano_Operacion = anio_vigente; ope._Mes_Operacion = mes_vigente.ToString(); ope._Formato_Moneda = formato_moneda; ope._Des_Reg_Mes = "OPERACION " + ope._Tipo_Registro + " (" + ope._Tip_Operacion + ")"; ope._Usu_Reg = Session["username"].ToString(); if (/*existe_mes_anterior > 0 &&mes_actual == 0 &&*/ ope._Tipo_Registro.ToUpper() == "MEN") { bOperacionVC bo = new bOperacionVC(); if (ope._Tip_Operacion == "RP") { resp = bo.SetProcesaPago(ope); } else if (ope._Tip_Operacion == "RI") { resp = bo.SetProcesaIbnr(ope); } else if (ope._Tip_Operacion == "RR") { resp = bo.SetProcesoRsp(ope); } else { resp = bo.SetProcesaPrima(ope); } if (resp != 0) { String[] tabla = {"1","NO"}; bOperacionSelectVC bos = new bOperacionSelectVC(); bos.GetSelectTotalOperacion(ope, tabla, out registro_procesado, out registro_creado, out monto_acumulado); lbl_regprocesado.Text = registro_procesado.ToString(); lbl_opecreada.Text = registro_creado.ToString(); lbl_totimporte.Text = monto_acumulado.ToString(); MessageBox(registro_creado + " Registros Creados"); } else { MessageBox("Aviso => No hay registros y/o ya fueron procesados verifique."); } } else if (mes_actual == 0 && mes_x_trimestre == 0 && ope._Tipo_Registro.ToUpper() == "TRI") { bOperacionVC bo = new bOperacionVC(); if (ope._Tip_Operacion == "RP") { resp = bo.SetProcesaPago(ope); } else if (ope._Tip_Operacion == "RI") { resp = bo.SetProcesaIbnr(ope); } else if (ope._Tip_Operacion == "RR") { resp = bo.SetProcesoRsp(ope); } else { resp = bo.SetProcesaPrima(ope); } if (resp != 0) { String[] tabla = { "2", "C"+ddl_tipinfo.SelectedItem.Value.Substring(1)}; bOperacionSelectVC bos = new bOperacionSelectVC(); bos.GetSelectTotalOperacion(ope, tabla, out registro_procesado, out registro_creado, out monto_acumulado); lbl_regprocesado.Text = registro_procesado.ToString(); lbl_opecreada.Text = registro_creado.ToString(); lbl_totimporte.Text = monto_acumulado.ToString(); MessageBox(registro_creado + " Registros Creados"); } else { MessageBox("Aviso => No hay registros y/o ya fueron procesados verifique."); } } else { MessageBox("El Tipo de Operación "+ddl_tipinfo.SelectedItem.Value+" ya fue Procesado"); } }