Esempio n. 1
0
        public static object ContratoDetalleList(int jtStartIndex, int jtPageSize, string jtSorting, String WhereBy)
        {
            int total;
            int indexPage;
            if (jtStartIndex != 0)
            {
                indexPage = jtStartIndex / jtPageSize;
            }
            else
            {
                indexPage = jtStartIndex;
            }
            eContratoDetalleVC o = new eContratoDetalleVC();
            o._inicio = indexPage;
            o._fin = jtPageSize;
            o._orderby = jtSorting.Substring(1).ToUpper();
            o._nro_Contrato = WhereBy.Trim();

            bContratoDetalleVC tb = new bContratoDetalleVC();
            List<eContratoDetalleVC> list = tb.GetSelecionarContratoDetalle(o,out total);
            return new { Result = "OK", Records = list, TotalRecordCount = total };
        }
Esempio n. 2
0
 public void SetEliminarParamentro(String tabla, String indice)
 {
     try
     {
         if (tabla.Equals("CONTRATO") && indice != "0")
         {
             bContratoVC bc = new bContratoVC();
             Int32 resp = bc.SetEliminarContrato(Int32.Parse(indice));
             if (resp != 0)
             {
                 MessageBox(resp + "Registro Eliminado Correctamente!");
                 SetLLenadoContrato();
             }
             else
             {
                 MessageBox("Ocurrio un Error en el Servidor!");
             }
         }
         else if (tabla.Equals("CONTRATO_DETALLE") && indice != "0")
         {
             bContratoDetalleVC bcd = new bContratoDetalleVC();
             Int32 resp = bcd.SetEliminarContratoDetalle(Int32.Parse(indice));
             if (resp != 0)
             {
                 MessageBox(resp + "Registro Eliminado Correctamente!");
             }
             else
             {
                 MessageBox("Ocurrio un Error en el Servidor!");
             }
         }
     }
     catch (Exception) {
         MessageBoxcCatch("ERROR => Selecione un Registro");
     }
 }
Esempio n. 3
0
        //funcion de insertar  reaseguradores
        private void SetInsertarActualizarContratoDetalle()
        {
            try
            {
                Int32 resp = 0;
                eContratoDetalleVC d = new eContratoDetalleVC();
                d._ide_Contrato_Det = Convert.ToInt32(txt_idContratoDetalle_c.Value);
                d._id_Empresa = Convert.ToInt32(Session["idempresa"]);
                d._nro_Contrato = ddl_contrato_r.SelectedItem.Value;
                d._ide_Reasegurador = ddl_reasegurador_r.SelectedItem.Value;
                d._cod_Reasegurador = ddl_reasegurador_r.SelectedItem.Value;
                d._cod_Empresa_Califica = ddl_calificadora_r.SelectedItem.Value;
                d._cal_Crediticia = ddl_crediticia_r.SelectedItem.Value;
                d._mod_Contrato = ddl_tipcont_det_r.SelectedItem.Value;
                d._prc_Retencion = Convert.ToDecimal(txt_retencion_r.Text);
                d._prc_Cesion = Convert.ToDecimal(txt_cesion_r.Text);
                d._prc_participacion_rea = Convert.ToDecimal(txt_participacion_cesion.Text);
                d._nombre_Rea = txt_nombre_rea.Text;
                d._nro_Registro_Rea = Convert.ToInt32(txt_nro_registro_rea.Text);
                d._estado = "A";
                d._usu_reg = Session["username"].ToString();
                d._usu_mod = Session["username"].ToString();

                bContratoDetalleVC icd = new bContratoDetalleVC();
                if(d._ide_Contrato_Det == 0){
                    resp = icd.SetInsertarContratoDetalle(d);
                    if (resp != 0)
                    {
                        MessageBox("Registro Grabado Correctamente!");
                    }
                    else
                    {
                        MessageBox("Ocurrio un Error en el Servidor!");
                    }
                }
                else
                {
                    resp = icd.SetActualizarContratoDetalle(d);
                    if (resp != 0)
                    {
                        MessageBox("Registro Actualizado Correctamente");
                    }
                    else {
                        MessageBox("Ocurrio un Error en el Servidor!");
                    }
                }
            }
            catch (Exception e) {
                MessageBoxcCatch("ERROR =>" + e.Message);
            }
        }