Skip to main content

Posts

Intigrate POS Printer in asp.net core 6. Web Project

There are two methods to call POS printer to print PrintGuestCheck PayBill_Print using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; using System.Linq; using System.Security.Claims; using System.Threading.Tasks; using Tawoon.IT_SoftwareTemplate.BusinnessModels.BaseVM.Dashboard; using Tawoon.IT_SoftwareTemplate.BusinnessModels.Enum; using Tawoon.IT_SoftwareTemplate.Entities; using Tawoon.IT_SoftwareTemplate.Entities.Models; using System.IO; using System.Drawing.Printing; using System.Drawing; using System.Net.Sockets; using System.Text; using Microsoft.AspNetCore.Hosting; using Tawoon.IT_SoftwareTemplate.BusinnessModels.BaseVM; using Microsoft.Extensions.Options; using Tawoon.IT_SoftwareTemplate.Helper; using Microsoft.AspNetCore.Http; using System.Drawing.Imaging; namespace Tawoon.IT_SoftwareTemplate.Controllers { public class Dashboard...
Recent posts

Linux server setup

   New Linux server Config ------------------------------ 1. mongod 2. redis 3. nginx 4. postgresql 5. docker 6. rabbitMQ 7. ssh 8. kuberneies 9. Jenkins 10. HAproxy  11. Github 12. NVM 13. npm  Server Restart Check list ------------------------------ 1. mongod 2. redis 3. nginx 4. postgresql 5.docker 6. rabbitMQ 7. ssh Note: sudo systemctl status nginx Microservice Deployment Check list --------------------------------------- 1. change port in .env 2. change port in dockerfile 3. change port in docker-compose.yml file 4.  make sure using the right port when you  run docker -d -p 0000:0000 iamgeName

Object Storage System Design

Object Storage System Design 𝐁𝐮𝐜𝐤𝐞𝐭. A logical container for objects. The bucket name is globally unique. To upload data to S3, we must first create a bucket. 𝐎𝐛𝐣𝐞𝐜𝐭. An object is an individual piece of data we store in a bucket. It contains object data (also called payload) and metadata. Object data can be any sequence of bytes we want to store. The metadata is a set of name-value pairs that describe the object. In S3, an object resides in a bucket. The path looks like this: /bucket-to-share/style.css. The bucket only has metadata. The object has metadata and the actual data. The diagram below (Figure 1) illustrates how file uploading works. In this example, we first create a bucket named and then upload a file named “style.css” to the bucket. 1. The client sends an HTTP PUT request to create a bucket named “bucket-to-share.” The request is forwarded to the API service. 2. The API service calls Identity and Access Management (IAM) to ensure the user is authorized and has W...

Setup Jenkins in Linux server

    set up a global credential  create pipeline     configure build steps   pipeline{     agent any     tools {nodejs "NodeJS"}     stages {         stage('Clone Repository'){             steps{                 git branch: 'test',                 credentialsId: 'LP_DEV_SERVER',                 url: 'git@github.com:littlesprogrammers/Freelaneer_Backend_Microservice_Shared_User.git'             }         }                  stage('Install Dependencies'){             steps {                 sh 'npm install'             }         }       ...

Debug Entity Validation Exception C#

      Try this try and cath. put your SaveChanges() method inside the try block.             try             {                 db.tbl_Payroll_full_day_leaves.Add(tbl_Payroll_Leaves);                 if (0 < db.SaveChanges())                 {                     return true;                 }                 else                 {                     return false;                 }             }             catch (DbEntityValidationException e)       ...

Multi-tenancy part 1: Strategy.

I want my eCommerce application  Suteki Shop  to be able to flexibly meet the requirements of any customer (within reason). How can we have a single product but enable our customers to have diverse implementations? I think the solution depends on the level of diversity and the number of customers. The right solution for a product with thousands of customers with little customization is different from a solution for a handful of customers with very diverse requirements. There are several axes of change to consider: Codebase. Do I have one codebase, or do I maintain a separate codebase for each customer? Application instance. Do I have one application instance to service all my customers, or does each customer have a separate one? Database schemas. Do I have one database schema, or do I have a different schema for each customer? Database instances. Do I have one database instance or separate ones for each customer? Lots of customers, a little customization Let's co...

Reading HTML Table data using JavaScript and send to backend

Javar Script **************** //records_table var  Products  =   []; var  table ; table  =  document . getElementById ( "records_table" ); // Loop through each row and get ItemCode and Qty. for   ( var  r  =   0 ;  r  <  table . rows . length ;  r ++) { // This takes qty from Imput Field var  qty  =  table . rows [ r ]. cells [ 3 ]. getElementsByTagName ( 'input' )[ 0 ]. value ; // This takes text field data var  itemCode  =  table . rows [ r ]. cells [ 1 ]. innerHTML ; // Push the data to the Product array Products . push ({  ItemCode :  itemCode ,  Qty :  qty  }); } jQuery . ajax ({ type : ...