Skip to content

Instantly share code, notes, and snippets.

View jinan-kordab's full-sized avatar

Jinan Kordab jinan-kordab

View GitHub Profile
@jinan-kordab
jinan-kordab / Default.aspx
Created October 16, 2018 01:52
Default ASPX file for ASP.NET solution for Two Way Data Binding
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication8._Default" %>
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
<h1>Two way data binding example</h1>
<table id="tblUsersInfo"style="text-align:center;width: 100%; border: 1px solid #008080">
<tr>
<td style="height: 20px; width:50px;border:1px solid grey">
<input type="text" id="tbUserDayPhone" name="tbUserDayPhone" /></td>
<td style="height: 20px;width:50px;border:1px solid grey">
@jinan-kordab
jinan-kordab / Master.cshtml
Created October 16, 2018 01:50
Master page for ASP.NET solution for Two Way Data Binding
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="WebApplication8.SiteMaster" %>
<!DOCTYPE html>
<html lang="en">
<head runat="server">
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title><%: Page.Title %> - My ASP.NET Application</title>
@jinan-kordab
jinan-kordab / GlobalASAX.cs
Created October 16, 2018 01:37
Two Way DB GLobal ASAX code
protected void Application_BeginRequest()
{
HttpContext.Current.Response.AddHeader("Access-Control-Allow-Origin", "*");
if (HttpContext.Current.Request.HttpMethod == "OPTIONS")
{
//These headers are handling the "pre-flight" OPTIONS call sent by the browser
HttpContext.Current.Response.AddHeader("Access-Control-Allow-Methods", "POST,GET, OPTIONS");
HttpContext.Current.Response.AddHeader("Access-Control-Allow-Headers", "Content-Type, Accept");
HttpContext.Current.Response.AddHeader("Access-Control-Max-Age", "1728000");
HttpContext.Current.Response.End();
@jinan-kordab
jinan-kordab / CreateUserInfoTable.sql
Created October 16, 2018 01:36
Two Way DB Create User Info Table
USE [TwoWayDataBinding]
GO
/****** Object: Table [dbo].[UserInfo] Script Date: 2018-02-20 22:34:37 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[UserInfo](
[UserDayPhone] [nvarchar](50) NULL,
[UserStreet] [nvarchar](max) NULL,
@jinan-kordab
jinan-kordab / ValuesControllerWEBAPIHTTPTwoWay.cs
Created October 16, 2018 01:33
Values controller for Two Way Data Binding WEB API HTTP
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace TwoWayDBREST.Controllers
@jinan-kordab
jinan-kordab / ProductBoxingDetailsColumns.sql
Created October 13, 2018 16:33
WH01 Product Boxing Details Columns
productBoxingDetailsID bigint
shipmentProductDetailsID bigint
numberOfBoxes bigint
numberOfPacks bigint
numberOfProducts bigint
numberOfProductsPerPack bigint
numberOfPacksPerBox bigint
@jinan-kordab
jinan-kordab / ShipmentProductDetailColumns.sql
Created October 13, 2018 16:32
WH01 Shipment Product Detail columns
shipmentProductDetailsID bigint
shipmentDetailsID bigint
productID bigint
@jinan-kordab
jinan-kordab / PriductDescriptionDetail.sql
Created October 13, 2018 16:31
WH01 Product Description Detail columns
productDescriptionDetailsID bigint
productDescriptionID bigint
productColor nvarchar(MAX)
productWeight nvarchar(MAX)
productSize nvarchar(MAX)
productPrice nvarchar(MAX)
@jinan-kordab
jinan-kordab / ProductDescriptionColumns.sql
Created October 13, 2018 16:30
WH01 Product Description Columns
productDescriptionID bigint
productID bigint
productDescLong nvarchar(MAX)
prodctCopied bit
@jinan-kordab
jinan-kordab / ProductTableColumns.sql
Created October 13, 2018 16:29
WH01 Product Table Columns
productID bigint
productName nvarchar(MAX)
productSerialNumber nvarchar(MAX)