Exemplo n.º 1
0
        public void Set(Empleado model)
        {
            var parameters = new SqlParameter[] {
                new SqlParameter("@NOMBRE", model.Nombre),
                new SqlParameter("@APELLIDOS", model.Apellidos),
                new SqlParameter("@CEDULA", model.Cedula),
                new SqlParameter("@FECHA_NACIMIENTO", model.Fecha_Nacimiento),
                new SqlParameter("@DIRECCION", model.Direccion),
                new SqlParameter("@TELEFONO", model.Telefono),
                new SqlParameter("@CELULAR", model.Celular),
                Param_With_Type("@CARGO_ID", SqlDbType.Int, model.Cargo_Id),
                new SqlParameter("@ID_SUPERVISOR", model.Id_Supervisor),
                new SqlParameter("@FECHA_SALIDA", model.Fecha_Salida),
                new SqlParameter("@FECHA_INGRESO", model.Fecha_Ingreso)
            };

            Execute(@"SET_EMPLOYEE @NOMBRE,@APELLIDOS,@CEDULA,@FECHA_NACIMIENTO,@DIRECCION, @TELEFONO,@CELULAR, @CARGO_ID, @ID_SUPERVISOR, @FECHA_SALIDA, @FECHA_INGRESO", parameters);

            if (Error_Message != null && Error_Message.Trim() != "")
            {
                throw new Exception(Error_Message);
            }
            else
            {
                UsuarioManager user = new UsuarioManager();
                if (model.User.Cedula == null)
                {
                    model.User.Cedula = model.Cedula;
                }

                user.Set(model.User);
            }
        }
Exemplo n.º 2
0
        public string DocumentParseWithVariables(int solicitud_id, int prestamo_id, string cedula, int document_id)
        {
            string resultHtml = "";
            var    parameters = new SqlParameter[] {
                new SqlParameter("@solicitud_id", solicitud_id),
                new SqlParameter("@prestamo_id", prestamo_id),
                new SqlParameter("@cedula", cedula),
                new SqlParameter("@document_id", document_id)
            };
            var result = Get(@"SET_SYSTEM_VARIABLES @solicitud_id,@prestamo_id,@cedula,@document_id", parameters);

            if (Error_Message != null && Error_Message.Trim() != "")
            {
                throw new Exception(Error_Message);
            }
            else
            {
                Document cargo = new Document();
                if (result.Count > 0)
                {
                    cargo = result[0];
                }
                resultHtml = cargo.Documento;
            }
            return(resultHtml);
        }
Exemplo n.º 3
0
        public void Del(Document model)
        {
            var parameters = new SqlParameter[] {
                new SqlParameter("@ID", model.Id)
            };

            Execute(@"del_document_by @ID", parameters);

            if (Error_Message != null && Error_Message.Trim() != "")
            {
                throw new Exception(Error_Message);
            }
        }
Exemplo n.º 4
0
        public void Del(Cargo model)
        {
            var parameters = new SqlParameter[] {
                new SqlParameter("@ID_CARGO", model.Id_Cargo)
            };

            Execute(@"DEL_CARGOS @ID_CARGO", parameters);

            if (Error_Message != null && Error_Message.Trim() != "")
            {
                throw new Exception(Error_Message);
            }
        }
Exemplo n.º 5
0
        public void Del(Referencias_Tipos model)
        {
            var parameters = new SqlParameter[] {
                new SqlParameter("@TIPO_REFERENCIA_ID", model.Tipo_Referencia_Id)
            };

            Execute(@"DEL_CARGOS @TIPO_REFERENCIA_ID", parameters);

            if (Error_Message != null && Error_Message.Trim() != "")
            {
                throw new Exception(Error_Message);
            }
        }
Exemplo n.º 6
0
        public void Set(Referencias_Tipos model)
        {
            var parameters = new SqlParameter[] {
                new SqlParameter("@TIPO_REFERENCIA_ID", model.Tipo_Referencia_Id),
                new SqlParameter("@TIPO_REFERENCIA_DESC", model.Tipo_Referencia_Desc),
                new SqlParameter("@TIPO_REFERENCIA_PERSONAL", model.Tipo_Referencia_Personal)
            };

            Execute(@"SET_REFERENCIAS_TIPOS_BY @TIPO_REFERENCIA_ID,@TIPO_REFERENCIA_DESC,@TIPO_REFERENCIA_PERSONAL", parameters);

            if (Error_Message != null && Error_Message.Trim() != "")
            {
                throw new Exception(Error_Message);
            }
        }
Exemplo n.º 7
0
        public void Set(int role_id, int modulo_id, int isSelected)
        {
            var parameters = new SqlParameter[] {
                new SqlParameter("@ID_ROL", role_id),
                new SqlParameter("@ID_MODULO", modulo_id),
                new SqlParameter("@SELECTED", isSelected)
            };

            Execute(@"SET_MODULOS_ROLES @ID_ROL,@ID_MODULO, @SELECTED", parameters);

            if (Error_Message != null && Error_Message.Trim() != "")
            {
                throw new Exception(Error_Message);
            }
        }
Exemplo n.º 8
0
        public void Set(Bancos model)
        {
            var parameters = new SqlParameter[] {
                new SqlParameter("@ID_BANCOS", model.Id_Bancos),
                new SqlParameter("@NOMBRE_BANCO", model.Nombre_Banco),
                new SqlParameter("@WEB_BANCO", model.Web_Banco),
                new SqlParameter("@WEB_INT_BANKING", model.Web_Int_Banking)
            };

            Execute(@"SET_BANCOS @ID_BANCOS,@NOMBRE_BANCO,@WEB_BANCO,@WEB_INT_BANKING", parameters);

            if (Error_Message != null && Error_Message.Trim() != "")
            {
                throw new Exception(Error_Message);
            }
        }
Exemplo n.º 9
0
        public void Set(Transaction model)
        {
            var parameters = new SqlParameter[] {
                new SqlParameter("@tipo_transaccion_id", model.Tipo_Transaccion_Id),
                new SqlParameter("@tipo_transaccion_desc", model.Tipo_Transaccion_Desc),
                new SqlParameter("@tipo_pago_capital", model.Tipo_Pago_Capital),
                new SqlParameter("@tipo_capital", model.Tipo_Capital)
            };

            Execute(@"SET_tipo_transaccion @tipo_transaccion_id,@tipo_transaccion_desc,@tipo_pago_capital,@tipo_capital", parameters);

            if (Error_Message != null && Error_Message.Trim() != "")
            {
                throw new Exception(Error_Message);
            }
        }
Exemplo n.º 10
0
        public void Set(Document model)
        {
            var parameters = new SqlParameter[] {
                new SqlParameter("@id", model.Id),
                new SqlParameter("@flujo_id", model.Flujo_Id),
                new SqlParameter("@nombre_documento", model.Nombre_Documento),
                new SqlParameter("@documento", model.Documento),
                new SqlParameter("@activo", model.Activo)
            };

            Execute(@"Set_document @id,@flujo_id,@nombre_documento,@documento, @activo", parameters);

            if (Error_Message != null && Error_Message.Trim() != "")
            {
                throw new Exception(Error_Message);
            }
        }
Exemplo n.º 11
0
        public void Set(Cargo model)
        {
            var parameters = new SqlParameter[] {
                new SqlParameter("@ID_CARGO", model.Id_Cargo),
                new SqlParameter("@NOMBRE", model.Nombre),
                new SqlParameter("@ESGERENCIAL", model.EsGerencial),
                new SqlParameter("@ESACCIONISTA", model.EsAccionista),
                new SqlParameter("@ACTIVO", model.Activo)
            };

            Execute(@"SET_CARGOS @ID_CARGO,@NOMBRE,@ESGERENCIAL,@ESACCIONISTA, @ACTIVO", parameters);

            if (Error_Message != null && Error_Message.Trim() != "")
            {
                throw new Exception(Error_Message);
            }
        }
Exemplo n.º 12
0
        public void Set(Referencias_Personales model)
        {
            var parameters = new SqlParameter[] {
                new SqlParameter("@NOMBRE", model.Nombre),
                new SqlParameter("@APELLIDO", model.Apellido),
                new SqlParameter("@TELEFONO", model.Telefono),
                new SqlParameter("@TIPO_REFERENCIA_ID", model.Tipo_Referencia_Id),
                new SqlParameter("@version_no", model.Version_No),
                new SqlParameter("@CEDULA", model.Cedula)
            };

            Execute(@"SET_REFERENCIAS_PERSONALES @NOMBRE,@APELLIDO,@TELEFONO, @TIPO_REFERENCIA_ID,@version_no,@CEDULA", parameters);

            if (Error_Message != null && Error_Message.Trim() != "")
            {
                throw new Exception(Error_Message);
            }
        }
Exemplo n.º 13
0
        public void Set(Usuarios model)
        {
            var parameters = new SqlParameter[] {
                new SqlParameter("@USUARIO", model.Usuario),
                new SqlParameter("@CLAVE", model.Clave),
                new SqlParameter("@CEDULA", model.Cedula),
                new SqlParameter("@ID_ROL", model.Id_Rol),
                new SqlParameter("@email", model.Email)
            };
            var result = Get(@"Set_usuario @USUARIO,@CLAVE,@CEDULA,@ID_ROL,@email", parameters);

            if (result != null && result.Count > 0 && result[0].errorMessage.Trim() != "")
            {
                Error_Message = result[0].errorMessage;
            }
            if (Error_Message != null && Error_Message.Trim() != "")
            {
                throw new Exception(Error_Message);
            }
        }
Exemplo n.º 14
0
        public Solicitud Set(Solicitud model)
        {
            var parameters = new SqlParameter[] {
                new SqlParameter("@PERIODICIDAD_ID", model.Periodicidad_Id),
                new SqlParameter("@DIA_PAGO", model.Dia_Pago),
                new SqlParameter("@CEDULA", model.Cedula),
                new SqlParameter("@INGRESOS_SOLICITANTE", model.Ingresos_Solicitante),
                new SqlParameter("@COPIA_CEDULA", model.Copia_Cedula),
                new SqlParameter("@TARJETA_COBRO", model.Tarjeta_Cobro),
                new SqlParameter("@ID_BANCOS", model.Id_Banco),
                new SqlParameter("@USUARIO_INT_BANKING", model.Usuario_Int_Banking),
                new SqlParameter("@CLAVE_INT_BANKING", model.Clave_Int_Banking),
                new SqlParameter("@ID_SOLICITUD", model.Id_Solicitud),
                new SqlParameter("@STATUS_ID", model.Status_Id),
                new SqlParameter("@PLAZO", model.Plazo),
                new SqlParameter("@MONTO_PRESTAMO", model.Monto_Prestamo),
                new SqlParameter("@CREATE_BY", model.Create_By),
                new SqlParameter("@interes", model.Interes),
                new SqlParameter("@comentario", model.Comentario),
                new SqlParameter("@comentario_credito", model.Comentario_Credito),
                new SqlParameter("@accionista", model.Accionista),
                new SqlParameter("@cobrador", model.Cobrador)
            };
            var result = Get(@"SET_SOLICITUD @PERIODICIDAD_ID,@DIA_PAGO,@CEDULA,@INGRESOS_SOLICITANTE, @COPIA_CEDULA,@TARJETA_COBRO,@ID_BANCOS,@USUARIO_INT_BANKING,@CLAVE_INT_BANKING,@ID_SOLICITUD,@STATUS_ID,@PLAZO,@MONTO_PRESTAMO, @CREATE_BY,@interes,@comentario,@comentario_credito,@accionista,@cobrador", parameters);

            if (result != null && result.Count > 0 && result[0].errorMessage.Trim() != "")
            {
                Error_Message = result[0].errorMessage;
            }
            if (Error_Message != null && Error_Message.Trim() != "")
            {
                throw new Exception(Error_Message);
            }
            Solicitud cargo = new Solicitud();

            if (result.Count > 0)
            {
                cargo = result[0];
            }
            return(cargo);
        }
Exemplo n.º 15
0
        public Usuarios GetUserByUserName(string Usuario)
        {
            var parameters = new SqlParameter[] {
                new SqlParameter("@USUARIO", Usuario)
            };
            var result = Get(@"get_usuario_by_User @USUARIO", parameters);

            if (Error_Message != null && Error_Message.Trim() != "")
            {
                throw new Exception(Error_Message);
            }
            else
            {
                Usuarios cargo = new Usuarios();
                if (result.Count > 0)
                {
                    cargo = result[0];
                }
                return(cargo);
            }
        }
Exemplo n.º 16
0
        public void Set(Solicitante model)
        {
            var parameters = new SqlParameter[] {
                new SqlParameter("@CEDULA", model.Cedula),
                new SqlParameter("@NOMBRE", model.Nombre),
                new SqlParameter("@APELLIDOS", model.Apellidos),
                new SqlParameter("@DIRECCION", model.Direccion),
                new SqlParameter("@SECTOR", model.Sector),
                new SqlParameter("@TELEFONO", model.Telefono),
                new SqlParameter("@CELULAR", model.Celular),
                new SqlParameter("@EMAIL", model.Email),
                new SqlParameter("@OPCIONAL", ((model.Opcional == null)?"":model.Opcional)),
                new SqlParameter("@copiaCedula", ((model.CopiaCedula == null)?"":model.CopiaCedula))
            };

            Execute(@"SET_SOLICITANTE @CEDULA,@NOMBRE,@APELLIDOS,@DIRECCION, @SECTOR,@TELEFONO,@CELULAR,@EMAIL,@OPCIONAL, @copiaCedula", parameters);

            if (Error_Message != null && Error_Message.Trim() != "")
            {
                throw new Exception(Error_Message);
            }
        }
Exemplo n.º 17
0
        public Usuarios AuthorizationRoutes(string Usuario, string Controller, string Action)
        {
            var parameters = new SqlParameter[] {
                new SqlParameter("@USUARIO", Usuario),
                new SqlParameter("@CONTROLLER", Controller),
                new SqlParameter("@ACTION", Action)
            };
            var result = Get(@"USER_AUTH_ROUTES @USUARIO,@CONTROLLER,@ACTION", parameters);

            if (Error_Message != null && Error_Message.Trim() != "")
            {
                throw new Exception(Error_Message);
            }
            else
            {
                Usuarios cargo = new Usuarios();
                if (result.Count > 0)
                {
                    cargo = result[0];
                }
                return(cargo);
            }
        }
Exemplo n.º 18
0
        public Prestamos Set(int solicitud_id, string updateBy)
        {
            var parameters = new SqlParameter[] {
                new SqlParameter("@id_solicitud", solicitud_id),
                new SqlParameter("@CREATE_BY", updateBy)
            };
            var result = Get(@"SET_prestamos @id_solicitud,@CREATE_BY", parameters);

            if (result != null && result.Count > 0 && result[0].errorMessage.Trim() != "")
            {
                Error_Message = result[0].errorMessage;
            }
            if (Error_Message != null && Error_Message.Trim() != "")
            {
                throw new Exception(Error_Message);
            }
            Prestamos cargo = new Prestamos();

            if (result.Count > 0)
            {
                cargo = result[0];
            }
            return(cargo);
        }
Exemplo n.º 19
0
        public void Set(Fuente_Ingreso model)
        {
            var parameters = new SqlParameter[] {
                new SqlParameter("@CEDULA", model.Cedula),
                new SqlParameter("@DIRECCION", model.Direccion),
                new SqlParameter("@CARGO", model.Cargo),
                new SqlParameter("@TELEFONO", model.telefono),
                new SqlParameter("@FLOTA", model.flota),
                new SqlParameter("@FECHA_INGRESO", model.Fecha_Ingreso),
                new SqlParameter("@SUELDO_ACTUAL", model.Sueldo_Actual),
                new SqlParameter("@ID_BANCOS", model.ID_Banco),
                new SqlParameter("@TIENE_INT_BANKING", model.Tiene_Int_Banking),
                new SqlParameter("@USUARIO", model.Usuario),
                new SqlParameter("@CLAVE", model.Clave),
                new SqlParameter("@Nombre_Trabajo", model.Nombre_Trabajo)
            };

            Execute(@"SET_FUENTE_INGRESOS @CEDULA,@DIRECCION,@CARGO,@TELEFONO, @FLOTA,@FECHA_INGRESO,@SUELDO_ACTUAL,@ID_BANCOS,@TIENE_INT_BANKING,@USUARIO,@CLAVE,@Nombre_Trabajo", parameters);

            if (Error_Message != null && Error_Message.Trim() != "")
            {
                throw new Exception(Error_Message);
            }
        }
Exemplo n.º 20
0
        private void ConfigEquipment()
        {
            RefreshString    refreshLabel     = new RefreshString(RefreshInterfaceLabelShow);
            RefreshString    refreshRichBox   = new RefreshString(RefreshInterfaceRichBox);
            RefreshDataTable refreshDataTable = new RefreshDataTable(RefreshDataGridView);
            EnaButton        enaButton        = new EnaButton(ControlButton);
            SetCorlor        SetButtonColor   = new SetCorlor(setCorlor);

            // MyEquipmentArrayy.MyEquipList
            DutStruct[]    MyDutManufactureCoefficientsStructArray;
            DriverStruct[] MyManufactureChipsetStructArray;
            int            i = 0;

            try
            {
                //if (MyEquipmentArrayy!= null)
                //{
                //    MyEquipmentArrayy.MyEquipList.Clear();
                //}
                pflowControl.pDut                       = (DUT)MyEquipmentManage.Createobject(pflowControl.ProductionTypeName.ToUpper() + "DUT");
                pflowControl.pDut.deviceIndex           = 0;
                MyDutManufactureCoefficientsStructArray = pflowControl.GetDutManufactureCoefficients();
                MyManufactureChipsetStructArray         = pflowControl.GetManufactureChipsetControl();

                pflowControl.pDut.Initialize(MyDutManufactureCoefficientsStructArray, MyManufactureChipsetStructArray, pflowControl.StrAuxAttribles);


                //------------------

                for (i = 0; i < EquipmenNameArray.Count; i++)
                {
                    TestModeEquipmentParameters[] CurrentEquipmentStruct = pflowControl.GetCurrentEquipmentInf(EquipmenNameArray.Values[i].ToString());
                    string[] List = EquipmenNameArray.Keys[i].ToString().Split('_');
                    string   CurrentEquipmentName = List[0];
                    string   CurrentEquipmentID   = List[1];
                    string   CurrentEquipmentType = List[2];

                    MyEquipmentArrayy.Add(EquipmenNameArray.Keys[i].ToString(), (EquipmentBase)MyEquipmentManage.Createobject(CurrentEquipmentName));

                    if
                    (!MyEquipmentArrayy.MyEquipList[EquipmenNameArray.Keys[i].ToString()].Initialize(CurrentEquipmentStruct))
                    {
                        MessageBox.Show(EquipmenNameArray.Keys[i].ToString() + "Initialize Error");
                        FlagEquipmentConfigOK = false;
                        Error_Message ex = new Error_Message(EquipmenNameArray.Keys[i].ToString() + "Initialize Error");
                        throw ex;
                    }

                    if (!MyEquipmentArrayy.MyEquipList[EquipmenNameArray.Keys[i].ToString()].Configure())
                    {
                        MessageBox.Show(EquipmenNameArray.Keys[i].ToString() + "Configure Error");
                        FlagEquipmentConfigOK = false;

                        Error_Message ex = new Error_Message(EquipmenNameArray.Keys[i].ToString() + "Configure Error");
                        throw ex;
                    }
                }
                pflowControl.pEnvironmentcontroll = new EnvironmentalControll(pflowControl.pDut);
                FlagEquipmentConfigOK             = true;
                pflowControl.MyEquipList          = MyEquipmentArrayy.MyEquipList;
            }
            catch (Exception EX)
            {
                MessageBox.Show("ConfigEquipment Error ,PLS Check Equipment");
                MessageBox.Show("ConfigEquipment Error ,PLS Check Equipment");
                this.Invoke(SetButtonColor, Color.Red);
                this.Invoke(refreshLabel, "Equipment Config false");
                FlagEquipmentConfigOK = false;
            }



            if (FlagEquipmentConfigOK)
            {
                MessageBox.Show("ConfigEquipment OK");
                this.Invoke(SetButtonColor, Color.Green);
                this.Invoke(refreshLabel, "Equipment Config OK");
                // this.Invoke(enaButton, true);
                FlagEquipmentConfigOK = true;
            }
            else
            {
            }
            this.Invoke(enaButton, true);
        }
Exemplo n.º 21
0
        private IntPtr Inject_TESV()
        {
            int len         = 5;
            int data_offset = 0x100;

            byte[] bytes_program = { 0x8B, 0xF0, 0x50, 0xB8, 0xA6, 0x00, 0xF1, 0x01, 0x83, 0xC0, 0x50, 0x89, 0x08, 0x8B, 0xC8, 0x83, 0xC1, 0x08, 0x58, 0x89, 0x01, 0x83, 0xC1, 0x08, 0x89, 0x11, 0x83, 0xC1, 0x08, 0x58, 0x89, 0x01, 0x83, 0xC1, 0x08, 0x58, 0x89, 0x01, 0x58, 0x8B, 0xD0, 0x50, 0x8B, 0x01, 0x50, 0x83, 0xE9, 0x08, 0x8B, 0x01, 0x50, 0x83, 0xE9, 0x08, 0xFF, 0x31, 0x83, 0xE9, 0x08, 0xFF, 0x31, 0x83, 0xE9, 0x08, 0xFF, 0x31, 0xB8, 0x00, 0x00, 0x40, 0x00, 0x05, 0x3C, 0x06, 0xF1, 0x00, 0x8B, 0x00, 0x83, 0xC0, 0x74, 0x8B, 0x00, 0x83, 0xC0, 0x04, 0x8B, 0x00, 0x05, 0x00, 0x01, 0x00, 0x00, 0x8B, 0x00, 0x83, 0xC0, 0x10, 0x8B, 0x00, 0x83, 0xC0, 0x38, 0x39, 0xC2, 0x0F, 0x85, 0x2C, 0x00, 0x00, 0x00, 0xB8, 0xA6, 0x00, 0xF1, 0x01, 0x05, 0xF0, 0x00, 0x00, 0x00, 0x83, 0xC0, 0x10, 0x39, 0x38, 0x0F, 0x84, 0x0D, 0x00, 0x00, 0x00, 0x83, 0x38, 0x00, 0x0F, 0x84, 0x02, 0x00, 0x00, 0x00, 0xEB, 0xEA, 0x89, 0x38, 0x83, 0xC0, 0x08, 0x8B, 0x18, 0x83, 0xC3, 0x01, 0x89, 0x18, 0x5A, 0x58, 0x58, 0x83, 0xFE, 0x04, 0xE9, 0x00, 0x00, 0x00, 0x00 };

            AOB_Scanner.AOB_Scanner aob_scanner = new AOB_Scanner.AOB_Scanner(memory.process, memory.ProcessHandle, "8B 44 24 04 81 EC 08 01 00 00 53 56 57 8B 38 8B C7 32 DB 8D 50 01 8A 08 40 84 C9 75 F9 2B C2");
            aob_scanner.setModule(memory.process.MainModule);

            IntPtr ptr_inject = (IntPtr)aob_scanner.FindPattern();

            if (ptr_inject == IntPtr.Zero)
            {
                Error_Message?.Invoke(this, new StringArg("Could not inject, did the game load past the main menu?"));
                return(IntPtr.Zero);
            }

            ptr_inject += 0x1f;

            //check if we already injected code
            byte b = memory.ReadByte(ptr_inject);

            if (b == 0xE9)
            {
                Notification_Message?.Invoke(this, new StringArg("Skipping injection (already injected)"));
                return((IntPtr)((long)memory.ReadInt32(ptr_inject + 0x1) + (long)ptr_inject) + 5 + bytes_program.Length + data_offset);
            }


            IntPtr ptr_functon = memory.AllocateMemory(10000);

            IntPtr ptr_data = ptr_functon + 0xA6;

            byte[] bytes = new byte[10000];

            //write program
            Array.Copy(bytes_program, bytes, bytes_program.Length);

            //some parts in the program are static addresses that need to be overwriten
            byte[] bytes_ptr_data = BitConverter.GetBytes((ulong)ptr_data);
            for (int i = 0; i < 4; i++)
            {
                bytes[4 + i] = bytes_ptr_data[i];
            }
            for (int i = 0; i < 4; i++)
            {
                bytes[112 + i] = bytes_ptr_data[i];
            }

            byte[] bytes_ptr_return = BitConverter.GetBytes((ulong)ptr_inject - (ulong)bytes_program.Length + (ulong)len - (ulong)ptr_functon);
            for (int i = 0; i < 4; i++)
            {
                bytes[162 + i] = bytes_ptr_return[i];
            }

            memory.WriteBytes(ptr_functon, bytes);

            memory.Hook(ptr_inject, ptr_functon, len);
            return(ptr_data + 0x100);
        }