text
stringlengths
13
6.01M
using System.Collections; using System.Collections.Generic; using UnityEngine; public enum Stats { HP, SP, HPRegen, SPRegen, Attack, Defense, Card, Number, CritChance, CritDamage, Evasion } [System.Serializable] public class Statistics { [SerializeField, Header("Base Stats")] float maxHP; [SerializeField] float maxSP, hpRegen, spRegen, atk = 0, def = 0, card = 3, number = 3, critChance, critDmg = 150, evade; [SerializeField, Header("Stat Growth")] float maxHPGrowth; [SerializeField] float maxSPGrowth, hpRegenGrowth, spRegenGrowth, atkGrowth, defGrowth, cardGrowth, numberGrowth, critChanceGrowth, CritDmgGrowth, evadeGrowth; internal List<StatBonus> bonuses = new List<StatBonus>(); public float MaxHP { get { float add = 0; foreach (var b in bonuses) add += b.value[0]; return Mathf.Max(Mathf.Floor(maxHP + add), 0); } } public float MaxSP { get { float add = 0; foreach (var b in bonuses) add += b.value[1]; return Mathf.Floor(maxSP + add); } } public float HPRegen { get { float add = 0; foreach (var b in bonuses) add += b.value[2]; return hpRegen + add; } } public float SPRegen { get { float add = 0; foreach (var b in bonuses) add += b.value[3]; return spRegen + add; } } public float Attack { get { float add = 0; foreach (var b in bonuses) add += b.value[4]; return Mathf.Floor(atk + add); } } public float Defense { get { float add = 0; foreach (var b in bonuses) add += b.value[5]; return Mathf.Floor(def + add); } } public float Card { get { float add = 0; foreach (var b in bonuses) add += b.value[6]; return Mathf.Floor(card + add); } } public float Number { get { float add = 0; foreach (var b in bonuses) add += b.value[7]; return Mathf.Floor(number + add); } } public float CritChance { get { float add = 0; foreach (var b in bonuses) add += b.value[8]; return Mathf.Floor(critChance + add); } } public float CritDamage { get { float add = 0; foreach (var b in bonuses) add += b.value[8]; return Mathf.Floor(critDmg + add); } } public float Evasion { get { float add = 0; foreach (var b in bonuses) add += b.value[9]; return Mathf.Floor(evade + add); } } public void SetMax(Statistics max) { maxHP = Mathf.Min(maxHP, max.maxHP); maxSP = Mathf.Min(maxSP, max.maxSP); hpRegen = Mathf.Min(hpRegen, max.hpRegen); spRegen = Mathf.Min(spRegen, max.spRegen); atk = Mathf.Min(atk, max.atk); def = Mathf.Min(def, max.def); card = Mathf.Min(card, max.card); number = Mathf.Min(number, max.number); critChance = Mathf.Min(critChance, max.critChance); critDmg = Mathf.Min(critDmg, max.critDmg); evade = Mathf.Min(evade, max.evade); } internal float[] LevelUp() { maxHP += maxHPGrowth; maxSP += maxSPGrowth; hpRegen += hpRegenGrowth; spRegen += spRegenGrowth; atk += atkGrowth; def += defGrowth; card += cardGrowth; number += numberGrowth; critChance += critChanceGrowth; critDmg += CritDmgGrowth; evade += evadeGrowth; return new float[] { maxHPGrowth, maxSPGrowth }; } } internal class StatBonus { internal enum StatBonusType { EncounterTemporal, Permanent, Burn, Poison, TempleEvent, FuturisticEvent, DiscoveryEvent, AnomalyEvent } public StatBonusType type; public float[] value; public StatBonus(StatBonusType type, float[] value) { this.type = type; this.value = value; } public StatBonus(float[] value) { this.type = StatBonusType.EncounterTemporal; this.value = value; } }
using DocumentsApproval.Commands; using DocumentsApproval.Model; using EventLite.Streams.StreamManager; using System.Threading.Tasks; namespace DocumentsApproval { public class CommandHandler { private readonly IEventStreamReader _eventStreamReader; public CommandHandler(IEventStreamReader eventStreamReader) { _eventStreamReader = eventStreamReader; } public async Task HandleApproveDocument(ApproveDocument command) { var aggregate = await _eventStreamReader.GetAggregate<DocumentAggregate>(command.StreamId); var resultedEvent = aggregate.ApproveDocument(command); await aggregate.Save(resultedEvent); } public async Task HandleCreateDocument(CreateDocument command) { var aggregate = await _eventStreamReader.GetAggregate<DocumentAggregate>(command.StreamId); var resultedEvent = aggregate.CreateDocument(command); await aggregate.Save(resultedEvent); } public async Task HandleDeleteDocument(DeleteDocument command) { var aggregate = await _eventStreamReader.GetAggregate<DocumentAggregate>(command.StreamId); var @event = aggregate.DeleteDocument(command); await aggregate.Save(@event); } public async Task HandleRejectDocument(RejectDocument command) { var aggregate = await _eventStreamReader.GetAggregate<DocumentAggregate>(command.StreamId); var @event = aggregate.RejectDocument(command); await aggregate.Save(@event); } public async Task HandleRenameDocument(RenameDocument command) { var aggregate = await _eventStreamReader.GetAggregate<DocumentAggregate>(command.StreamId); var @event = aggregate.RenameDocument(command); await aggregate.Save(@event); } public async Task HandleUpdateArtifacts(UpdateArtifacts command) { var aggregate = await _eventStreamReader.GetAggregate<DocumentAggregate>(command.StreamId); var @event = aggregate.UpdateArtifacts(command); await aggregate.Save(@event); } } }
using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; using Pe.Stracon.SGC.Infraestructura.Core.QueryContract.Contractual; using Pe.Stracon.SGC.Infraestructura.QueryModel.Contractual; using Pe.Stracon.SGC.Infraestructura.Repository.Base; using Pe.Stracon.Politicas.Aplicacion.TransferObject.Response.General; namespace Pe.Stracon.SGC.Infraestructura.Repository.Query.Contractual { /// <summary> /// Implementación del repositorio de Bienes /// </summary> public class BienLogicRepository : QueryRepository<BienLogic>, IBienLogicRepository { /// <summary> /// Retorna la lista de los bienes. /// </summary> /// <param name="tipoBien">Tipo de bien</param> /// <param name="numeroSerie">número de serie</param> /// <param name="descripcion">descripción de bienes</param> /// <param name="marca">marca del bien</param> /// <param name="modelo">modelo del bien</param> /// <param name="fechaDesde">rango de fecha inicial de adquisición del bien</param> /// <param name="fechaHasta">rango de fecha final de adquisición del bien</param> /// <param name="tipoTarifa">Tipo de tarifa del bien</param> /// <returns>Lista de Bienes</returns> public List<BienLogic> ListaBandejaBien(string codigoIdentificacion, string tipoBien, string numeroSerie, string descripcion, string marca, string modelo, string fechaDesde, string fechaHasta, string tipoTarifa) { SqlParameter[] parametros = new SqlParameter[] { new SqlParameter("CODIGO_IDENTIFICACION",SqlDbType.NVarChar) { Value = (object)codigoIdentificacion ?? DBNull.Value}, new SqlParameter("TIPO_BIEN",SqlDbType.NVarChar) { Value = (object)tipoBien ?? DBNull.Value}, new SqlParameter("NUMERO_SERIE",SqlDbType.NVarChar) { Value = (object)numeroSerie ?? DBNull.Value}, new SqlParameter("DESCRIPCION",SqlDbType.NVarChar) { Value = (object)descripcion ?? DBNull.Value}, new SqlParameter("MARCA",SqlDbType.NVarChar) { Value = (object)marca ?? DBNull.Value}, new SqlParameter("MODELO",SqlDbType.NVarChar) { Value = (object)modelo ?? DBNull.Value}, new SqlParameter("FECHA_DESDE",SqlDbType.NVarChar) { Value = (object)fechaDesde ?? DBNull.Value}, new SqlParameter("FECHA_HASTA",SqlDbType.NVarChar) { Value = (object)fechaHasta ?? DBNull.Value}, new SqlParameter("TIPO_TARIFA",SqlDbType.NVarChar) { Value = (object)tipoTarifa ?? DBNull.Value} }; var result = this.dataBaseProvider.ExecuteStoreProcedure<BienLogic>("CTR.USP_BANDEJA_BIENES", parametros).ToList(); return result; } /// <summary> /// Retorna 1 si transacció nok. /// </summary> /// <param name="codigoBien">código del bien</param> /// <returns>Flag de proceso</returns> public int RegistraHSTBienRegistro(string TipoContenido, string contenido,string userCrea, string TermianlCrea ) { SqlParameter[] parametros = new SqlParameter[] { new SqlParameter("TIPO_CONTENIDO",SqlDbType.NVarChar ) { Value = (object)TipoContenido }, new SqlParameter("CONTENIDO",SqlDbType.NVarChar) { Value = (object)contenido }, new SqlParameter("UserCreacion",SqlDbType.NVarChar) { Value = (object)userCrea }, new SqlParameter("TERMINAL_CREACION",SqlDbType.NVarChar) { Value = (object)TermianlCrea }, }; var result = this.dataBaseProvider.ExecuteStoreProcedure<int>("CTR.USP_BIEN_REGISTRO_INS", parametros).FirstOrDefault(); return result; } /// <summary> /// Retorna la lista del alquiler de bienes. /// </summary> /// <param name="codigoBien">código del bien</param> /// <returns>Lista de alquiler de bienes</returns> public List<BienAlquilerLogic> ListaBienAlquiler(Guid codigoBien) { SqlParameter[] parametros = new SqlParameter[] { new SqlParameter("CODIGO_BIEN",SqlDbType.UniqueIdentifier ) { Value = (object)codigoBien }, }; var result = this.dataBaseProvider.ExecuteStoreProcedure<BienAlquilerLogic>("CTR.USP_BANDEJA_BIENALQUILER_POR_BIEN", parametros).ToList(); return result; } /// <summary> /// Retorna la lista del descripciones de campos del bien. /// </summary> /// <param name="tipoContenido">código del tipo de contenido</param> /// <returns></returns> public List<BienRegistroLogic> ListaBienRegistro(string tipoContenido) { SqlParameter[] parametros = new SqlParameter[] { new SqlParameter("CODIGO_TIPO_CONTENIDO",SqlDbType.Char ) { Value = (object)tipoContenido }, }; var result = this.dataBaseProvider.ExecuteStoreProcedure<BienRegistroLogic>("CTR.USP_CONTENIDO_BIEN_SEL", parametros).ToList(); return result; } /// <summary> /// Retorna la lista de bienes con su descripción completa. /// </summary> /// <param name="descripcion">Descripción del bien</param> /// <returns>Lista de bienes con su descripción completa</returns> public List<BienLogic> ObtenerDescripcionCompletaBien(string descripcion) { SqlParameter[] parametros = new SqlParameter[] { new SqlParameter("DESCRIPCION",SqlDbType.NVarChar) { Value = (object)descripcion ?? DBNull.Value }, }; var result = this.dataBaseProvider.ExecuteStoreProcedure<BienLogic>("CTR.USP_BIEN_DESCRIPCION_COMPLETA_SEL", parametros).ToList(); return result; } } }
namespace Sentry.Tests; public class MeasurementUnitTests { [Fact] public void DefaultEmpty() { MeasurementUnit m = new(); Assert.Equal("", m.ToString()); } [Fact] public void NoneDiffersFromEmpty() { MeasurementUnit m = new(); Assert.NotEqual(MeasurementUnit.None, m); } [Fact] public void CanUseNoneUnit() { var m = MeasurementUnit.None; Assert.Equal("none", m.ToString()); } [Fact] public void CanUseDurationUnits() { MeasurementUnit m = MeasurementUnit.Duration.Second; Assert.Equal("second", m.ToString()); } [Fact] public void CanUseInformationUnits() { MeasurementUnit m = MeasurementUnit.Information.Byte; Assert.Equal("byte", m.ToString()); } [Fact] public void CanUseFractionUnits() { MeasurementUnit m = MeasurementUnit.Fraction.Percent; Assert.Equal("percent", m.ToString()); } [Fact] public void CanUseCustomUnits() { var m = MeasurementUnit.Custom("foo"); Assert.Equal("foo", m.ToString()); } [Fact] public void ZeroInequality() { MeasurementUnit m1 = (MeasurementUnit.Duration)0; MeasurementUnit m2 = (MeasurementUnit.Information)0; Assert.NotEqual(m1, m2); } [Fact] public void ZeroDifferentHashCodes() { MeasurementUnit m1 = (MeasurementUnit.Duration)0; MeasurementUnit m2 = (MeasurementUnit.Information)0; Assert.NotEqual(m1.GetHashCode(), m2.GetHashCode()); } [Fact] public void SimpleEquality() { MeasurementUnit m1 = MeasurementUnit.Duration.Second; MeasurementUnit m2 = MeasurementUnit.Duration.Second; Assert.Equal(m1, m2); // we overload the == operator, so check that as well Assert.True(m1 == m2); } [Fact] public void SimpleInequality() { MeasurementUnit m1 = MeasurementUnit.Duration.Second; MeasurementUnit m2 = MeasurementUnit.Duration.Millisecond; Assert.NotEqual(m1, m2); // we overload the != operator, so check that as well Assert.True(m1 != m2); } [Fact] public void MixedInequality() { MeasurementUnit m1 = MeasurementUnit.Duration.Nanosecond; MeasurementUnit m2 = MeasurementUnit.Information.Bit; Assert.NotEqual(m1, m2); } [Fact] public void CustomEquality() { var m1 = MeasurementUnit.Custom("foo"); var m2 = MeasurementUnit.Custom("foo"); Assert.Equal(m1, m2); } [Fact] public void CustomInequality() { var m1 = MeasurementUnit.Custom("foo"); var m2 = MeasurementUnit.Custom("bar"); Assert.NotEqual(m1, m2); } [Fact] public void MixedInequalityWithCustom() { var m1 = MeasurementUnit.Custom("second"); var m2 = MeasurementUnit.Duration.Second; Assert.NotEqual(m1, m2); } }
using System.Collections.Generic; using CSConsoleRL.Ai.Interfaces; using CSConsoleRL.Entities; using CSConsoleRL.Helpers; using CSConsoleRL.Ai.States; using CSConsoleRL.Events; using SFML.System; namespace CSConsoleRL.Ai { public class AiGuard : IAi { protected readonly Entity _entity; protected readonly AiStateMachine _aiStateMachine; protected int _counter; protected bool Patrol1ToMeleeSeek1(Entity entity, GameStateHelper gameStateHelper) { return false; _counter++; if (_counter >= 5) { return true; } return false; } protected bool MeleeSeek1ToPatrol1(Entity entity, GameStateHelper gameStateHelper) { return true; _counter--; if (_counter <= 0) { return true; } return false; } public AiGuard(Entity entity) { _entity = entity; _aiStateMachine = new AiStateMachine(); ConstructAiStateMachine(); } public void ParseEntity() { } public IGameEvent GetAiResponse(GameStateHelper gameStateHelper) { return _aiStateMachine.GetCurrentStateResponse(_entity, gameStateHelper); } public void ConstructAiStateMachine() { _aiStateMachine.AddState("Patrol1", new Patrol(_entity, new List<Vector2i>() { new Vector2i(10, 10), new Vector2i(10, 20) })); _aiStateMachine.AddState("MeleeSeek1", new MeleeSeek(_entity)); _aiStateMachine.AddStateChange("Patrol1", "MeleeSeek1", Patrol1ToMeleeSeek1); _aiStateMachine.AddStateChange("MeleeSeek1", "Patrol1", MeleeSeek1ToPatrol1); } } }
using GardenControlCore.Enums; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace GardenControlApi.Models { public class TaskActionDto { public TaskActionId TaskActionId { get; set; } public string Name { get; set; } public DeviceType DeviceType { get; set; } } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace GeometricObjects { public class MovingEventArgs { public bool Cancel; } public class MovedEventArgs : EventArgs { private int _X; private int _Y; public MovedEventArgs(int x, int y) { _X = x; _Y = y; } public int X { get => _X; } public int Y { get => _Y; } } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Docller.Core.Common { public enum CacheDurationHours { Default = 1, Long=8 } }
using LoanAPound.Db; using LoanAPound.Db.Model; using LoanAPound.Email; using System; using System.Threading.Tasks; namespace LoanAPound.LoanEngine { public class DecisionService : IDecisionService { private ICreditScoreService _creditScoreService; private ILoanApplicationRepository _loanApplicationRepository; private IEmailService _emailService; private IApplicantRepository _applicantRepository; public DecisionService(ICreditScoreService creditScoreService, ILoanApplicationRepository loanApplicationRepository, IEmailService emailService, IApplicantRepository applicantRepository) { _creditScoreService = creditScoreService ?? throw new ArgumentException(nameof(creditScoreService)); _loanApplicationRepository = loanApplicationRepository ?? throw new ArgumentException(nameof(loanApplicationRepository)); _emailService = emailService ?? throw new ArgumentException(nameof(emailService)); _applicantRepository = applicantRepository ?? throw new ArgumentException(nameof(applicantRepository)); } public async Task ProcessOustandingLoansAsync() { var loansApplicationsToConsider = await _loanApplicationRepository.ListOutstandingAsync(); foreach(var loanApplication in loansApplicationsToConsider) { await ConsiderLoanAsync(loanApplication); } } public async Task ConsiderLoanAsync(LoanApplication loanApplication) { double creditScore = await _creditScoreService.GetCreditScoreAsync(loanApplication); double loanApplicationAmountToCreditScoreRatio = creditScore / loanApplication.Amount * 100; loanApplication.DateLoanEngineConsidered = DateTime.UtcNow; // Approve loan based on credit score and amount if(loanApplicationAmountToCreditScoreRatio >= loanApplication.Loan.MinimumAmountToCreditScoreRatio) { loanApplication.Status = LoanApplicationStatus.ApprovedInPrincipal; } else { loanApplication.Status = LoanApplicationStatus.Rejected; } await _loanApplicationRepository.UpdateAsync(loanApplication); _emailService.SendEmail(loanApplication.Applicant.EmailAddress, $"{loanApplication.Applicant.FirstName} {loanApplication.Applicant.LastName}", $"Credit check completed. Your application is {loanApplication.Status}."); } public async Task UnderwriteLoanAsync(LoanApplication loanApplication, bool approve) { loanApplication.DateUnderWriterConsidered = DateTime.UtcNow; loanApplication.Status = approve ? LoanApplicationStatus.UnderWriterApproved : LoanApplicationStatus.UnderWriterRejected; await _loanApplicationRepository.UpdateAsync(loanApplication); var applicant = await _applicantRepository.GetAsync(loanApplication.ApplicantId); _emailService.SendEmail(applicant.EmailAddress, $"{applicant.FirstName} {applicant.LastName}", $"Loan application completed. Your application is {loanApplication.Status}."); } } }
/********************************************** * * Stats of Player that can be set to affect gameplay * **********************************************/ using DChild.Gameplay.Objects.Characters; using DChild.Gameplay.Objects.Characters.Attributes; namespace DChild.Gameplay.Player { public interface IPlayerConfig { PlayerAnimation animation { get; } PlayerAttackResistances attackResistances { get; } StatusResistances statusResistances { get; } PlayerDefense defense { get; } IPlayerSkillGetter skillGetter { get; } Attributes attributes { get; } } }
using System.Collections; using System.Collections.Generic; using UnityEngine; public class GoldDrop_GenbuLeg : MonoBehaviour { public GameObject Gold_Coin_Prefab; private bool ToDropCoin = true; public int CoinsDrop_Amount; void Start () { } // Update is called once per frame void Update () { if (ToDropCoin) { GenbuLegDestoryedCheck(); } } public void GenbuLegDestoryedCheck() { if (!gameObject.GetComponent<SphereCollider>().enabled) { print("Collider! off"); } else { print("Collider! on"); for (int i = 0; i < CoinsDrop_Amount; i++) { //call dropcoin() function for coins Drop_Amount DropCoin(); } ToDropCoin = false; } } public void DropCoin() { GameObject spawned = Instantiate(Gold_Coin_Prefab); spawned.transform.position = gameObject.transform.position; } }
using System; using System.Runtime.Serialization; using System.Collections.Generic; namespace Aquamonix.Mobile.Lib { /// <summary> /// Base interface for all domain objects that have the unique identifier "Id" property. /// </summary> public interface IDomainObjectWithId { /// <summary> /// Gets/sets the object's unique id. /// </summary> [DataMember] string Id { get; set;} /// <summary> /// Runs through child dictionaries, setting the ids of child domain objects /// which have ids as well. /// </summary> void ReadyChildIds(); } }
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class DiscoTest : MonoBehaviour { public DiscoController discoController; void Start() { } void Update() { if(UnityEngine.Input.GetKeyDown(KeyCode.UpArrow)) { discoController.AddBoogie(+1); discoController.AddDisco(+1); } else if (UnityEngine.Input.GetKeyDown(KeyCode.DownArrow)) { discoController.AddBoogie(-1); discoController.AddDisco(-1); } else if (UnityEngine.Input.GetKeyDown(KeyCode.LeftArrow)) { //discoController.AddValhalla(-5); } else if (UnityEngine.Input.GetKeyDown(KeyCode.RightArrow)) { discoController.ChangeColor(); //discoController.AddValhalla(+5); } } }
using Autofac; using AHAO.TPLMS.Service; using AHAO.TPLMS.DataBase; using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Threading.Tasks; using Microsoft.Extensions.Configuration; namespace AHAO.TPLMS.Web { public class AutofacDI:Autofac.Module { //重写Autofac管道的Load方法,在这里注册注入 protected override void Load(ContainerBuilder builder) { //注册服务的对象,这里以命名空间名称中含有AHAO.TPLMS.Service和Repository字符串为标志,否则注册失败 builder.RegisterAssemblyTypes(Assembly.GetAssembly(typeof(AuthoriseService))) .Where(u => u.Namespace == "AHAO.TPLMS.Service"); builder.RegisterAssemblyTypes(GetAssemblyByName("AHAO.TPLMS.Repository")). Where(a => a.Namespace.EndsWith("Repository")).AsImplementedInterfaces(); //base.Load(builder); } /// <summary> /// 根据程序集名称获取程序集 /// </summary> /// <param name="AssemblyName"></param> /// <returns></returns> public static Assembly GetAssemblyByName(String AssemblyName) { return Assembly.Load(AssemblyName); } } }
using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Core.BIZ { public class DataDisplayHelper { private static CultureInfo _culture; private static CultureInfo Culture { get { if(_culture == null) { _culture = CultureInfo.GetCultureInfo("vi-VN"); } return _culture; } } public static string displayMoney(decimal number) { return String.Format(Culture, "{0:c}", number); } public static string displayNumber(decimal number) { return String.Format("{0:0}", number); } public static string dislayShortDate(DateTime date) { return String.Format("{0:dd/MM/yyyy}", date); } public static string dislayMonth(DateTime date) { return String.Format("{0:MM/yyyy}", date); } } }
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using Project371.Core; using System; namespace Project371.Components { /// <summary> /// Collider which uses a box shape for collision /// </summary> class BoxCollider : Collider { /// <summary> /// The actual bounding box /// </summary> public BoundingBox bb; /// <summary> /// The min point of the bounding box /// </summary> Vector3 min; /// <summary> /// The max point of the bounding box /// </summary> Vector3 max; public BoxCollider() : base("BoxCollider") { bb = new BoundingBox(); min = new Vector3(); max = new Vector3(); colliderModel = Game1.Instance.Content.Load<Model>("Models\\cube"); } public override void Update() { base.Update(); UpdateBB(); } /// <summary> /// Check for intersection with another box collider /// </summary> /// <param name="other">The other box collider</param> /// <returns></returns> public bool Intersects(BoxCollider other) { if (!Active || !other.Active) return false; if (bb.Intersects(other.bb)) { OnCollision(other); other.OnCollision(this); return true; } else { return false; } } /// <summary> /// Check for intersection with another sphere collider /// </summary> /// <param name="other">The other sphere collider</param> /// <returns></returns> public bool Intersects(SphereCollider other) { if (!Active || !other.Active) return false; if (bb.Intersects(other.bs)) { OnCollision(other); other.OnCollision(this); return true; } else { return false; } } /// <summary> /// Update transform othe the collider /// </summary> private void UpdateBB() { min.X = transform.GetWorldPosition().X - transform.GetWorldScale().X / 2.0f; min.Y = transform.GetWorldPosition().Y - transform.GetWorldScale().Y / 2.0f; min.Z = transform.GetWorldPosition().Z - transform.GetWorldScale().Z / 2.0f; max.X = transform.GetWorldPosition().X + transform.GetWorldScale().X / 2.0f; max.Y = transform.GetWorldPosition().Y + transform.GetWorldScale().Y / 2.0f; max.Z = transform.GetWorldPosition().Z + transform.GetWorldScale().Z / 2.0f; bb.Max = max ; bb.Min = min ; } } }
using Aspose.Tasks.Saving; using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Aspose.Tasks.Examples.CSharp.WorkingWithResourceAssignments { public class AddExtendedAttributesToRAWithLookUp { public static void Run() { // The path to the documents directory. string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.FullName); //ExStart: AddExtendedAttributesToRAWithLookUp // Create new project Project project = new Project(dataDir + "Blank2010.mpp"); var assignment = project.ResourceAssignments.First(); { ExtendedAttributeDefinition resCostAttr = ExtendedAttributeDefinition.CreateLookupResourceDefinition( CustomFieldType.Cost, ExtendedAttributeResource.Cost5, "My lookup cost"); var value1 = new Value { NumberValue = 1500, Description = "Val 1", Id = 1, Val = "1500" }; resCostAttr.AddLookupValue(value1); resCostAttr.AddLookupValue(new Value { NumberValue = 2500, Description = "Val 2", Id = 2 }); project.ExtendedAttributes.Add(resCostAttr); var value = resCostAttr.CreateExtendedAttribute(value1); value.Value = "1500"; project.Save(dataDir + "AddExtendedAttributesToRAWithLookUp_out.mpp", SaveFileFormat.MPP); //ExEnd: AddExtendedAttributesToRAWithLookUp } } } }
using Microsoft.Xna.Framework; using ProjectMini.src.assets; using ProjectMini.src.engine; using ProjectMini.src.entitys; using ProjectMini.src.world; using ProjectSLN.darkcomsoft.src; using System; using System.Collections.Generic; using System.Text; namespace ProjectMini.src.game { public class GameApp : ClassBase { public static GameApp instance { get; private set; } public static AssetsManager v_assetsManager; public static WorldManager v_worldManager; public static EntityManager v_entityManager; public static GameUpdateManager v_gameUpdateManager; private bool v_playing = false; private World v_currentWorld; public GameApp() { instance = null; v_assetsManager = new AssetsManager(); v_worldManager = new WorldManager(); v_entityManager = new EntityManager(); v_gameUpdateManager = new GameUpdateManager(); } protected override void OnDispose() { v_gameUpdateManager.Dispose(); v_gameUpdateManager = null; v_worldManager.Dispose(); v_worldManager = null; v_entityManager.Dispose(); v_entityManager = null; v_assetsManager.Dispose(); v_assetsManager = null; instance = null; base.OnDispose(); } public void Load() { v_assetsManager.LoadContent(); v_playing = false; } public void Tick(GameTime gameTime) { v_gameUpdateManager?.Tick(); v_worldManager?.Tick(); if (v_playing) { if (Input.GetKeyDown(Microsoft.Xna.Framework.Input.Keys.Escape)) { Disconnect(); } } else { if (Input.GetKeyDown(Microsoft.Xna.Framework.Input.Keys.Space)) { Play(); } } } public void Draw(GameTime gameTime) { v_worldManager?.Draw(); v_gameUpdateManager?.Draw(); } public void DrawGUI() { DrawMainMenu(); } private void DrawMainMenu() { } public void Play() { v_playing = true; v_currentWorld = World.CreateWorld(new GreenWorld()); } public void Disconnect() { v_playing = false; World.DestroyWorld(v_currentWorld); v_currentWorld = null; } public static Vector2 GetWorldPosition() { if (EntityPlayer.v_player != null) { return new Vector2(EntityPlayer.v_playerPosition.X , EntityPlayer.v_playerPosition.Y ); } else { return new Vector2(Application.instance.Window.ClientBounds.Width / 2, Application.instance.Window.ClientBounds.Height / 2); } } } }
using MongoDB.Bson; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace BankBatchService { /// <summary> /// 银行扣款交易记录 /// </summary> public class ProxyAccountDetail { /// <summary> /// 2位银行标识+12位记账时间戳+循环的6位流水号,pk /// </summary> public string ID { get; set; } /// <summary> /// /// </summary> public long Account_Detail_Out_Id { get; set; } /// <summary> /// /// </summary> public string Account_No { get; set; } /// <summary> /// /// </summary> public string Card_No { get; set; } /// <summary> /// /// </summary> public int Trans_Type { get; set; } /// <summary> /// /// </summary> public decimal In_Money { get; set; } /// <summary> /// /// </summary> public decimal Out_Money { get; set; } /// <summary> /// /// </summary> public decimal Should_In_Money { get; set; } /// <summary> /// /// </summary> public decimal Should_Out_Money { get; set; } /// <summary> /// /// </summary> public decimal Old_Balance { get; set; } /// <summary> /// /// </summary> public int Out_Offline_SN { get; set; } /// <summary> /// 发行方记账时刻 /// </summary> public DateTime Charge_Time { get; set; } /// <summary> /// /// </summary> public DateTime Transmit_Time { get; set; } /// <summary> /// /// </summary> public DateTime Settle_Time { get; set; } /// <summary> /// /// </summary> public int ChargeStatus { get; set; } /// <summary> /// /// </summary> public DateTime Bank_Charge_Time { get; set; } /// <summary> /// 交易时刻 /// </summary> public DateTime Ic_Trans_Time { get; set; } /// <summary> /// /// </summary> public string Provider_Id { get; set; } /// <summary> /// /// </summary> public int Package_No { get; set; } /// <summary> /// /// </summary> public int TransId { get; set; } /// <summary> /// 银行渠道号,取值为BANK_CODE /// </summary> public string Agent_No { get; set; } /// <summary> /// /// </summary> public string Main_Card_No { get; set; } public string Bank_Tag { get; set; } /// <summary> /// 银行账号,来源于银行方发送的委托扣款协议信息的AccountID /// </summary> public string Account_Id { get; set; } /// <summary> /// 用户所属企业名称(扣款用户名称),来源于银行方发送的委托扣款协议信息BL_Corp /// </summary> public string Account_Name { get; set; } /// <summary> /// /// </summary> public string NETNO { get; set; } /// <summary> /// /// </summary> public string MID { get; set; } /// <summary> /// /// </summary> public string Card_Type { get; set; } /// <summary> /// /// </summary> public int Physical_Type { get; set; } /// <summary> /// /// </summary> public string Issuer_Id { get; set; } /// <summary> /// /// </summary> public string IcCard_No { get; set; } /// <summary> /// 交易前金额 /// </summary> public decimal Balance { get; set; } /// <summary> /// /// </summary> public long TacNo { get; set; } /// <summary> /// /// </summary> public decimal Last_Balance { get; set; } /// <summary> /// /// </summary> public string PsaMID { get; set; } /// <summary> /// /// </summary> public int Psam_Tran_SN { get; set; } /// <summary> /// /// </summary> public int DealStatus { get; set; } /// <summary> /// /// </summary> public int Medium_Type { get; set; } /// <summary> /// /// </summary> public int Trans_SEQ { get; set; } /// <summary> /// /// </summary> public int Ticks_Type { get; set; } /// <summary> /// 入口路网号 /// </summary> public string En_NetWork { get; set; } /// <summary> /// /// </summary> public DateTime En_Time { get; set; } /// <summary> /// 入口站/广场号 /// </summary> public string En_Plazaid { get; set; } /// <summary> /// /// </summary> public int En_Operator_Id { get; set; } /// <summary> /// 入口车道号 /// </summary> public string En_Shift_Id { get; set; } /// <summary> /// 出口路网号 /// </summary> public string NetWork { get; set; } /// <summary> /// 出口站/广场号 /// </summary> public string Plazaid { get; set; } /// <summary> /// /// </summary> public int Operator_Id { get; set; } /// <summary> /// 出口车道号 /// </summary> public string Shift_Id { get; set; } /// <summary> /// Detail节点中的车型字段 /// </summary> public int VehClass { get; set; } /// <summary> /// 车牌号 /// </summary> public string Car_Serial { get; set; } /// <summary> /// 清分日 /// </summary> public DateTime Clear_Target_Date { get; set; } /// <summary> /// /// </summary> public string Description { get; set; } /// <summary> /// 交易中的清分目标日 /// </summary> public DateTime ClearTargetDate { get; set; } /// <summary> /// 交易金额(分) /// </summary> public decimal Due_Fare { get; set; } /// <summary> /// 交易金额(分) /// </summary> public decimal Cash { get; set; } /// <summary> /// 银行账号类型;0对公,1储蓄,2信用卡 /// </summary> public int Account_Type { get; set; } } /// <summary> /// 银行扣款成功遗留交易记录 /// </summary> public class ProxyAccountDetailSuccessNone : ProxyAccountDetail { } /// <summary> /// 银行扣款失败交易(准备记入扣保证金文件)记录 /// </summary> public class ProxyAccountDetailBankFailWaitDeduct: ProxyAccountDetail { } /// <summary> /// 银行扣款失败交易再次扣款成功记录 /// </summary> public class ProxyAccountDetailBankFailToSuccess : ProxyAccountDetail { } /// <summary> /// 银行扣款失败交易记录 /// </summary> public class ProxyAccountDetailBankFail : ProxyAccountDetail { } /// <summary> /// 银行扣款成功交易通知清分交易记录表 /// </summary> public class ProxyAccountDetailToClear : ProxyAccountDetail { } /// <summary> /// /// </summary> public class FlAccountStalist { /// <summary> /// /// </summary> public long Id { get; set; } /// <summary> /// /// </summary> public long Package_No { get; set; } /// <summary> /// /// </summary> public string Account_No { get; set; } /// <summary> /// 0:正常 /// 1:低值 /// 2:透支 /// </summary> public int Issue_Status { get; set; } /// <summary> /// 当前时间 /// </summary> public DateTime Start_Time { get; set; } /// <summary> /// 略 /// </summary> public DateTime Package_Time { get; set; } /// <summary> /// 略 /// </summary> public int Flag { get; set; } public string Remark { get; set; } public string Operator_No { get; set; } public string Agent_No { get; set; } } /// <summary> /// 银行渠道表 /// </summary> public class BankAgent { /// <summary> /// 银行代码 /// </summary> public string Bank_Code { get; set; } /// <summary> /// 两位数字标识,唯一确定一家银行 /// </summary> public string Bank_Tag { get; set; } // 银行代码(弃) //public string Bank_Code { get; set; } /// <summary> /// FTPHost /// </summary> public string FTPHost { get; set; } /// <summary> /// 银行名称 /// </summary> public string Bank_Name { get; set; } /// <summary> /// 记账卡备付金户账号名称 /// </summary> public string Credit_Provisions_Name { get; set; } /// <summary> /// 记账卡备付金户账号 /// </summary> public string Credit_Provisions_No { get; set; } /// <summary> /// 报文交易数上限 /// </summary> public int Trans_Count_Max { get; set; } /// <summary> /// 银行上午接收扣款请求文件的时间点 /// </summary> public string MrcvTime { get; set; } /// <summary> /// 银行下午午接收扣款请求文件的时间点 /// </summary> public string ArcvTime { get; set; } /// <summary> /// 银行系统IP地址 /// </summary> public string IPAddress { get; set; } /// <summary> /// 银行系统端口号 /// </summary> public int Port { get; set; } /// <summary> /// ftp用户名 /// </summary> public string FTPUserName { get; set; } /// <summary> /// ftp密码 /// </summary> public string FTPPwd { get; set; } /// <summary> /// ftp端口号 /// </summary> public int FTPPort { get; set; } /// <summary> /// ETC方从此目录接收银行文件 /// </summary> public string RcvFtpDri { get; set; } /// <summary> /// ETC方从此目录发送文件给银行方 /// </summary> public string SndFtpDri { get; set; } /// <summary> /// 备注信息 /// </summary> public string Remark { get; set; } /// <summary> /// 银行支持任务 /// </summary> public List<BankSupportTask> BankSupportTasks = new List<BankSupportTask>(); } /// <summary> /// 输出定时处理任务数据集合 /// </summary> public class OutPutTaskWaitingDone { /// <summary> /// PK /// </summary> public ObjectId _id { get; set; } /// <summary> /// 两位十进制数字字符串唯一确定一家银行 /// </summary> public string BankTag { get; set; } /// <summary> /// 交易类型 /// 2001:记账金客户转账数据 /// 2002:记账保证金客户转账数据 /// 2010:解约信息 /// </summary> public int TransType { get; set; } /// <summary> /// 当TRANSTYPE为2001时本字段为0代表T-1日的未扣款交易;为1代表T-1日之前的未扣款交易和银行扣款失败交易 /// </summary> public int PriorityLevel { get; set; } /// <summary> /// 库名 /// </summary> public string DbName { get; set; } /// <summary> /// 集合名 /// </summary> public string ColName { get; set; } /// <summary> /// 文件名(不含路径) /// </summary> public string FileName { get; set; } /// <summary> /// 1:文件已上传到ftp(终态) /// 0:中间数据已生成,待ftp发送 /// -1:文件生成失败 /// -2:上传ftp失败 /// </summary> public int Status { get; set; } /// <summary> /// 文件上传ftp时刻 /// </summary> public DateTime SendTime { get; set; } /// <summary> /// 记录创建时刻 /// </summary> public DateTime CreateTime { get; set; } /// <summary> /// 备注信息 /// </summary> public string Remark { get; set; } /// <summary> /// 加解密密钥 /// </summary> public string Key { get; set; } /// <summary> /// 待扣款总笔数 /// </summary> public int TotalNum { get; set; } /// <summary> /// 待扣款总金额(分) /// </summary> public long TotalAmount { get; set; } } /// <summary> /// BANK_CONFIG配置库 /// </summary> public class Spara { /// <summary> /// pk /// </summary> public ObjectId _id; /// <summary> /// key /// </summary> public string Key; /// <summary> /// value /// </summary> public string Value; /// <summary> /// Remark /// </summary> public string Remark; } /// <summary> /// 银行签约账户表 /// </summary> public class BankAccount { /// <summary> /// 两位数字标识,唯一确定一家银行 /// </summary> public string Bank_Tag { get; set; } /// <summary> /// 银行方发送的委托扣款协议信息的AccountID /// </summary> public string Account_Id { get; set; } /// <summary> /// 银行方发送的委托扣款协议信息BL_Corp /// </summary> public string Account_Name { get; set; } /// <summary> /// 保证金金额(分) /// </summary> public decimal Cash_Deposit { get; set; } /// <summary> /// 银行端的生成日期 /// </summary> public DateTime Gen_Time { get; set; } /// <summary> /// 记录创建时刻 /// </summary> public DateTime Create_Time { get; set; } /// <summary> /// 记录最近一次修改时刻(通常修改保证金金额时修改),默认和记录创建时刻相同 /// </summary> public DateTime Modify_Time { get; set; } /// <summary> /// 默认值-1由银行接口系统写入。 /// 银行账户类型 /// 对公0 ;储蓄1;信用卡2; /// </summary> public int Account_Type { get; set; } } /// <summary> /// 签约信息集合(2009和2011号报文方向1) /// </summary> public class BankAccountSign { /// <summary> /// pk /// </summary> public ObjectId _id { get; set; } /// <summary> /// 两位十进制数字字符串唯一确定一家银行 /// </summary> public string BankTag { get; set; } /// <summary> /// 银行方发送的委托扣款协议信息的AccountID银行账号 /// </summary> public string AccountId { get; set; } /// <summary> /// 银行方发送的委托扣款协议信息的BL_Corp用户所属企业名称 /// </summary> public string AccountName { get; set; } /// <summary> /// 保证金金额(分) /// </summary> public int CashDeposit { get; set; } /// <summary> /// 银行端的生成日期 /// </summary> public DateTime GenTime { get; set; } /// <summary> /// 记录创建时刻 /// </summary> public DateTime CreateTime { get; set; } /// <summary> /// 0- 新增的签约交易 /// 1- 修改的签约交易(修改保证金) /// 2- 保证金补缴成功交易,若没有其他扣款失败的交易则需要漂白黑名单 /// </summary> public int Command { get; set; } /// <summary> /// 银行发送的文件名(不含路径) /// </summary> public string FileName { get; set; } /// <summary> /// 0- 已入中间库未同步到核心 /// 1- 已同步到核心(终态) /// </summary> public int Status { get; set; } } /// <summary> /// 一卡通黑白名单 /// </summary> public class BankAccountYKTSign { /// <summary> /// pk,accountid /// </summary> public string _id { get; set; } /// <summary> /// 两位十进制数字字符串唯一确定一家银行 /// </summary> public string BankTag { get; set; } /// <summary> /// 银行方发送的委托扣款协议信息的BL_Corp用户所属企业名称 /// </summary> public string AccountName { get; set; } /// <summary> /// 保证金金额(分) /// </summary> public int CashDeposit { get; set; } /// <summary> /// 银行端的生成日期 /// </summary> public DateTime GenTime { get; set; } /// <summary> /// 记录创建时刻 /// </summary> public DateTime CreateTime { get; set; } /// <summary> /// 0- 账户状态正常 /// 1- 账户余额不足 /// </summary> public int Status { get; set; } } /// <summary> /// 银行账号绑定关系表 /// </summary> public class BankAccountBinding { /// <summary> /// 主键 自增 /// </summary> public long Id { get; set; } /// <summary> /// ETC账号A_ACCOUNT.ACCOUNT_NO /// </summary> public string account_No { get; set; } /// <summary> /// 两位数字标识,唯一确定一家银行 /// </summary> public string Bank_Tag { get; set; } /// <summary> /// 银行账号,来源于银行方发送的委托扣款协议信息的AccountID /// 用户更换银行卡,本绑定记录不删除仅更新STATUS为1,同时新增一条绑定关系记录 /// </summary> public string Account_Id { get; set; } /// <summary> /// 0- 已绑定ETC账号 /// 1- 已解绑ETC账号 /// -1- 待解约 /// </summary> public int Status { get; set; } /// <summary> /// 记录创建时刻 /// </summary> public DateTime Create_Time { get; set; } /// <summary> /// 记录最近一次修改时刻,默认和记录创建时刻相同 /// </summary> public DateTime Modify_Time { get; set; } } /// <summary> /// 银行支持任务表 /// </summary> public class BankSupportTask { /// <summary> /// 主键 自增 /// </summary> public int Id { get; set; } /// <summary> /// 银行代码,固定6位 /// </summary> public string Bank_Code { get; set; } /// <summary> /// 负2001-扣款失败和未扣款在一个扣款文件 /// 2001-新版记账金客户转账数据 /// 2002-记账金保证金转账数据 /// 负2009-旧版签约信息 /// 2009-新版签约信息 /// 2010-解约信息 /// 2011-记账金保证金补缴成功信息 /// 2012-记账金保证金金额减少信息 /// </summary> public int File_Task_Type { get; set; } /// <summary> /// 对FILETASKTYPE的详细说明 /// </summary> public string Remark { get; set; } } /// <summary> /// 解绑车辆信息流水表 /// </summary> public class RemoveCarBinding { /// <summary> /// 主键 自增 /// </summary> public long Id { get; set; } /// <summary> /// ETC账号 /// </summary> public string Account_No { get; set; } /// <summary> /// ETC卡号 /// </summary> public string Card_No { get; set; } /// <summary> /// 两位数字标识,唯一确定一家银行 /// </summary> public string Bank_Tag { get; set; } /// <summary> /// 银行账号 /// </summary> public string Account_Id { get; set; } /// <summary> /// 用户所属企业名称(扣款用户名称) /// </summary> public string Account_Name { get; set; } /// <summary> /// 银行账户类型 /// 对公0 ;储蓄1;信用卡2 /// </summary> public int Account_Type { get; set; } /// <summary> /// 解绑车辆车牌号 /// </summary> public string Plate_Numbers { get; set; } /// <summary> /// 0- 已预约解绑(发行系统填写) /// 1- 已解绑生效(银行接口系统填写) /// 2- 有欠费记录不予解绑 /// </summary> public int Status { get; set; } /// <summary> /// 保证金金额(元) /// </summary> public decimal Cash_Deposit_Cut { get; set; } /// <summary> /// 记录创建时刻 /// </summary> public DateTime Create_Time { get; set; } /// <summary> /// 记录最近一次修改时刻,默认和记录创建时刻相同 /// </summary> public DateTime Modify_Time { get; set; } /// <summary> /// 操作员编号 /// </summary> public string Operator_No { get; set; } /// <summary> /// 操作员姓名 /// </summary> public string Operator_Name { get; set; } /// <summary> /// 操作时刻 /// </summary> public DateTime OPT_Time { get; set; } /// <summary> /// 营业厅编号 /// </summary> public string Agent_No { get; set; } /// <summary> /// 营业厅名称 /// </summary> public string Agent_Name { get; set; } } }
using DAL.DTO; using DAL.Models; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DAL.Repositories { public class ProductRepository { private TurpialPOSDbContext _context; public ProductRepository() { _context = new TurpialPOSDbContext(); } public Product Add(Product product) { _context.Product.Add(product); _context.SaveChanges(); return product; } public Product Edit(Product productEdited) { var product = _context.Product.Where(p => p.Id == productEdited.Id).FirstOrDefault(); if(product != null){ product.Name = productEdited.Name; product.Cost = productEdited.Cost; product.Price = productEdited.Price; product.CodeBar = productEdited.CodeBar; product.Description = productEdited.Description; product.ProductTypeId = productEdited.ProductTypeId; _context.Entry(product).State = System.Data.Entity.EntityState.Modified; _context.SaveChanges(); } return product; } public void Delete(int id) { var product = _context.Product.Where(p => p.Id == id).FirstOrDefault(); if(product != null) { product.Deactivate(); _context.Entry(product).State = System.Data.Entity.EntityState.Modified; _context.SaveChanges(); } } public IList<Product> GetAll(int storeId) { return _context.Product.Where(p => p.ProductType.StoreId == storeId && p.IsActive).ToList(); } public IList<ProductType> GetTypes(int storeId) { return _context.ProductType.Where(p=> p.StoreId == storeId).ToList(); } public Product Get(int id) { return _context.Product.Where(p => p.Id == id).FirstOrDefault(); } } }
using Abhs.Application.IService; using Abhs.Common.Enums; using Abhs.Data.Repository; using Abhs.Model.Access; using Abhs.Model.Common; using Abhs.Model.ViewModel; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using StructureMap.Attributes; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Abhs.Application.Service { public class PackageLessonItemsService : IPackageLessonItemsService { [SetterProperty] public IRepositoryBase<SysPackageLessonItems> packageLessonItemsDAL { get; set; } public SysPackageLessonItems FindEntity(object pk) { return packageLessonItemsDAL.FindEntity(pk); } public IQueryable<SysPackageLessonItems> Queryable() { return packageLessonItemsDAL.IQueryable(); } public void PackageLessonItemInit() { var list = this.Queryable().Where(x => x.spk_State == 1).ToList(); list.ForEach(x => { RedisService.Instance().SetPackageLessonItemCache<SysPackageLessonItems>(x.spk_ID, x); }); } /// <summary> /// 从缓存获取实体 /// </summary> /// <param name="id"></param> /// <returns></returns> public SysPackageLessonItems GetModelByCache(int id) { var model = RedisService.Instance().GetPackageLessonItem<SysPackageLessonItems>(id); if (model == null) { model = this.FindEntity(id); RedisService.Instance().SetPackageLessonItemCache<SysPackageLessonItems>( model.spk_ID, model); } return model; } /// <summary> /// 获取该课时下的所有课时内容 /// </summary> /// <param name="lessonId"></param> /// <returns></returns> public List<SysPackageLessonItems> GetPackageLessonItemByLessonId(int lessonId) { return this.Queryable().Where(x => x.spk_splID == lessonId && x.spk_State == 1).OrderBy(x => x.spk_Index).ToList(); } } }
using BP12; using BP12.Events; using System; using UnityEngine; namespace DChild.Gameplay { public class ObjectLifetime : MonoBehaviour { [SerializeField] private float m_lifeTime; public event EventAction<EventActionArgs> Death; void Update() { if (m_lifeTime > 0f) { m_lifeTime -= Time.deltaTime; if (m_lifeTime <= 0f) { this.Raise(Death, EventActionArgs.Empty); Destroy(this.gameObject); } } } } }
using UnityEngine; using UnityEngine.Networking; using Exception = System.Exception; namespace DFrame { public class Vector2Int { /*数据*/ public int x, y; /*构造*/ public Vector2Int() { x = 0; y = 0; } public Vector2Int(int xIn, int yIn) { x = xIn; y = yIn; } public Vector2Int(Vector2Int v) { x = v.x; y = v.y; } /*与 Vector2 的转换*/ /// <summary> /// 隐式转换 /// </summary> /// <param name="v"></param> public static implicit operator Vector2Int(Vector2 v) { return new Vector2Int((int)(v.x), (int)(v.y)); } public static Vector2Int Round(Vector2 v) { return new Vector2Int(Mathf.RoundToInt(v.x), Mathf.RoundToInt(v.y)); } public static Vector2Int Floor(Vector2 v) { return new Vector2Int(Mathf.FloorToInt(v.x), Mathf.FloorToInt(v.y)); } public static Vector2Int Ceil(Vector2 v) { return new Vector2Int(Mathf.CeilToInt(v.x), Mathf.CeilToInt(v.y)); } public void RoundFrom(Vector2 v) { x = Mathf.RoundToInt(v.x); y = Mathf.RoundToInt(v.y); } public void FloorFrom(Vector2 v) { x = Mathf.FloorToInt(v.x); y = Mathf.FloorToInt(v.y); } public void CeilFrom(Vector2 v) { x = Mathf.CeilToInt(v.x); y = Mathf.CeilToInt(v.y); } public Vector2 ToVector2() { return (new Vector2(x, y)); } /*基本运算符*/ public static Vector2Int operator -(Vector2Int a, Vector2Int b) { return (new Vector2Int(a.x - b.x, a.y - b.y)); } public static Vector2Int operator -(Vector2Int a) { return new Vector2Int(-a.x, -a.y); } public static Vector2Int operator +(Vector2Int a, Vector2Int b) { return (new Vector2Int(a.x + b.x, a.y + b.y)); } public static Vector2Int operator *(Vector2Int a, Vector2Int b) { return (new Vector2Int(a.x * b.x, a.y * b.y)); } /*逻辑判定*/ public static bool operator !=(Vector2Int a, Vector2Int b) { return !(a == b); } public static bool operator ==(Vector2Int a, Vector2Int b) { if (System.Object.ReferenceEquals(a, b)) return true; if (null == (object)a || null == (object)b) return false; return (a.x == b.x && a.y == b.y); } public bool Equals(Vector2Int a) { if (null == a) return false; return (a.x == x && a.y == y); } public override bool Equals(System.Object obj) { if (null == obj) return false; Vector2Int inst = obj as Vector2Int; if (null == (System.Object)inst) return false; return (inst.x == x && inst.y == y); } public static bool ValueEquals(Vector2Int v1, Vector2Int v2) { return (!ReferenceEquals(v1, v2) && v1.x == v2.x && v1.y == v2.y); } public override int GetHashCode() { return (x ^ y); } /*常量*/ public static Vector2Int zero { get { return new Vector2Int(0, 0); } } public static Vector2Int one { get { return new Vector2Int(1, 1); } } /*方向*/ // 基本方向:上下左右 public static Vector2Int up { get { return new Vector2Int(0, 1); } } public static Vector2Int down { get { return new Vector2Int(0, -1); } } public static Vector2Int left { get { return new Vector2Int(-1, 0); } } public static Vector2Int right { get { return new Vector2Int(1, 0); } } // 基本方向:东南西北 public static Vector2Int east { get { return new Vector2Int(1, 0); } } public static Vector2Int south { get { return new Vector2Int(0, -1); } } public static Vector2Int west { get { return new Vector2Int(-1, 0); } } public static Vector2Int north { get { return new Vector2Int(0, 1); } } // 转向 /// <summary> /// 向右转(作为方向向量时) /// </summary> /// <param name="dirIn">移动方向的单位向量(不再进行归一化的方向近似求解)</param> /// <returns></returns> public static Vector2Int TurnRight(Vector2Int dirIn) { return new Vector2Int(dirIn.y, -dirIn.x); } /// <summary> /// 向左转(作为方向向量时) /// </summary> /// <param name="dirIn">移动方向的单位向量(不再进行归一化的方向近似求解)</param> /// <returns></returns> public static Vector2Int TurnLeft(Vector2Int dirIn) { return new Vector2Int(-dirIn.y, dirIn.x); } /// <summary> /// 向右转(作为方向向量时) /// </summary> public void TurnRight() { int tmp = y; y = -x; x = tmp; } /// <summary> /// 向左转(作为方向向量时) /// </summary> public void TurnLeft() { int tmp = y; y = x; x = -tmp; } /// <summary> /// 向右转向的方向向量 /// </summary> public Vector2Int turnRight { get { return new Vector2Int(y, -x); } } /// <summary> /// 向左转向的方向向量 /// </summary> public Vector2Int turnLeft { get { return new Vector2Int(-y, x); } } } public class Matrix2Int { /*创建*/ public Matrix2Int() { _empty = true; _mapSize = new Vector2Int(0, 0); data = new int[0, 0] { }; } public Matrix2Int(Vector2Int mapSizeIn, int initVal = 0) { _mapSize = new Vector2Int(mapSizeIn); if (_mapSize.x > 0 && _mapSize.y > 0) { _empty = false; data = new int[_mapSize.x, _mapSize.y]; if (0 != initVal) { for (int iy = 0; iy < _mapSize.y; ++iy) { for (int ix = 0; ix < _mapSize.x; ++ix) { data[ix, iy] = initVal; } } } } else { _empty = true; data = new int[0, 0] { }; } } public Matrix2Int(int x, int y, int initVal = 0) { _mapSize = new Vector2Int(x, y); if (_mapSize.x > 0 && _mapSize.y > 0) { _empty = false; data = new int[_mapSize.x, _mapSize.y]; if (0 != initVal) { for (int iy = 0; iy < _mapSize.y; ++iy) { for (int ix = 0; ix < _mapSize.x; ++ix) { data[ix, iy] = initVal; } } } } else { _empty = true; data = new int[0, 0] { }; } } /*属性*/ public bool isEmpty { get { return _empty; } } /*接口*/ public int this[Vector2Int nodeIn] { get { return data[nodeIn.x, nodeIn.y]; } set { data[nodeIn.x, nodeIn.y] = value; } } public int this[int x, int y] { get { return data[x, y]; } set { data[x, y] = value; } } public bool IsInsideMap(Vector2Int nodeIn) { return (nodeIn.x >= 0 && nodeIn.x < _mapSize.x && nodeIn.y >= 0 && nodeIn.y < _mapSize.y); } public bool IsInsideMap(int x, int y) { return (x >= 0 && x < _mapSize.x && y >= 0 && y < _mapSize.y); } /*私有组件*/ private int[,] data; private Vector2Int _mapSize; private bool _empty; } }
using System; using Whathecode.System.Algorithm; namespace Whathecode.System { public static partial class Extensions { /// <summary> /// Split a string into two strings at a specified position. /// </summary> /// <param name = "source">The source for this extension method.</param> /// <param name = "index">The index where to split the string.</param> /// <param name = "splitOption">Option specifying whether to include the character where is split in the resulting strings.</param> /// <returns>A string array containing both strings after the split.</returns> public static string[] SplitAt( this string source, int index, SplitOption splitOption = SplitOption.None ) { if ( index < 0 || index >= source.Length ) { throw new ArgumentException( "Specified split index is outside of the range of the string.", nameof( index ) ); } return new[] { source.Substring( 0, index + (splitOption.EqualsAny( SplitOption.Left, SplitOption.Both ) ? 1 : 0) ), source.Substring( index + (splitOption.EqualsAny( SplitOption.Right, SplitOption.Both ) ? 0 : 1) ) }; } /// <summary> /// Ensure a string is unique by applying a certain suffix. /// TODO: Allow more choices than a counting int suffix. /// </summary> /// <param name = "source">The source of this extension method</param> /// <param name = "isUnique">Checks whether a certain path is unique or not.</param> /// <param name = "format">A standard or custom suffix format string. (see Remarks)</param> /// <returns>The original string with optionally a suffix applied to it to make it unique.</returns> /// <remarks> /// The <paramref name="format" /> parameter should contain a format pattern /// that defines the format of the suffix which will be applied to the string. /// - "i" can be used to represent a number which increases per found duplicate. /// </remarks> public static string MakeUnique( this string source, Func<string, bool> isUnique, string format ) { int count = 1; string current = source; while ( !isUnique( current ) ) { string suffix = format.Replace( "i", count++.ToString() ); current = source + suffix; } return current; } } }
using System.Data.Entity; using Abp.Authorization; using Abp.Authorization.Roles; using Abp.Authorization.Users; using Abp.Configuration; using Abp.EntityFramework; using Abp.MultiTenancy; namespace Abp.Zero.EntityFramework { /// <summary> /// DbContext object for ABP zero. /// </summary> public class AbpZeroDbContext : AbpDbContext { /// <summary> /// Tenants /// </summary> public virtual IDbSet<AbpTenant> AbpTenants { get; set; } /// <summary> /// Users. /// </summary> public virtual IDbSet<AbpUser> AbpUsers { get; set; } /// <summary> /// User logins. /// </summary> public virtual IDbSet<UserLogin> UserLogins { get; set; } /// <summary> /// Roles. /// </summary> public virtual IDbSet<AbpRole> AbpRoles { get; set; } /// <summary> /// User roles. /// </summary> public virtual IDbSet<UserRole> UserRoles { get; set; } /// <summary> /// Permissions. /// </summary> public virtual IDbSet<PermissionSetting> Permissions { get; set; } /// <summary> /// Settings. /// </summary> public virtual IDbSet<Setting> Settings { get; set; } /// <summary> /// Default constructor. /// Do not directly instantiate this class. Instead, use dependency injection! /// </summary> public AbpZeroDbContext() { } /// <summary> /// Constructor with connection string parameter. /// </summary> /// <param name="nameOrConnectionString">Connection string or a name in connection strings in configuration file</param> public AbpZeroDbContext(string nameOrConnectionString) : base(nameOrConnectionString) { } protected override void OnModelCreating(DbModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); modelBuilder.Entity<AbpUser>().ToTable("AbpUsers"); modelBuilder.Entity<UserLogin>().ToTable("AbpUserLogins"); modelBuilder.Entity<AbpRole>().ToTable("AbpRoles"); modelBuilder.Entity<UserRole>().ToTable("AbpUserRoles"); modelBuilder.Entity<AbpTenant>().ToTable("AbpTenants"); modelBuilder.Entity<PermissionSetting>().ToTable("AbpPermissions"); modelBuilder.Entity<Setting>().ToTable("AbpSettings"); } } }
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Net.Sockets; using System.Text; using System.Threading; using System.Threading.Tasks; namespace Mojang.Minecraft.Protocol.Providers { public class DefaultConnectProvider : IConnectProvider { private AutoResetEvent _AutoResetEvent = new AutoResetEvent(false); private TcpClient _TcpClient; private byte[] _AsyncBuffer; private List<byte> _DataBuffer = new List<byte>(); private object _ListLock = new object(); //在读入或写出是查询TCP链接是否已被关闭 //如果抛出异常, public DefaultConnectProvider(string serverAddress, ushort serverPort) { _TcpClient = new TcpClient(serverAddress, serverPort); _AsyncBuffer = new byte[_TcpClient.ReceiveBufferSize]; ServerAddress = serverAddress; ServerPort = serverPort; Dispatch(); } public string ServerAddress { get; private set; } public ushort ServerPort { get; private set; } private async void Dispatch() { var receivedLength = await _TcpClient.GetStream().ReadAsync(_AsyncBuffer, 0, _AsyncBuffer.Length); lock(_ListLock) { _DataBuffer.AddRange(_AsyncBuffer.Take(receivedLength)); } _AutoResetEvent.Set(); Dispatch(); } private object _ReceiveLock = new object(); public async Task<byte[]> Receive(int length) { return await Task.Run(() => { lock (_ReceiveLock) { while (length > _DataBuffer.Count) _AutoResetEvent.WaitOne(); lock (_ListLock) { var result = _DataBuffer.Take(length).ToArray(); _DataBuffer.RemoveRange(0, length); return result; } } }); } public async Task Send(byte[] data) { //data = new byte[] { 20, 0, 47, 14, 50, 50, 50, 46, 49, 56, 55, 46, 50, 53, 52, 46, 53, 48, 99, 221, 1 }; await _TcpClient.GetStream().WriteAsync(data, 0, data.Length); } } }
using System.Collections; using System.Collections.Generic; using UnityEngine; public class Born : MonoBehaviour { public GameObject player1Prefab; public GameObject player2Prefab; public bool isPlayer1; // Start is called before the first frame update void Start() { Invoke("BornTank", 1.0f); Destroy(gameObject, 1.0f); } // Update is called once per frame void Update() { } private void BornTank() { if (isPlayer1) { Instantiate(player1Prefab, transform.position, Quaternion.identity); } else { Instantiate(player2Prefab, transform.position, Quaternion.identity); } } }
using System; using System.Net; namespace AssemblyResolver { /// <summary> /// Class HttpAssembly. /// </summary> public class HttpAssembly : IAssemblyResolver { /// <summary> /// Initializes a new instance of the <see cref="HttpAssembly"/> class. /// </summary> /// <param name="address">The address.</param> /// <param name="credentials">The credentials.</param> public HttpAssembly(string address, ICredentials credentials = null) : this(new Uri(address), credentials) { } /// <summary> /// Initializes a new instance of the <see cref="HttpAssembly"/> class. /// </summary> /// <param name="address">The address.</param> /// <param name="credentials">The credentials.</param> public HttpAssembly(Uri address, ICredentials credentials = null) : this() { Address = address; Credentials = credentials; } /// <summary> /// Initializes a new instance of the <see cref="HttpAssembly"/> class. /// </summary> public HttpAssembly() { } /// <summary> /// Gets or sets the address. /// </summary> /// <value>The address.</value> public Uri Address { get; set; } /// <summary> /// Gets or sets the credentials. /// </summary> /// <value>The credentials.</value> public ICredentials Credentials { get; set; } /// <summary> /// Gets the assembly image. /// </summary> /// <returns>System.Byte[].</returns> public byte[] GetAssemblyImage() { if (Address == null) return null; try { using (var webClient = new WebClient()) { webClient.Credentials = Credentials; return webClient.DownloadData(Address); } } catch (Exception) { return null; } } } }
using LHRLA.Core.Helpers; using LHRLA.DAL; using LHRLA.LHRLA.Core.ApplicationHelper; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using System.Configuration; using System.Web.Security; namespace LHRLA.Controllers { public class LoginController : Controller { vt_LHRLAEntities db =new vt_LHRLAEntities(); // GET: Login public ActionResult Index() { return View(); } public ActionResult SignUp() { return View(); } public ActionResult ForgotPassword() { return View(); } [HttpPost] public ActionResult Login(string Email, string Password) { string EncryptedPassword = new vt_Common().Encrypt(Password); var dt = new LHRLA.DAL.DataAccessClasses.UserDataAccess().CheckUser(Email, EncryptedPassword); var InactiveUser = dt.Select(o => o.Is_Active).FirstOrDefault(); var UserID = dt.Select(o => o.ID).FirstOrDefault(); var RoleID = dt.Select(o => o.Role_ID).FirstOrDefault(); // Core.ViewModel.MenuVM _login = new Core.ViewModel.MenuVM(); try { if (dt != null) { if (InactiveUser == true) { Session["UserID"] = UserID; Session["User"] = Email; Session["RoleID"] = RoleID; Core.ViewModel.UserVM _loginCredentials = db.tbl_User.Where(x => x.ID == UserID).Select(x => new Core.ViewModel.UserVM { ID = x.ID, User_Name = x.User_Name, Role_ID = x.Role_ID, RoleTitle = x.tbl_Role.Name }).FirstOrDefault(); // Get the login user details and bind it to LoginModels class List<Core.ViewModel.MenuVM> _menus = db.tbl_Role_Pages.Where(x => x.Role_ID == _loginCredentials.Role_ID && x.tbl_Pages.Is_Active == true && x.tbl_Pages.MenuDisplay == true).Select(x => new Core.ViewModel.MenuVM { SectionID = x.tbl_Pages.Section_ID, Section = x.tbl_Pages.tbl_Section.Title, PageID = x.tbl_Pages.ID, Page = x.tbl_Pages.Title, URL = x.tbl_Pages.URL, //ActionName = x.Action, // RoleId = x.RoleId, // RoleName = x.tblRole.Roles }).ToList(); //Get the Menu details from entity and bind it in MenuModels list. FormsAuthentication.SetAuthCookie(_loginCredentials.Email, false); // set the formauthentication cookie // Session["LoginCredentials"] = _loginCredentials; // Bind the _logincredentials details to "LoginCredentials" session Session["MenuMaster"] = _menus; //Bind the _menus list to MenuMaster session Session["UserName"] = _loginCredentials.Email; return Redirect("/Home"); // return RedirectToAction("Index", "Home"); } else { TempData["Error"] = "You are Inactivated,Please contact to Administrator"; // Debug.WriteLine(FlattenException(e)); return Redirect("/Login"); } } // } catch (Exception ex) { TempData["Error"] = "User name or password incorrect"; // Debug.WriteLine(FlattenException(e)); return Redirect("/Login"); } TempData["Error"] = "User name or password incorrect"; return Redirect("/Login"); } public ActionResult Registeration(string fullname, string email, string password, string rpassword) { tbl_User row = new tbl_User(); string EncryptedPassword = new vt_Common().Encrypt(rpassword); try { row.User_Name = fullname; row.Email = email; row.User_Password = EncryptedPassword; var dt = new LHRLA.DAL.DataAccessClasses.UserDataAccess().AddUser(row); TempData["Error"] = "You registered sucessfully"; return RedirectToAction("Index", "Login"); } catch (Exception ex) { throw ex; } return RedirectToAction("Index", "Login"); } public ActionResult ForgotPasswordRecovery(string m_email) { try { var dt = new LHRLA.DAL.DataAccessClasses.UserDataAccess().CheckUserEmail(m_email).FirstOrDefault(); if (dt != null) { tbl_User row = new LHRLA.DAL.DataAccessClasses.UserDataAccess().GetUserbyID(Convert.ToInt32(dt.ID)).FirstOrDefault(); string decrypt = new vt_Common().Decrypt(row.User_Password); //string body = new EmailFormat().ResetEmailFormat1; //body = body.Replace("{{ResetEmail}}", decrypt); //bool isSend = vt_Common.EmailformatSendVisitor(m_email, "", "Forgot Password", body); TempData["ErrorForgot"] = "Password has been sent to your email."; TempData["ErrorForgot"] = "Email has been sent, please check"; return RedirectToAction("ForgotPassword", "Login"); } else { TempData["ErrorForgot"] = "Entered Email doesn't exists"; return RedirectToAction("ForgotPassword", "Login"); } } catch (Exception ex) { throw ex; } return RedirectToAction("ForgotPassword", "Login"); } public ActionResult Logout() { Session.Abandon(); Session.Clear(); Session.RemoveAll(); Session["User"] = null; Session["RoleID"] = null; Session["UserID"] = null; return Redirect("/Login"); } } //public ActionResult Index() //{ // if (ApplicationHelper.IsUserLogin()) // { // return RedirectToAction("Index", "Home"); // } // else // { // return RedirectToAction("Index", "Login"); // } //} /*[AllowAnonymous] public ActionResult Login(string returnUrl) { ViewBag.ReturnUrl = returnUrl; return View(); }*/ //[AllowAnonymous] //public ActionResult Login() //{ // if (ApplicationHelper.IsUserLogin()) // { // return RedirectToAction("Index", "Home"); // } // else // { // string CookieUserName = ApplicationHelper.GetCookie(ApplicationHelper.Cookie_UserName); // string CookiePassword = ApplicationHelper.GetCookie(ApplicationHelper.Cookie_User_Password); // if (!string.IsNullOrWhiteSpace(CookieUserName) && !string.IsNullOrWhiteSpace(CookiePassword)) // { // ViewBag.CookieUserName = CookieUserName; // ViewBag.CookiePassword = CookiePassword; // } // return View(); // } //} //[AllowAnonymous] //[HttpPost] //public JsonResult Login(string Email, string Password, string remember_me) //{ // ApplicationHelper.AjaxResponse AjaxResponse = new ApplicationHelper.AjaxResponse(); // AjaxResponse.Type = "M"; // AjaxResponse.Success = false; // AjaxResponse.Message = "Invalid credentials"; // try // { // if (!string.IsNullOrWhiteSpace(Email) && !string.IsNullOrWhiteSpace(Password)) // { // string LoginEncryptPasswordValue = vt_Common.Encrypt(Password); // // string decrypt = vt_Common.Decrypt(password); // var dt = new LHRLA.DAL.DataAccessClasses.UserDataAccess().CheckUser(Email, LoginEncryptPasswordValue); // //todo: check user status, i.e. active/inactive, subscription status etc. // ApplicationHelper.AddSession(ApplicationHelper.Session_User_Login, dt); // if (!string.IsNullOrWhiteSpace(remember_me)) // { // ApplicationHelper.AddCookie(ApplicationHelper.Cookie_UserName, Email); // ApplicationHelper.AddCookie(ApplicationHelper.Cookie_User_Password, Password); // } // else // { // ApplicationHelper.RemoveCookie(ApplicationHelper.Cookie_UserName); // ApplicationHelper.RemoveCookie(ApplicationHelper.Cookie_User_Password); // } // AjaxResponse.Success = true; // AjaxResponse.Type = "M-T"; // AjaxResponse.Message = "Logged-in successfully"; // //AjaxResponse.TargetURL = ApplicationHelper.ConvertToWebURL(Request.Url, "Home/" + ApplicationHelper.PageIndex); // AjaxResponse.TargetURL = "Home"; // } // else // {//invalid login attempt // AjaxResponse.Message = "Invalid credentails"; // } // return Json(AjaxResponse, "json"); // } // catch (Exception ex) // { // AjaxResponse.Message = ex.Message; // return Json(AjaxResponse, "json"); // } //} }
namespace GraphQLDynamic.Model { public record Relationship ( string Name, TypeDefinition RelationshipType, RelationshipCategory RelationshipCategory ); }
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace ControllerPage { public partial class FormProductselection : Form { public FormProductselection() { InitializeComponent(); } public string Productselection { get; set; } private void label1_Click(object sender, EventArgs e) { this.Close(); } private void button2_Click(object sender, EventArgs e) { this.Productselection = "Paddy"; this.DialogResult = DialogResult.OK; this.Close(); } private void button3_Click(object sender, EventArgs e) { this.Productselection = "Brown_Rice"; this.DialogResult = DialogResult.OK; this.Close(); } private void button4_Click(object sender, EventArgs e) { this.Productselection = "Wheat"; this.DialogResult = DialogResult.OK; this.Close(); } private void button5_Click(object sender, EventArgs e) { this.Productselection = "Barley"; this.DialogResult = DialogResult.OK; this.Close(); } private void button6_Click(object sender, EventArgs e) { this.Productselection = "Soy"; this.DialogResult = DialogResult.OK; this.Close(); } private void button7_Click(object sender, EventArgs e) { this.Productselection = "Corn"; this.DialogResult = DialogResult.OK; this.Close(); } private void button1_Click(object sender, EventArgs e) { this.Productselection = "Polished_Rice"; this.DialogResult = DialogResult.OK; this.Close(); } } }
namespace CpsExtension { /// <summary> /// Project capability constants. /// </summary> internal static class ProjectCapability { /// <summary> /// The capability that identifies what this extension does. /// See https://github.com/Microsoft/VSProjectSystem/blob/master/doc/overview/about_project_capabilities.md /// </summary> public const string CpsExtension = nameof(CpsExtension); } }
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Networking; using UnityEngine.SceneManagement; public class BaseLineManager : MonoBehaviour { public float BaseLineDuration = 120f; public bool StartTimerDone = false; bool BeginEndFade = false; float StartTimerLength = 10f; CanvasGroup CameraFadeCanvas; string sessionID; bool started; void Awake() { //*// //Loading parameters from the playerrefs. if (PlayerPrefs.HasKey ("Param_SessionID")) { sessionID = PlayerPrefs.GetString("Param_SessionID"); if (sessionID == "Session0") { BaseLineDuration = 360f; } else { BaseLineDuration = 120f; } started = false; //if (SingleUserSession) { Debug.Log( "single user session"); //} else { Debug.Log ("multi user session"); } } // Use this for initialization void Start () { if (PlayerPrefs.HasKey("Param_HostOrNot")) { if (PlayerPrefsX.GetBool("Param_HostOrNot")) { GameObject.Find("Network Manager").GetComponent<NetworkManager>().StartHost(); Debug.Log("Started host"); } else { GameObject.Find("Network Manager").GetComponent<NetworkManager>().StartClient(); Debug.Log("Started client"); } } } // Update is called once per frame void Update () { if (GameObject.FindGameObjectsWithTag("Player").Length > 1 && !started) { started = true; StartCoroutine("SessionTimer"); StartCoroutine("StartTimer"); CameraFadeCanvas = GameObject.Find("Main Camera").gameObject.GetComponent<CanvasGroup>(); StartCoroutine("FadeToClear", 0.15f); Debug.Log("started baseline"); } /* if (BeginEndFade) { StartCoroutine ("FadeToBlack", 0.15f); }*/ if (Input.GetKeyDown(KeyCode.F1)) { NetworkManager.singleton.StopHost(); NetworkManager.singleton.StopServer(); SceneManager.LoadScene(0); } if (Input.GetKeyDown(KeyCode.F2)) { NetworkManager.singleton.StopHost(); NetworkManager.singleton.StopServer(); SceneManager.LoadScene(1); } if (Input.GetKeyDown(KeyCode.F3)) { NetworkManager.singleton.StopHost(); NetworkManager.singleton.StopServer(); SceneManager.LoadScene(2); } if (Input.GetKeyDown(KeyCode.F4)) { NetworkManager.singleton.StopHost(); NetworkManager.singleton.StopServer(); SceneManager.LoadScene(3); } } IEnumerator SessionTimer() { //Debug.Log ("Session Timer Launched"); yield return new WaitForSeconds (BaseLineDuration - 3f); BeginEndFade = true; yield return new WaitForSeconds (3f); //Debug.Log ("return to main menu"); //NetworkManager nm = GameObject.Find("NetworkManager").GetComponent<NetworkManager>(); // NetworkManager.singleton.StopHost(); //NetworkManager.Shutdown(); if (sessionID == "Session0") { //Application.LoadLevel (0); NetworkManager.singleton.StopHost(); NetworkManager.singleton.StopServer(); SceneManager.LoadScene(0); } else { //Application.LoadLevel (1); string[] multiPlayerSessions = new string[] { "Session1", "Session2", "Session3", "Session4", "Session5", "Session6", "Session7", "Session8" }; if (PlayerPrefs.HasKey("Param_SessionID")) { string session = PlayerPrefs.GetString("Param_SessionID"); if (System.Array.IndexOf(multiPlayerSessions, session) > -1) { if (PlayerPrefs.HasKey("Param_HostOrNot")) { if (PlayerPrefsX.GetBool("Param_HostOrNot")) { while (GameObject.FindGameObjectsWithTag("Player").Length > 1) { yield return new WaitForSeconds(0.1f); } NetworkManager.singleton.StopHost(); NetworkManager.singleton.StopServer(); //GameObject.Find("Network Manager").GetComponent<NetworkManager>().StopHost(); //GameObject.Find("Network Manager").GetComponent<NetworkManager>().StopServer(); } else { NetworkManager.Shutdown(); yield return new WaitForSeconds(0.2f); } } } } SceneManager.LoadScene(2); } } IEnumerator StartTimer() { //Debug.Log ("Session Timer Launched"); yield return new WaitForSeconds(StartTimerLength); StartTimerDone = true; } public IEnumerator FadeToBlack(float speed) { /* while (CameraFadeCanvas.alpha < 1f) { CameraFadeCanvas.alpha += speed * Time.deltaTime; }*/ yield return null; } public IEnumerator FadeToClear(float speed) { /* while (CameraFadeCanvas.alpha > 0f) { CameraFadeCanvas.alpha -= speed * Time.deltaTime; yield return null; }*/ yield return null; Debug.Log ("Fading to Clear"); } }
namespace Tomelt.Roles.Events { public class UserAddedContext : UserRoleContext {} }
using UnityEngine; using System.Collections; public class HeadCtrlPlayer : MonoBehaviour { public PlayerBtState PlayerState; TweenColor HeadColor; TweenScale HeadScale; UISprite HeadSprite; bool IsChangeHead; bool IsHeadToSmall; public static HeadCtrlPlayer _InstanceP1; public static HeadCtrlPlayer GetInstanceP1() { return _InstanceP1; } public static HeadCtrlPlayer _InstanceP2; public static HeadCtrlPlayer GetInstanceP2() { return _InstanceP2; } // Use this for initialization void Awake() { switch(PlayerState) { case PlayerBtState.PLAYER_1: _InstanceP1 = this; break; case PlayerBtState.PLAYER_2: _InstanceP2 = this; break; } HeadColor = GetComponent<TweenColor>(); HeadScale = GetComponent<TweenScale>(); HeadSprite = GetComponent<UISprite>(); //Invoke("TestDaleyInitChangeHeadUI", 3f); //test } void TestDaleyInitChangeHeadUI() { InvokeRepeating("InitChangeHeadUI", 0f, 0.2f); //InitChangeHeadUI(); } public void InitChangeHeadUI() { if (IsChangeHead) { return; } IsChangeHead = true; IsHeadToSmall = false; MakeHeadToBig(); } void MakeHeadToBig() { if (!IsChangeHead) { return; } if (IsHeadToSmall) { EventDelegate.Remove(HeadScale.onFinished, delegate{ MakeHeadToBig(); }); IsHeadToSmall = false; IsChangeHead = false; return; } //Debug.Log("********************"); HeadScale.from = new Vector3(1f, 1f, 1f); HeadScale.to = new Vector3(1.3f, 1.3f, 1f); EventDelegate.Add(HeadScale.onFinished, delegate{ MakeHeadToSmall(); }); HeadScale.enabled = true; HeadScale.PlayForward(); } void MakeHeadToSmall() { IsHeadToSmall = true; EventDelegate.Add(HeadScale.onFinished, delegate{ MakeHeadToBig(); }); HeadScale.enabled = true; HeadScale.PlayReverse(); } public void PlayColor() { HeadColor.enabled = true; HeadColor.ResetToBeginning(); HeadColor.PlayForward(); } public void StopColor() { HeadColor.enabled = false; HeadColor.ResetToBeginning(); HeadSprite.color = new Color(255f, 255f, 255f); //old color } public void SetHeadColor() { HeadColor.enabled = false; HeadColor.ResetToBeginning(); HeadSprite.color = new Color(0f, 0f, 0f); //new color } public void SetPlayerHeadIsActive(bool isActive) { if (gameObject.activeSelf != isActive) { gameObject.SetActive(isActive); } } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Data.SqlClient; namespace ProductForm { public class AppConfig { private static SqlConnection con = new SqlConnection(); public static string ConnectionString = @"server=.\SQLEXPRESS;database=TSQLFundamentals2008;uid=sa;pwd=phuc@se61834"; public static SqlConnection GetConnection() { con.ConnectionString = ConnectionString; return con; } } }
using System; namespace Week2e { class MainClass { public static void Main (string[] args) { int score = 49; // If statements are used to check if a result is true or false if (score < 50) Console.WriteLine ("Oh no you're failing!"); if (score == 0) Console.WriteLine ("You are the worst"); else Console.WriteLine ("You are not on 0 yay"); string colour = Console.ReadLine (); if (colour == "blue") Console.WriteLine ("Blue is a terrible colour"); else if (colour == "green") Console.WriteLine ("Green is a great colour"); else if (colour == "red") Console.WriteLine ("Red is an okay colour"); else Console.WriteLine ("There should be no other colours"); string user = "test"; string pass = "p@ssword"; string userInput = Console.ReadLine (); string passInput = Console.ReadLine (); if (userInput == user && passInput == pass) Console.WriteLine ("Login Success"); else Console.WriteLine ("Login Failed"); int scoreInput = -1; while (scoreInput < 0 || scoreInput > 100) { Console.WriteLine ("Please enter a number between 0 and 100"); scoreInput = int.Parse(Console.ReadLine()); } if (scoreInput < 50) Console.WriteLine ("Fail"); else if (scoreInput < 59) Console.WriteLine ("Pass"); else if (scoreInput < 69) Console.WriteLine ("Credit"); else if (scoreInput < 79) Console.WriteLine ("Distinction"); else Console.WriteLine("High Distinction"); Console.ReadLine (); //pause } } }
using System.Collections; using System.IO; using System.Collections.Generic; using UnityEngine; //A script by Michael O'Connell, extended by Benjamin Cohen public class DialogueTriggerV2 : MonoBehaviour { //Attach this script to an empty gameobject with a 2D collider set to trigger DialogueManagerV2 manager; public TextAsset TextFileAsset; // your imported text file for your NPC private Queue<string> dialogue = new Queue<string>(); // stores the dialogue (Great Performance!) public float waitTime = 0.5f; // lag time for advancing dialogue so you can actually read it private float nextTime = 0f; // used with waitTime to create a timer system public bool singleUseDialogue = false; [HideInInspector] public bool hasBeenUsed = false; bool inArea = false; // public bool useCollision; // unused for now private void Start() { manager = FindObjectOfType<DialogueManagerV2>(); } private void Update() { if (!hasBeenUsed && inArea && Input.GetKeyDown(KeyCode.Return) && nextTime < Time.timeSinceLevelLoad) { //Debug.Log("Advance"); nextTime = Time.timeSinceLevelLoad + waitTime; manager.AdvanceDialogue(); } } /* Called when you want to start dialogue */ void TriggerDialogue() { ReadTextFile(); // loads in the text file manager.StartDialogue(dialogue); // Accesses Dialogue Manager and Starts Dialogue } /* loads in your text file */ private void ReadTextFile() { string txt = TextFileAsset.text; string[] lines = txt.Split(System.Environment.NewLine.ToCharArray()); // Split dialogue lines by newline SearchForTags(lines); dialogue.Enqueue("EndQueue"); } /*Version 2: Introduces the ability to have multiple tags on a single line! Allows for more functions to be programmed * to unique text strings or general functions. */ private void SearchForTags(string[] lines) { foreach (string line in lines) // for every line of dialogue { if (!string.IsNullOrEmpty(line))// ignore empty lines of dialogue { if (line.StartsWith("[")) // e.g [NAME=Michael] Hello, my name is Michael { string special = line.Substring(0, line.IndexOf(']') + 1); // special = [NAME=Michael] string curr = line.Substring(line.IndexOf(']') + 1); // curr = Hello, ... dialogue.Enqueue(special); // adds to the dialogue to be printed string[] remainder = curr.Split(System.Environment.NewLine.ToCharArray()); SearchForTags(remainder); //dialogue.Enqueue(curr); } else { dialogue.Enqueue(line); // adds to the dialogue to be printed } } } } private void OnTriggerEnter2D(Collider2D other) { if (other.gameObject.tag == "Player" && !hasBeenUsed) { manager.currentTrigger = this; TriggerDialogue(); //Debug.Log("Collision"); } } private void OnTriggerStay2D(Collider2D other) { if (other.gameObject.tag == "Player") { inArea = true; } } private void OnTriggerExit2D(Collider2D other) { if (other.gameObject.tag == "Player") { manager.EndDialogue(); } inArea = false; } }
using System; using System.Collections.Generic; using System.Linq; namespace Euler_Logic.Problems { public class Problem185 : ProblemBase { private List<List<ulong>> _answers = new List<List<ulong>>(); private List<Guess> _guess = new List<Guess>(); private Dictionary<int, List<ulong>> _possibilities = new Dictionary<int, List<ulong>>(); private Dictionary<int, ulong> _numToBit = new Dictionary<int, ulong>(); private ulong _currentPossibility; private bool _answerFound = false; public override string ProblemName { get { return "185: Number Mind"; } } /* This is a trial by guess using bitwise notation to represent the possibilities of each digit. If the first sequence has one correct digit, then assume the first digit is correct. This means none of the other digits are correct. Move on to the second sequence and do the same. Continue until a digit has been removed of all possibilities (in which case we backtrack a guess and try another), or we reach the last sequence and find the solution. Not very efficient, takes about 10 minutes to run. Oh well. */ public override string GetAnswer() { InitializeActual(); BuildNumToBit(); BuildPossibilities(); InitializeAnswers(); PerformGuessing(0); return Answer(); } private string Answer() { string answer = ""; foreach (ulong digit in _answers.Last()) { answer += Math.Log(digit, 2); } return answer; } private int _highestIndex; private void PerformGuessing(int guessIndex) { if (guessIndex > _highestIndex) { _highestIndex = guessIndex; } if (guessIndex >= _guess.Count) { _answerFound = true; } else { var guess = _guess[guessIndex]; if (guess.Correct != 0) { PerformGuessingLookForPossibilities(guessIndex, guess); } else { PerformGuessingSetAllNotCorrect(guessIndex, guess); } } } private void PerformGuessingLookForPossibilities(int guessIndex, Guess guess) { foreach (var possibility in _possibilities[guess.Correct]) { ResetAnswer(guessIndex + 1); bool keepGuessing = true; for (int digitIndex = 0; digitIndex < guess.Digits.Count; digitIndex++) { ulong bit = _numToBit[guess.Digits[digitIndex]]; bool hasBit = (_answers[guessIndex + 1][digitIndex] & bit) > 0; if ((possibility & _numToBit[digitIndex]) > 0) { if (hasBit) { _answers[guessIndex + 1][digitIndex] = bit; } else { keepGuessing = false; break; } } else if (hasBit) { _answers[guessIndex + 1][digitIndex] -= bit; if (_answers[guessIndex + 1][digitIndex] == 0) { keepGuessing = false; } } } if (keepGuessing) { _currentPossibility += possibility; PerformGuessing(guessIndex + 1); if (_answerFound) { break; } _currentPossibility -= possibility; } } } private void PerformGuessingSetAllNotCorrect(int guessIndex, Guess guess) { ResetAnswer(guessIndex + 1); bool keepGuessing = true; for (int digitIndex = 0; digitIndex < guess.Digits.Count; digitIndex++) { ulong bit = _numToBit[guess.Digits[digitIndex]]; bool hasBit = (_answers[guessIndex + 1][digitIndex] & bit) > 0; bool previouslySet = (_numToBit[digitIndex] & _currentPossibility) > 0; if (hasBit) { if (previouslySet) { keepGuessing = false; break; } _answers[guessIndex + 1][digitIndex] -= bit; if (_answers[guessIndex + 1][digitIndex] == 0) { keepGuessing = false; break; } } } if (keepGuessing) { PerformGuessing(guessIndex + 1); } } private void ResetAnswer(int answerIndex) { for (int digitIndex = 0; digitIndex < _answers[0].Count; digitIndex++) { _answers[answerIndex][digitIndex] = _answers[answerIndex - 1][digitIndex]; } } private void InitializeAnswers() { List<ulong> digits = new List<ulong>(); for (int index = 0; index < _guess[0].Digits.Count; index++) { digits.Add(1023); } _guess.ForEach(x => _answers.Add(new List<ulong>(digits))); _answers.Add(new List<ulong>(digits)); } private void BuildNumToBit() { for (int num = 0; num <= 16; num++) { _numToBit.Add(num, (ulong)Math.Pow(2, num)); } } private void BuildPossibilities() { _possibilities.Add(0, new List<ulong>()); BuildPossibilitesOnes(); BuildPossibilitiesMore(2); BuildPossibilitiesMore(3); } private void BuildPossibilitesOnes() { List<ulong> ones = new List<ulong>(); for (int countIndex = 0; countIndex < _guess[0].Digits.Count; countIndex++) { ones.Add(_numToBit[countIndex]); } _possibilities.Add(1, ones); } private void BuildPossibilitiesMore(int count) { List<ulong> more = new List<ulong>(); foreach (var one in _possibilities[count - 1]) { for (int countIndex = 0; countIndex < _guess[0].Digits.Count; countIndex++) { AddBit(more, one, _numToBit[countIndex]); } } _possibilities.Add(count, more); } private void AddBit(List<ulong> current, ulong bits, ulong bitToAdd) { if ((bits & bitToAdd) == 0 && bitToAdd > bits) { current.Add(bitToAdd + bits); } } private void InitializeTest() { _guess.Add(new Guess() { Correct = 2, Digits = new List<int>() { 9, 0, 3, 4, 2 } }); _guess.Add(new Guess() { Correct = 0, Digits = new List<int>() { 7, 0, 7, 9, 4 } }); _guess.Add(new Guess() { Correct = 2, Digits = new List<int>() { 3, 9, 4, 5, 8 } }); _guess.Add(new Guess() { Correct = 1, Digits = new List<int>() { 3, 4, 1, 0, 9 } }); _guess.Add(new Guess() { Correct = 2, Digits = new List<int>() { 5, 1, 5, 4, 5 } }); _guess.Add(new Guess() { Correct = 1, Digits = new List<int>() { 1, 2, 5, 3, 1 } }); _guess = _guess.OrderBy(x => x.Correct).ToList(); } private void InitializeActual() { _guess.Add(new Guess() { Correct = 2, Digits = new List<int>() { 5, 6, 1, 6, 1, 8, 5, 6, 5, 0, 5, 1, 8, 2, 9, 3 } }); _guess.Add(new Guess() { Correct = 1, Digits = new List<int>() { 3, 8, 4, 7, 4, 3, 9, 6, 4, 7, 2, 9, 3, 0, 4, 7 } }); _guess.Add(new Guess() { Correct = 3, Digits = new List<int>() { 5, 8, 5, 5, 4, 6, 2, 9, 4, 0, 8, 1, 0, 5, 8, 7 } }); _guess.Add(new Guess() { Correct = 3, Digits = new List<int>() { 9, 7, 4, 2, 8, 5, 5, 5, 0, 7, 0, 6, 8, 3, 5, 3 } }); _guess.Add(new Guess() { Correct = 3, Digits = new List<int>() { 4, 2, 9, 6, 8, 4, 9, 6, 4, 3, 6, 0, 7, 5, 4, 3 } }); _guess.Add(new Guess() { Correct = 1, Digits = new List<int>() { 3, 1, 7, 4, 2, 4, 8, 4, 3, 9, 4, 6, 5, 8, 5, 8 } }); _guess.Add(new Guess() { Correct = 2, Digits = new List<int>() { 4, 5, 1, 3, 5, 5, 9, 0, 9, 4, 1, 4, 6, 1, 1, 7 } }); _guess.Add(new Guess() { Correct = 3, Digits = new List<int>() { 7, 8, 9, 0, 9, 7, 1, 5, 4, 8, 9, 0, 8, 0, 6, 7 } }); _guess.Add(new Guess() { Correct = 1, Digits = new List<int>() { 8, 1, 5, 7, 3, 5, 6, 3, 4, 4, 1, 1, 8, 4, 8, 3 } }); _guess.Add(new Guess() { Correct = 2, Digits = new List<int>() { 2, 6, 1, 5, 2, 5, 0, 7, 4, 4, 3, 8, 6, 8, 9, 9 } }); _guess.Add(new Guess() { Correct = 3, Digits = new List<int>() { 8, 6, 9, 0, 0, 9, 5, 8, 5, 1, 5, 2, 6, 2, 5, 4 } }); _guess.Add(new Guess() { Correct = 1, Digits = new List<int>() { 6, 3, 7, 5, 7, 1, 1, 9, 1, 5, 0, 7, 7, 0, 5, 0 } }); _guess.Add(new Guess() { Correct = 1, Digits = new List<int>() { 6, 9, 1, 3, 8, 5, 9, 1, 7, 3, 1, 2, 1, 3, 6, 0 } }); _guess.Add(new Guess() { Correct = 2, Digits = new List<int>() { 6, 4, 4, 2, 8, 8, 9, 0, 5, 5, 0, 4, 2, 7, 6, 8 } }); _guess.Add(new Guess() { Correct = 0, Digits = new List<int>() { 2, 3, 2, 1, 3, 8, 6, 1, 0, 4, 3, 0, 3, 8, 4, 5 } }); _guess.Add(new Guess() { Correct = 2, Digits = new List<int>() { 2, 3, 2, 6, 5, 0, 9, 4, 7, 1, 2, 7, 1, 4, 4, 8 } }); _guess.Add(new Guess() { Correct = 2, Digits = new List<int>() { 5, 2, 5, 1, 5, 8, 3, 3, 7, 9, 6, 4, 4, 3, 2, 2 } }); _guess.Add(new Guess() { Correct = 3, Digits = new List<int>() { 1, 7, 4, 8, 2, 7, 0, 4, 7, 6, 7, 5, 8, 2, 7, 6 } }); _guess.Add(new Guess() { Correct = 1, Digits = new List<int>() { 4, 8, 9, 5, 7, 2, 2, 6, 5, 2, 1, 9, 0, 3, 0, 6 } }); _guess.Add(new Guess() { Correct = 3, Digits = new List<int>() { 3, 0, 4, 1, 6, 3, 1, 1, 1, 7, 2, 2, 4, 6, 3, 5 } }); _guess.Add(new Guess() { Correct = 3, Digits = new List<int>() { 1, 8, 4, 1, 2, 3, 6, 4, 5, 4, 3, 2, 4, 5, 8, 9 } }); _guess.Add(new Guess() { Correct = 2, Digits = new List<int>() { 2, 6, 5, 9, 8, 6, 2, 6, 3, 7, 3, 1, 6, 8, 6, 7 } }); _guess = _guess.OrderBy(x => x.Correct).ToList(); } private class Guess { public List<int> Digits { get; set; } public int Correct { get; set; } } } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using Orders.Models; using RabbitMQ.Client; using RabbitMQ.Client.Events; namespace Orders { [Route("api/[controller]")] [ApiController] public class OrderController : ControllerBase { private readonly OrdersContext _context; public OrderController(OrdersContext context) { _context = context; } // GET: api/Order [HttpGet] public async Task<ActionResult<IEnumerable<Order>>> GetOrders() { System.Diagnostics.Debug.WriteLine("Startiing consumer"); var factory = new ConnectionFactory() { HostName = "localhost" }; using (var connection = factory.CreateConnection()) using (var channel = connection.CreateModel()) { channel.QueueDeclare(queue: "carts", durable: true, exclusive: false, autoDelete: false, arguments: null); var consumer = new AsyncEventingBasicConsumer(channel); consumer.Received += async (model, ea) => { System.Diagnostics.Debug.WriteLine("Entering", ea.Body); var body = ea.Body.ToArray(); System.Diagnostics.Debug.WriteLine(body); var message = Encoding.UTF8.GetString(body); System.Diagnostics.Debug.WriteLine(" [x] Received {0}", message); await Task.Yield(); }; System.Diagnostics.Debug.WriteLine("Starting consumer"); channel.BasicConsume(queue: "carts", autoAck: true, consumer: consumer); } return await _context.Orders.ToListAsync(); } // GET: api/Order/5 [HttpGet("{id}")] public async Task<ActionResult<Order>> GetOrder(int id) { var order = await _context.Orders.FindAsync(id); if (order == null) { return NotFound(); } return order; } // PUT: api/Order/5 // To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754 [HttpPut("{id}")] public async Task<IActionResult> PutOrder(int id, Order order) { if (id != order.Id) { return BadRequest(); } _context.Entry(order).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!OrderExists(id)) { return NotFound(); } else { throw; } } return NoContent(); } // POST: api/Order // To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754 [HttpPost] public async Task<ActionResult<Order>> PostOrder(Order order) { _context.Orders.Add(order); await _context.SaveChangesAsync(); return CreatedAtAction("GetOrder", new { id = order.Id }, order); } // DELETE: api/Order/5 [HttpDelete("{id}")] public async Task<IActionResult> DeleteOrder(int id) { var order = await _context.Orders.FindAsync(id); if (order == null) { return NotFound(); } _context.Orders.Remove(order); await _context.SaveChangesAsync(); return NoContent(); } private bool OrderExists(int id) { return _context.Orders.Any(e => e.Id == id); } } }
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using CountryProject.MODEL.ViewModel; using CountryProject.BLL; namespace CountryProject.UI { public partial class View_Countrys : System.Web.UI.Page { ViewCountryManager viewCountryManager = new ViewCountryManager(); protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { LoadCountry(); } } private void LoadCountry() { List<ViewCountry> viewcountryList =viewCountryManager.ViewCountyGetAll(viewCountrynameTextBox.Text); viewCountryGridView.DataSource = viewcountryList; viewCountryGridView.DataBind(); } protected void viewSearchButton_Click(object sender, EventArgs e) { LoadCountry(); } } }
using UnityEngine; using System.Collections; public class GridMouseOver : MonoBehaviour { }
using System; using System.Collections.Generic; using System.Collections; using System.Collections.Specialized; namespace LeetCodeTests { public abstract class Problem_0033 { /* Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2). You are given a target value to search.If found in the array return its index, otherwise return -1. You may assume no duplicate exists in the array. */ public static void Test() { Solution sol = new Solution(); /* var input = new int[] { 2, 7, 11, 15 }; Console.WriteLine($"Input array: {string.Join(", ", input)}"); */ var nums = new int[] { 4, 5, 6, 7, 0, 1, 2 }; var target = 8; Console.WriteLine($"Find '{target}' in array '{Utils.PrintArray(nums)}' -> '{sol.Search(nums, target)}' waits (-1)"); nums = new int[] { 6, 7, 0, 1, 2, 4, 5 }; target = 7; Console.WriteLine($"Find '{target}' in array '{Utils.PrintArray(nums)}' -> '{sol.Search(nums, target)}' waits (1)"); nums = new int[] { 4, 5, 6, 7, 0, 1, 2 }; target = 1; Console.WriteLine($"Find '{target}' in array '{Utils.PrintArray(nums)}' -> '{sol.Search(nums, target)}' waits (5)"); target = 2; Console.WriteLine($"Find '{target}' in array '{Utils.PrintArray(nums)}' -> '{sol.Search(nums, target)}' waits (6)"); target = 7; Console.WriteLine($"Find '{target}' in array '{Utils.PrintArray(nums)}' -> '{sol.Search(nums, target)}' waits (3)"); target = 4; Console.WriteLine($"Find '{target}' in array '{Utils.PrintArray(nums)}' -> '{sol.Search(nums, target)}' waits (0)"); nums = new int[] { 0,1, 2,4, 5, 6, 7 }; target = 0; Console.WriteLine($"Find '{target}' in array '{Utils.PrintArray(nums)}' -> '{sol.Search(nums, target)}' waits (0)"); target = 2; Console.WriteLine($"Find '{target}' in array '{Utils.PrintArray(nums)}' -> '{sol.Search(nums, target)}' waits (2)"); target = 6; Console.WriteLine($"Find '{target}' in array '{Utils.PrintArray(nums)}' -> '{sol.Search(nums, target)}' waits (5)"); nums = new int[] { 7, 0,1, 2,4, 5, 6}; target = 0; Console.WriteLine($"Find '{target}' in array '{Utils.PrintArray(nums)}' -> '{sol.Search(nums, target)}' waits (1)"); target = 7; Console.WriteLine($"Find '{target}' in array '{Utils.PrintArray(nums)}' -> '{sol.Search(nums, target)}' waits (0)"); target = 6; Console.WriteLine($"Find '{target}' in array '{Utils.PrintArray(nums)}' -> '{sol.Search(nums, target)}' waits (6)"); nums = new int[] { 1, 2, 4, 5, 6, 7, 0 }; target = 0; Console.WriteLine($"Find '{target}' in array '{Utils.PrintArray(nums)}' -> '{sol.Search(nums, target)}' waits (6)"); target = 7; Console.WriteLine($"Find '{target}' in array '{Utils.PrintArray(nums)}' -> '{sol.Search(nums, target)}' waits (5)"); target = 2; Console.WriteLine($"Find '{target}' in array '{Utils.PrintArray(nums)}' -> '{sol.Search(nums, target)}' waits (1)"); /* Submission Result: Wrong Answer Input:[1] 1 Output:-1 Expected:0 */ nums = new int[] { 1}; target = 1; Console.WriteLine($"Find '{target}' in array '{Utils.PrintArray(nums)}' -> '{sol.Search(nums, target)}' waits (0)"); } public class Solution { public int Search(int[] nums, int target) { //dihotomia if ((nums == null) || (nums.Length == 0)) return -1; int left = 0; int right = nums.Length - 1; int mid; while (left <= right) { if (nums[left] == target) return left; if (nums[right] == target) return right; mid = left + (right - left) / 2; if (nums[mid] == target) return mid; if (mid == left) return -1; // stop searching // A B C , a= nums[left] , b = nums[mid] , c = nums[mid]; // A<B<C array is ordered - look in suitable part // A<B>C left part is ordered OK, right - mixed // A>B>C impossible // A>B<C left part is mixed, right - ordered OK // left part is ordered if (nums[left] < nums[mid]) { if ((nums[left] < target) && (target < nums[mid])) right = mid; else left = mid; } // right part is ordered else if (nums[left] > nums[mid]) { if ((nums[mid] < target) && (target < nums[right])) left = mid; else right = mid; } #region try 1 /* if ((nums[left] < nums[mid]) && (nums[left] < target) && (nums[mid] > target)) right = mid; // search in left part else if ((nums[left] < nums[mid]) && (nums[mid] < target)) left = mid; else if ((nums[left] > nums[mid]) && (nums[mid] < target) && (nums[right] > target)) left = mid; else //if ((nums[left] > nums[mid]) && (nums[right] < target)) right = mid; */ #endregion }// while return -1; } } }//public abstract class Problem_ }
using System; using System.Collections.Generic; using Apv.AV.Services.Data.Models.FC; using System.Linq; //using Apv.AV.Services.Data.FC; using Microsoft.EntityFrameworkCore; using Apv.AV.Common; namespace Apv.AV.Services.Data.FC { public class ApvFCRepository : IApvFCRepository { ApvAppContext _context; public ApvFCRepository(ApvAppContext context) { _context = context; } public AppVersion getAppVersion(string platform) { return _context.Versions.Where(a => a.platform == platform).FirstOrDefault();; } public ICollection<AppVersion> getAllAppVersions() { return _context.Versions.ToList(); } public ICollection<CarModel> getCarModels(string countryCode, string companyId, string modelClassId, string carModelId) { return _context .CarModels .Include(c=>c.carModelClass) .ToList(); } public ICollection<FinancialProduct> getFinancialProductsByCarModel(string countryCode, string companyId, string carModelId) { return _context.FinancialProducts. Where(fp => fp.carModels. Where(cm=>cm.carModel.carModelId==carModelId).Any() ).ToList(); } } }
using Company.Master2.xmlmodel; using Microsoft.master2.assembly; using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; namespace Microsoft.master2.model { class ModelUtils { private Type currentClass; public ModelUtils(Type currentClass) { this.currentClass = currentClass; } public ArrayList getModelForCurrentAssembly() { ArrayList cSharpClassesList = new ArrayList(); //if (currentClass == null) //{ // return new ArrayList(); //} // Type[] types = Assembly.GetAssembly(currentClass).GetTypes(); AssemblyInstance ai = new AssemblyInstance(); Type[] types = ai.Assembly.GetTypes(); foreach (Type type in types) { CSharpClass cSharpClass = new CSharpClass(); cSharpClass.Name = type.Name; cSharpClass.Parent = type.BaseType.Name; Type[] currentTypeInterfaces = type.GetInterfaces(); foreach (Type currentInterface in currentTypeInterfaces) { cSharpClass.Interfaces.Add(currentInterface.Name); } MethodInfo[] methodInfos = type.GetMethods(); foreach (MethodInfo methodInfo in methodInfos) { if (methodInfo.DeclaringType.Name == cSharpClass.Name)//check if the method from the current class and not from ingherited { CSharpMethod cSharpMethod = new CSharpMethod(); cSharpMethod.Name = methodInfo.Name; cSharpMethod.IncomingCalls = drillMethodForIncomingClass(type, methodInfo); cSharpMethod.OutgoingCalls = drillMethodForOutgoingClass(methodInfo, cSharpClass.GetType()); cSharpClass.Methods.Add(cSharpMethod); } } CSharpClass.calculateEdges(cSharpClass); PropertyInfo[] propertieInfos = type.GetProperties(); FieldInfo[] fieldInfos = type.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); foreach (FieldInfo fieldInfo in fieldInfos) { if (fieldInfo.DeclaringType.Name == cSharpClass.Name)//check if the method from the current class and not from ingherited { CSharpField cSharpField = new CSharpField(); cSharpField.Name = fieldInfo.Name; cSharpClass.Fields.Add(cSharpField); } } cSharpClassesList.Add(cSharpClass); } return cSharpClassesList; } private ArrayList drillMethodForIncomingClass(Type currentType, MethodInfo method) { ArrayList result = new ArrayList(); ArrayList cSharpClassesList = new ArrayList(); // Type[] types = Assembly.GetAssembly(currentClass).GetTypes(); AssemblyInstance ai = new AssemblyInstance(); Type[] types = ai.Assembly.GetTypes(); foreach (Type type in types) { MethodInfo[] methodInfos = type.GetMethods(); foreach (MethodInfo methodInfo in methodInfos) { if (methodInfo.DeclaringType.Name == type.Name)//check if the method from the current class and not from ingherited { ArrayList methodCalls = MethodCalls.checkCallsForIncomingCalls(methodInfo, type); foreach (MethodTypeCall incomingCall in methodCalls) { if (incomingCall.ClassName + "." + incomingCall.Name == currentType.FullName + "." + method.Name) // if (incomingCall.Name == method.Name) { IncomingCall incomingCallToMethod = new IncomingCall(); incomingCallToMethod.Name = methodInfo.Name; incomingCallToMethod.ClassName = type.Name; result.Add(incomingCallToMethod); } } } } } return result; } private ArrayList drillMethodForOutgoingClass(MethodInfo methodInfo, Type type) { ArrayList methodCalls = MethodCalls.checkCallsForOutgoingCalls(methodInfo, type); return methodCalls; } } }
using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Net.Http; using System.Web.Http; using FedericoWebApi.Models; namespace FedericoWebApi.Controllers { public class ValuesController : ApiController { DomainModel dm = new DomainModel(); // GET api/values public IEnumerable<Prodotto> Get() { return dm.SearchByDescrizione(""); } // GET api/values/5 public Prodotto Get(int id) { return dm.SearchByCode(id); } // POST api/values public void Post([FromBody]Prodotto value) { dm.AddProdotto(value); } // PUT api/values/5 public void Put(int id,[FromBody]string value) { } // DELETE api/values/5 public void Delete(int id) { dm.DelProdotto(id); } } }
using UnityEditor; using System; using UnityEngine; [CustomEditor(typeof(BaseSpell))] [CanEditMultipleObjects] public class BaseSpellEditor : PolymorphicFieldEditor { public override void OnInspectorGUI() { DrawDefaultInspector(); if (serializedObject.FindProperty("warhead").hasMultipleDifferentValues) { return; } BaseSpell spell = (BaseSpell)target; spell.warhead = DrawSelector(spell.warhead); } protected override Type GetBaseType() { return typeof(Warhead); } protected override string PathForTarget() { return "Assets/Resources/Database/Warheads/" + ((BaseSpell)target).name + "_warhead.asset"; } }
using Alabo.Cache; using Alabo.Dependency; using Alabo.Domains.Entities; using Alabo.Domains.Enums; using Alabo.Domains.Repositories; using Alabo.Domains.Services.Add; using Alabo.Domains.Services.Attach; using Alabo.Domains.Services.Bulk; using Alabo.Domains.Services.ById; using Alabo.Domains.Services.Cache; using Alabo.Domains.Services.Column; using Alabo.Domains.Services.Count; using Alabo.Domains.Services.Delete; using Alabo.Domains.Services.Dictionary; using Alabo.Domains.Services.Distinct; using Alabo.Domains.Services.Exist; using Alabo.Domains.Services.List; using Alabo.Domains.Services.Max; using Alabo.Domains.Services.Page; using Alabo.Domains.Services.Random; using Alabo.Domains.Services.Report; using Alabo.Domains.Services.Save; using Alabo.Domains.Services.Single; using Alabo.Domains.Services.Sql; using Alabo.Domains.Services.Time; using Alabo.Domains.Services.Tree; using Alabo.Domains.Services.Update; using Alabo.Domains.Services.View; namespace Alabo.Domains.Services { /// <summary> /// 应用服务 /// </summary> public interface IService : IScopeDependency { /// <summary> /// 缓存 /// </summary> IObjectCache ObjectCache { get; } /// <summary> /// 数据仓储 /// </summary> /// <typeparam name="TRepository"></typeparam> TRepository Repository<TRepository>() where TRepository : IRepository; /// <summary> /// 获取服务 /// </summary> /// <typeparam name="TService"></typeparam> TService Resolve<TService>() where TService : IService; } /// <summary> /// 实体服务接口 /// </summary> /// <typeparam name="TEntity">实体</typeparam> /// <typeparam name="TKey">主键类型</typeparam> public interface IService<TEntity, TKey> : IService, IUpdate<TEntity, TKey>, IUpdateAsync<TEntity, TKey>, IViewBase<TEntity, TKey>, ITreeAsync<TEntity, TKey>, ITree<TEntity, TKey>, ITime<TEntity, TKey>, IReportStore<TEntity, TKey>, INativeAsync<TEntity, TKey>, INative<TEntity, TKey>, ISingle<TEntity, TKey>, ISingleAsync<TEntity, TKey>, ISaveAsync<TEntity, TKey>, ISave<TEntity, TKey>, IRandomAsync<TEntity, TKey>, IRandom<TEntity, TKey>, IGetPage<TEntity, TKey>, IGetPageAsync<TEntity, TKey>, IMax<TEntity, TKey>, IMaxAsync<TEntity, TKey>, IGetList<TEntity, TKey>, IGetListAsync<TEntity, TKey>, IExistAsync<TEntity, TKey>, IExist<TEntity, TKey>, IDistinct<TEntity, TKey>, IDistinctAsync<TEntity, TKey>, IDictionaryService<TEntity, TKey>, IDictionaryServiceAsync<TEntity, TKey>, IDeleteAsync<TEntity, TKey>, IDelete<TEntity, TKey>, ICountAsync<TEntity, TKey>, ICount<TEntity, TKey>, IColumn<TEntity, TKey>, IColumnAsync<TEntity, TKey>, ICache<TEntity, TKey>, ICacheAsync<TEntity, TKey>, IGetByIdAsync<TEntity, TKey>, IGetById<TEntity, TKey>, IBulkAsync<TEntity, TKey>, IBulk<TEntity, TKey>, IAddAsync<TEntity, TKey>, IAdd<TEntity, TKey>, IAttach<TEntity, TKey> where TEntity : class, IAggregateRoot<TEntity, TKey> { /// <summary> /// 日志记录 /// </summary> /// <param name="content">日志内容,内容不能为空</param> /// <param name="level">日志级别</param> void Log(string content, LogsLevel level = LogsLevel.Information); } }
using System; using System.Collections.Generic; using System.Linq; namespace Spool.Harlowe { partial class BuiltInMacros { public BuiltInMacros(Context context) => Context = context; public Context Context { get; } } }
using GraphicalEditorServer.DTO; using Model.Users; namespace GraphicalEditorServer.Mappers { public class DoctorMapper { public static DoctorDTO DoctorToDoctorDTO(Doctor doctor) { DoctorDTO doctorDTO = new DoctorDTO(); doctorDTO.Name = doctor.Name; doctorDTO.Surname = doctor.Surname; doctorDTO.Jmbg = doctor.Jmbg; return doctorDTO; } public static Doctor DoctorDTOToDoctor(DoctorDTO doctorDTO) { Doctor doctor = new Doctor(); doctor.Name = doctorDTO.Name; doctor.Surname = doctorDTO.Surname; doctor.Jmbg = doctorDTO.Jmbg; return doctor; } } }
using Android.Content; using ProgressBarSlider; using ProgressBarSlider.Droid; using Xamarin.Forms; using Xamarin.Forms.Platform.Android; [assembly: ExportRenderer(typeof(CustomProgressBar), typeof(CustomProgressBarRenderer))] namespace ProgressBarSlider.Droid { public class CustomProgressBarRenderer : ProgressBarRenderer { protected override void OnElementChanged(ElementChangedEventArgs<Xamarin.Forms.ProgressBar> e) { base.OnElementChanged(e); if (Control != null) { var progressBar = Control as Android.Widget.ProgressBar; var draw = Resources.GetDrawable(Resource.Drawable.bar_color); progressBar.ProgressDrawable = draw; } } public CustomProgressBarRenderer(Context context) : base(context) { } } }
//Written by skidz tweak using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Timers; using Aurora.Framework; using OpenMetaverse; using OpenMetaverse.StructuredData; using Aurora.Framework.Services; using Aurora.Framework.Modules; using Aurora.Framework.Utilities; namespace Simple.Currency { class GiveStipends { private readonly Timer taskTimer = new Timer(); private readonly bool m_enabled = false; private SimpleCurrencyConfig m_options; readonly IScheduleService m_scheduler; private readonly IRegistryCore m_registry; private readonly SimpleCurrencyConnector m_currencyService; public GiveStipends(SimpleCurrencyConfig options, IRegistryCore registry, SimpleCurrencyConnector dustCurrencyService) { m_enabled = options.GiveStipends; if (!m_enabled) return; m_currencyService = dustCurrencyService; m_options = options; m_registry = registry; taskTimer.Interval = 360000; taskTimer.Elapsed += TimerElapsed; m_scheduler = registry.RequestModuleInterface<IScheduleService>(); if (m_scheduler == null) return; m_scheduler.Register("StipendsPayout", StipendsPayOutEvent); if (m_options.StipendsLoadOldUsers) taskTimer.Enabled = true; registry.RequestModuleInterface<ISimulationBase>().EventManager.RegisterEventHandler("DeleteUserInformation", DeleteUserInformation); registry.RequestModuleInterface<ISimulationBase>().EventManager.RegisterEventHandler("CreateUserInformation", CreateUserInformation); registry.RequestModuleInterface<ISimulationBase>().EventManager.RegisterEventHandler("UpdateUserInformation", CreateUserInformation); } private object CreateUserInformation(string functionname, object parameters) { UUID userid = (UUID)parameters; IUserAccountService userService = m_registry.RequestModuleInterface<IUserAccountService>(); UserAccount user = userService.GetUserAccount(null, userid); if (user == null) return null; if ((m_options.StipendsPremiumOnly) && ((user.UserFlags & 600) != 600)) return null; SchedulerItem i = m_scheduler.Get(user.PrincipalID.ToString(), "StipendsPayout"); if (i != null) return null; RepeatType runevertype = (RepeatType)Enum.Parse(typeof(RepeatType), m_options.StipendsEveryType); int runevery = m_options.StipendsEvery; m_scheduler.Save(new SchedulerItem("StipendsPayout", OSDParser.SerializeJsonString( new StipendsInfo() { AgentID = user.PrincipalID }.ToOSD()), false, UnixTimeStampToDateTime(user.Created), runevery, runevertype, user.PrincipalID) { HisotryKeep = true, HistoryReciept = true }); return null; } private object DeleteUserInformation(string functionname, object parameters) { UUID user = (UUID)parameters; SchedulerItem i = m_scheduler.Get(user.ToString(), "StipendsPayout"); if (i != null) m_scheduler.Remove(i.id); return null; } private object StipendsPayOutEvent(string functionName, object parameters) { if (functionName != "StipendsPayout") return null; StipendsInfo si = new StipendsInfo(); si.FromOSD((OSDMap)OSDParser.DeserializeJson(parameters.ToString())); IUserAccountService userService = m_registry.RequestModuleInterface<IUserAccountService>(); UserAccount ua = userService.GetUserAccount(null, si.AgentID); if ((ua != null) && (ua.UserFlags >= 0) && ((!m_options.StipendsPremiumOnly) || ((ua.UserLevel & 600) == 600))) { if (m_options.GiveStipendsOnlyWhenLoggedIn) { ICapsService capsService = m_registry.RequestModuleInterface<ICapsService>(); IClientCapsService client = capsService.GetClientCapsService(ua.PrincipalID); if (client == null) return ""; } IMoneyModule mo = m_registry.RequestModuleInterface<IMoneyModule>(); if (mo == null) return null; UUID transid = UUID.Random(); if (m_currencyService.UserCurrencyTransfer(ua.PrincipalID, UUID.Zero, (uint)m_options.Stipend, "Stipend Payment", TransactionType.StipendPayment, transid)) { return transid.ToString(); } } return ""; } private void TimerElapsed(object sender, ElapsedEventArgs elapsedEventArgs) { taskTimer.Enabled = false; IUserAccountService userService = m_registry.RequestModuleInterface<IUserAccountService>(); List<UserAccount> users = new List<UserAccount>(); users = userService.GetUserAccounts(new List<UUID> { UUID.Zero }, 0, m_options.StipendsPremiumOnly ? 600 : 0); foreach (UserAccount user in users) { SchedulerItem i = m_scheduler.Get(user.PrincipalID.ToString(), "StipendsPayout"); if (i != null) continue; RepeatType runevertype = (RepeatType)Enum.Parse(typeof(RepeatType), m_options.StipendsEveryType); int runevery = m_options.StipendsEvery; m_scheduler.Save(new SchedulerItem("StipendsPayout", OSDParser.SerializeJsonString( new StipendsInfo() { AgentID = user.PrincipalID }.ToOSD()), false, UnixTimeStampToDateTime(user.Created), runevery, runevertype, user.PrincipalID) { HisotryKeep = true, HistoryReciept = true }); } } private static DateTime UnixTimeStampToDateTime(int unixTimeStamp) { // Unix timestamp is seconds past epoch DateTime dtDateTime = new DateTime(1970, 1, 1, 0, 0, 0, 0); dtDateTime = dtDateTime.AddSeconds(unixTimeStamp).ToLocalTime(); return dtDateTime; } } public class StipendsInfo : IDataTransferable { public UUID AgentID { get; set; } #region IDataTransferable /// <summary> /// Serialize the module to OSD /// </summary> /// <returns></returns> public override OSDMap ToOSD() { return new OSDMap() { {"AgentID", OSD.FromUUID(AgentID)} }; } /// <summary> /// Deserialize the module from OSD /// </summary> /// <param name = "map"></param> public override void FromOSD(OSDMap map) { AgentID = map["AgentID"].AsUUID(); } #endregion } }
using System; using System.ComponentModel; using System.Drawing.Design; using System.Windows.Forms.Design; namespace gView.Framework.Symbology.UI { internal class HatchStyleTypeEditor : UITypeEditor { public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context) { return UITypeEditorEditStyle.DropDown; } public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { IWindowsFormsEditorService wfes = provider.GetService( typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService; if (wfes != null) { Form_UITypeEditor_DashStyle dlg = new Form_UITypeEditor_DashStyle(wfes, (GraphicsEngine.HatchStyle)value); dlg.TopLevel = false; wfes.DropDownControl(dlg); value = dlg.HatchStyle; } return value; } } }
using ArquiteturaLimpaMVC.Dominio.Entidades; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace ArquiteturaLimpaMVC.Infra.Data.EntitiesConfiguration { public class CategoriaConfiguration : IEntityTypeConfiguration<Categoria> { public void Configure(EntityTypeBuilder<Categoria> builder) { builder.HasKey(x => x.Id); builder.Property(x => x.Nome) .HasMaxLength(100) .IsRequired(); builder.HasData( new Categoria(1, "Material Escolar"), new Categoria(2, "Eletrônicos"), new Categoria(3, "Acessórios")); } } }
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace DBDiff.Schema.SQLServer2000.Winzards { public partial class ConnectionStringForm : Form { public ConnectionStringForm() { InitializeComponent(); } } }
using System.Collections.Generic; using System.Windows.Forms; namespace Courier { public partial class Courier : Form { public Courier() { InitializeComponent(); } private void BtnGenerate_Click(object sender, System.EventArgs e) { Person courier = new Person(); TextBox[] specialArrayBoxes = TxtSpecialArray(); if (!chkNameProvided.Checked) { txtName.Text = courier.Name.ToString(); txtGender.Text = courier.Gender; } if (radGhoul.Checked) { radHuman.Checked = !radGhoul.Checked; courier.Age = Person.rnd.Next(16, 300); } else if (radHuman.Checked) { radGhoul.Checked = !radHuman.Checked; courier.Age = Person.rnd.Next(16, 60); } txtAge.Text = courier.Age.ToString(); txtSkills.Text = courier.Skills; txtTraits.Text = courier.Traits; txtNukaSunset.Text = courier.NukaSunset; FillSpecial(courier, specialArrayBoxes); } private static void FillSpecial(Person courier, TextBox[] specialArrayBoxes) { for (int boxIndex = 0; boxIndex < specialArrayBoxes.Length; boxIndex++) { for (int statIndex = 0; statIndex < courier.Special.Length; statIndex++) { specialArrayBoxes[statIndex].Text = courier.Special[statIndex].ToString(); } } } private void BtnExit_Click(object sender, System.EventArgs e) { Close(); } private void BtnClear_Click(object sender, System.EventArgs e) { TextBox[] special = TxtSpecialArray(); txtAge.Clear(); txtGender.Clear(); txtNukaSunset.Clear(); txtName.Clear(); txtSkills.Clear(); txtTraits.Clear(); foreach (TextBox attrib in special) { attrib.Clear(); } } private void ChkNameProvided_CheckStateChanged(object sender, System.EventArgs e) { txtGender.ReadOnly = !txtGender.ReadOnly; } private TextBox[] TxtSpecialArray() { TextBox[] Special = new TextBox[] { txtStrength, txtPerception, txtEndurance, txtCharisma, txtIntelligence, txtAgility, txtLuck }; return Special; } } }
using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public enum OrthoDir { [OrthoDirAttribute("North", 0, 1, 0, 0, 0, 1, 0, -1, 0)] North, [OrthoDirAttribute("East", 1, 0, 0, 1, 0, 0, 1, 0, 1)] East, [OrthoDirAttribute("South", 0, -1, 0, 0, 0, -1, 0, 1, 2)] South, [OrthoDirAttribute("West", -1, 0, 0, -1, 0, 0, -1, 0, 3)] West, } public class OrthoDirAttribute : Attribute { // this set is in tile space // (xy is public for optimization) public IntVector2 XY; public int X { get { return XY.x; } } public int Y { get { return XY.y; } } // 2D screenspace public IntVector3 Px2D { get; private set; } public int Px2DX { get { return Px2D.x; } } public int Px2DY { get { return Px2D.y; } } public int Px2DZ { get { return Px2D.z; } } // 3D screenspace public IntVector3 Px3D { get; private set; } public int Px3DX { get { return Px3D.x; } } public int Px3DY { get { return Px3D.y; } } public int Px3DZ { get { return Px3D.z; } } public int Ordinal { get; private set; } public string DirectionName { get; private set; } internal OrthoDirAttribute(string directionName, int px2DX, int px2DY, int px2DZ, int px3DX, int px3DY, int px3DZ, int dx, int dy, int ordinal) { this.XY = new IntVector2(dx, dy); this.Px2D = new IntVector3(px2DX, px2DY, px2DZ); this.Px3D = new IntVector3(px3DX, px3DY, px3DZ); this.Ordinal = ordinal; this.DirectionName = directionName; } } public static class OrthoDirExtensions { public static OrthoDir DirectionOf(Vector2 vector) { if (Mathf.Abs(vector.x) > Mathf.Abs(vector.y)) { return ((vector.x > 0) ^ (OrthoDir.East.X() > 0)) ? OrthoDir.West : OrthoDir.East; } else { return ((vector.y > 0) ^ (OrthoDir.North.Y() > 0)) ? OrthoDir.South : OrthoDir.North; } } // 2D space public static OrthoDir DirectionOfPx(Vector2 vector) { if (Mathf.Abs(vector.x) > Mathf.Abs(vector.y)) { return ((vector.x > 0) ^ (OrthoDir.East.Px2DX() > 0)) ? OrthoDir.West : OrthoDir.East; } else { return ((vector.y > 0) ^ (OrthoDir.North.Px2DY() > 0)) ? OrthoDir.South : OrthoDir.North; } } // 3D space public static OrthoDir DirectionOfPx(Vector3 vector) { if (Mathf.Abs(vector.x) > Mathf.Abs(vector.z)) { return ((vector.x > 0) ^ (OrthoDir.East.Px3DX() > 0)) ? OrthoDir.West : OrthoDir.East; } else { return ((vector.z > 0) ^ (OrthoDir.North.Px3DZ() > 0)) ? OrthoDir.South : OrthoDir.North; } } public static OrthoDir Parse(string directionName) { foreach (OrthoDir dir in System.Enum.GetValues(typeof(OrthoDir))) { if (dir.DirectionName().ToLower() == directionName.ToLower()) { return dir; } } Debug.Assert(false, "Could not find orthodir matching " + directionName); return OrthoDir.North; } public static int X(this OrthoDir dir) { return dir.GetAttribute<OrthoDirAttribute>().X; } public static int Y(this OrthoDir dir) { return dir.GetAttribute<OrthoDirAttribute>().Y; } public static IntVector2 XY(this OrthoDir dir) { return dir.GetAttribute<OrthoDirAttribute>().XY; } public static int Px2DX(this OrthoDir dir) { return dir.GetAttribute<OrthoDirAttribute>().Px2DX; } public static int Px2DY(this OrthoDir dir) { return dir.GetAttribute<OrthoDirAttribute>().Px2DY; } public static int Px2DZ(this OrthoDir dir) { return dir.GetAttribute<OrthoDirAttribute>().Px2DY; } public static IntVector3 Px2D(this OrthoDir dir) { return new IntVector3(dir.Px2DX(), dir.Px2DY(), dir.Px2DZ()); } public static int Px3DX(this OrthoDir dir) { return dir.GetAttribute<OrthoDirAttribute>().Px3DX; } public static int Px3DY(this OrthoDir dir) { return dir.GetAttribute<OrthoDirAttribute>().Px3DY; } public static int Px3DZ(this OrthoDir dir) { return dir.GetAttribute<OrthoDirAttribute>().Px3DZ; } public static IntVector3 Px3D(this OrthoDir dir) { return new IntVector3(dir.Px3DX(), dir.Px3DY(), dir.Px3DZ()); } public static int Ordinal(this OrthoDir dir) { return dir.GetAttribute<OrthoDirAttribute>().Ordinal; } public static string DirectionName(this OrthoDir dir) { return dir.GetAttribute<OrthoDirAttribute>().DirectionName; } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using RightEdge.Common; abstract class AsyncBrokerTest : BrokerTest { TaskCompletionSource<bool> _taskCompletionSource = new TaskCompletionSource<bool>(); List<WaitingEvent> _waitingEvents = new List<WaitingEvent>(); public AsyncBrokerTest(MySymbolScript symbolScript) : base(symbolScript) { } protected abstract Task RunTestAsync(); public override Task StartTest() { return RunTestAsync(); } public override void ProcessEvent(object @event) { // Create copy of waiting events list because processing them may mean adding to the list foreach (var waitingEvent in _waitingEvents.ToList()) { waitingEvent.ProcessEvent(@event); } _waitingEvents.RemoveAll(waitingEvent => waitingEvent.Task.IsCompleted); } public Task<T> WaitForAsync<T>() { var waitingEvent = new WaitingEvent<T>(@event => @event is T, @event => (T) @event); _waitingEvents.Add(waitingEvent); return waitingEvent.TaskOfT; } public Task<object> WaitForAnyAsync(params Type[] types) { var waitingEvent = new WaitingEvent<object>( @event => types.Any(t => t.IsInstanceOfType(@event)), @event => @event); _waitingEvents.Add(waitingEvent); return waitingEvent.TaskOfT; } // Waits for an order to be "completed" - ie either cancelled or completely filled // If order is filled successfully, result will be null, otherwise it will be the "information" // about why the order was cancelled public async Task<string> WaitForOrderCompletedAsync(Order order) { while (order.OrderState == BrokerOrderState.Submitted || order.OrderState == BrokerOrderState.PartiallyFilled) { var result = await WaitForAnyAsync(typeof (OrderFilledEvent), typeof (OrderCancelledEvent)); if (result is OrderCancelledEvent) { var orderCancelled = (OrderCancelledEvent)result; if (orderCancelled.Order == order) { return orderCancelled.Information ?? "Unexpected cancel"; } } } Assert.AreEqual(order.OrderState, BrokerOrderState.Filled); Assert.AreEqual(order.Fills.Sum(f => f.Quantity), order.Size, "Total fill size"); return null; } public async Task WaitForCompleteFillAsync(Order order) { var cancelReason = await WaitForOrderCompletedAsync(order); if (cancelReason != null) { Assert.Fail("Unexpected cancel: " + cancelReason); } } abstract class WaitingEvent { public abstract Task Task { get; } public abstract void ProcessEvent(object @event); } class WaitingEvent<T> : WaitingEvent { readonly TaskCompletionSource<T> _taskCompletionSource; readonly Func<object, bool> _matcher; readonly Func<object, T> _resultGetter; public override Task Task { get { return _taskCompletionSource.Task; } } public Task<T> TaskOfT { get { return _taskCompletionSource.Task; } } public WaitingEvent(Func<object, bool> matcher, Func<object, T> resultGetter) { _taskCompletionSource = new TaskCompletionSource<T>(); _matcher = matcher; _resultGetter = resultGetter; } public override void ProcessEvent(object @event) { if (_matcher(@event)) { _taskCompletionSource.SetResult(_resultGetter(@event)); } } } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace PADIbookCommonLib { [Serializable] public class User { private String _username; private String _spoofAdress; private List<Post> _userPosts; private List<Friend> _friends; private List<Friend> _pendingFriends; private List<ObjectFile> _objectList; private List<RedirectionFile> _redirectionList; public static List<QueryByName> _receivedNameMessages; public static List<QueryByFile> _receivedFileMessages; public static List<DateTime> _sentMessages; public List<DateTime> SentMessages { get { return _sentMessages; } set { _sentMessages = value; } } public List<QueryByFile> ReceivedFileMessages { get; set; } public List<QueryByName> ReceivedNameMessages { get; set; } public List<Post> UserPosts { get { return _userPosts; } set { _userPosts = value; } } public List<ObjectFile> ObjectList { get { return _objectList; } set { _objectList = value; } } public List<RedirectionFile> RedirectionList { get { return _redirectionList; } set { _redirectionList = value; } } public List<Friend> Friends { get { return _friends; } set { _friends = value; } } public List<Friend> PendingFriends { get { return _pendingFriends; } set { _pendingFriends = value; } } public string Username { get { return _username; } set { _username = value; } } public string SpoofAdress { get { return _spoofAdress; } set { _spoofAdress = value; } } public void addObject(ObjectFile file) { _objectList.Add(file); } public void addRedirection(RedirectionFile file) { _redirectionList.Add(file); } public void addPost(Post post) { _userPosts.Add(post); } public void addFriend(Friend friend) { _friends.Add(friend); } public void removeFriend(String fr) { foreach (Friend i in this._friends) { if (i.Name.CompareTo(fr) == 0) { this.Friends.Remove(i); return; } } } public Friend getFriendByUri(string uri) { foreach (Friend friend in _friends) if (friend.Uris.ElementAt(0).CompareTo(uri) == 0) return friend; throw new InvalidFriendUriException("No friend with such uri: " + uri); } public void addPendingFriend(Friend friend) { string newPendingFriendName = friend.Name; foreach (Friend pendingFriend in _pendingFriends) if (pendingFriend.Name.Equals(newPendingFriendName)) throw new DuplicatePendingFriendException("Duplicate pending friend"); _pendingFriends.Add(friend); } public void removePendingFriend(string friendName) { foreach (Friend f in _pendingFriends) { if (f.Name.CompareTo(friendName) == 0) { _pendingFriends.Remove(f); return; } } throw new InvalidPendingFriendException("No such pending friend to remove"); } public Friend getPendingFriend(string friendName) { foreach (Friend f in _pendingFriends) { if (f.Name.CompareTo(friendName) == 0) return f; } throw new InvalidPendingFriendException("No such pending friend"); } public User(String addr) { Random ran = new Random(DateTime.Now.Millisecond); _userPosts = new List<Post>(); _friends = new List<Friend>(); _pendingFriends = new List<Friend>(); _redirectionList = new List<RedirectionFile>(); _objectList = new List<ObjectFile>(); _receivedNameMessages = new List<QueryByName>(); _receivedFileMessages = new List<QueryByFile>(); _sentMessages = new List<DateTime>(); _spoofAdress = addr; _username = "Default" + ran.Next(1000); } public User() { Random ran = new Random(DateTime.Now.Millisecond); //_interests = new List<Interest>(); _userPosts = new List<Post>(); _friends = new List<Friend>(); _pendingFriends = new List<Friend>(); _redirectionList = new List<RedirectionFile>(); _objectList = new List<ObjectFile>(); _receivedNameMessages = new List<QueryByName>(); _receivedFileMessages = new List<QueryByFile>(); _sentMessages = new List<DateTime>(); _spoofAdress = ""; _username = "Default node ID"; _username = "Default" + ran.Next(1000); } } }
using System; using System.Collections.Generic; using System.Configuration; using System.Data; using System.Data.SqlClient; using System.Diagnostics; using System.Linq; using System.Text; using System.Threading.Tasks; using BDGeral = upSight.Consulta.Base.BD.Geral; namespace upSight.CartaoCorp.Identificacao.ACSOIDTS { public static class crtACSOIDTSCDetalheBD { /// <summary> /// Insere os dados em crtACSOIDTSCDetalhe /// </summary> /// <param name="acsIdstDet"></param> public static void Insere(this crtACSOIDTSCDetalheEN acsIdstDet) { using (SqlConnection cnx = new SqlConnection(ConfigurationManager.ConnectionStrings["Global"].ConnectionString)) { try { string query = " INSERT [crtACSOIDTSCDetalhe] " + " (IdArquivo, TpRegistro, TpPanProxy, PanProxy, CPF, Nome, NomeFacial, DtNascimento, Sexo, CnpjFilial, " + " Grupo, Email, DDDCel, Celular, NomeMae, IdRegistro, NumLinha) " + " SELECT @IdArquivo, @TpRegistro, @TpPanProxy, @PanProxy, @CPF, @Nome, @NomeFacial, @DtNascimento, @Sexo, @CnpjFilial, " + " @Grupo, @Email, @DDDCel, @Celular, @NomeMae, @IdRegistro, @NumLinha "; using (SqlCommand cmd = new SqlCommand(query, cnx)) { cmd.CommandType = CommandType.Text; cmd.Parameters.Add("IdArquivo", SqlDbType.Int).Value = acsIdstDet.IdArquivo; cmd.Parameters.Add("TpRegistro", SqlDbType.Char, 1).Value = acsIdstDet.TpRegistro; cmd.Parameters.Add("TpPanProxy", SqlDbType.Char, 1).Value = acsIdstDet.TpPanProxy; cmd.Parameters.Add("PanProxy", SqlDbType.VarChar, 32).Value = acsIdstDet.PanProxy; cmd.Parameters.Add("CPF", SqlDbType.VarChar, 11).Value = acsIdstDet.Cpf; cmd.Parameters.Add("Nome", SqlDbType.VarChar, 50).Value = acsIdstDet.Nome; cmd.Parameters.Add("NomeFacial", SqlDbType.VarChar, 25).Value = BDGeral.BDObtemValor(acsIdstDet.NomeFacial); cmd.Parameters.Add("DtNascimento", SqlDbType.Date).Value = BDGeral.BDObtemValor<DateTime>(acsIdstDet.DtNascimento); cmd.Parameters.Add("Sexo", SqlDbType.Char, 1).Value = BDGeral.BDObtemValor(acsIdstDet.Sexo); cmd.Parameters.Add("CnpjFilial", SqlDbType.VarChar, 14).Value = BDGeral.BDObtemValor(acsIdstDet.CnpjFilial); cmd.Parameters.Add("Grupo", SqlDbType.VarChar, 20).Value = BDGeral.BDObtemValor(acsIdstDet.Grupo); cmd.Parameters.Add("Email", SqlDbType.VarChar, 30).Value = BDGeral.BDObtemValor(acsIdstDet.Email); cmd.Parameters.Add("DDDCel", SqlDbType.VarChar, 2).Value = BDGeral.BDObtemValor(acsIdstDet.DddCel); cmd.Parameters.Add("Celular", SqlDbType.VarChar, 9).Value = BDGeral.BDObtemValor(acsIdstDet.Celular); cmd.Parameters.Add("NomeMae", SqlDbType.VarChar, 50).Value = BDGeral.BDObtemValor(acsIdstDet.NomeMae); cmd.Parameters.Add("IdRegistro", SqlDbType.VarChar, 10).Value = BDGeral.BDObtemValor(acsIdstDet.IdRegistro); cmd.Parameters.Add("NumLinha", SqlDbType.Int).Value = acsIdstDet.NumLinha; cnx.Open(); cmd.ExecuteNonQuery(); } } catch (Exception sqlExc) { if (upSight.Consulta.Base.BD.Geral.TS.TraceError) Trace.TraceError("{0}: {1}", new object[] { "u.TISC.TISC.Det", sqlExc }); throw; } } } } }
using System; namespace RRExpress.Seller.Entity { public class GoodsInfo { public long ID { get; set; } public long StoreID { get; set; } public string StoreName { get; set; } public string Name { get; set; } public int BigCat { get; set; } public int SecondCat { get; set; } public int Channel { get; set; } public int? Stock { get; set; } public string Unit { get; set; } public decimal Price { get; set; } public DateTime CreatedOn { get; set; } public DateTime? PublishOn { get; set; } public DateTime? ModifiedOn { get; set; } public long Owner { get; set; } public string Thumbnail { get; set; } public bool IsPublished { get; set; } public string Desc { get; set; } public int SaleVolumeByMonth { get; set; } public int SaleVolume { get; set; } public float PraiseRate { get; set; } public int CommentCount { get; set; } public decimal? OrgPrice { get; set; } } }
using Nest; namespace Uintra.Core.Search.Entities { public class SearchableDocument : SearchableBase { public string Data { get; set; } public Attachment Attachment { get; set; } } }
using System.Text; using System.Threading.Tasks; namespace SerializationDemo { public class C { public string Value { get; set; } } }
using Sentry.Extensibility; namespace Sentry.Protocol.Envelopes; /// <summary> /// Represents an object which is already serialized as a stream. /// </summary> internal sealed class StreamSerializable : ISerializable, IDisposable { /// <summary> /// Source stream. /// </summary> public Stream Source { get; } /// <summary> /// Initializes an instance of <see cref="StreamSerializable"/>. /// </summary> public StreamSerializable(Stream source) => Source = source; /// <inheritdoc /> public Task SerializeAsync(Stream stream, IDiagnosticLogger? logger, CancellationToken cancellationToken = default) => Source.CopyToAsync(stream, cancellationToken); /// <inheritdoc /> public void Serialize(Stream stream, IDiagnosticLogger? logger) => Source.CopyTo(stream); /// <inheritdoc /> public void Dispose() => Source.Dispose(); }
using System.Linq; using System.Threading.Tasks; using ClinicManagement.Infrastructure.Data; using UnitTests.Builders; using Xunit; namespace IntegrationTests.Room { public class EfRepositoryList : BaseEfRepoTestFixture { private readonly EfRepository _repository; public EfRepositoryList() { _repository = GetRepository(); } [Fact] public async Task ListsRoomAfterAddingIt() { await AddRoom(); var rooms = (await _repository.ListAsync<ClinicManagement.Core.Aggregates.Room, int>()).ToList(); Assert.True(rooms?.Count > 0); } private async Task<ClinicManagement.Core.Aggregates.Room> AddRoom() { var room = new RoomBuilder().Id(7).Build(); await _repository.AddAsync<ClinicManagement.Core.Aggregates.Room, int>(room); return room; } } }
using System.Threading; using Framework.Core.Common; using Tests.Pages.Van.LogIn; using Tests.Pages.Van.Main.PredictiveDialerCampaign; using Tests.Projects.Oberon.CustomForm; using NUnit.Framework; using Tests.Data.Van; using Tests.Pages.Van.Main; namespace Tests.Projects.Van.PredictiveDialer { public class ListStatsOnTogglingBtnActiveAndInactiveCampaign { private Driver _driver; [SetUp] public void SetUp() { //start browser _driver = new Driver(); } /// <summary> /// Tests the Pdialer campaign reports /// When the campaign is set to inactive, total phone and completed stats on List Stats should be marked as Campaign Inactive /// When the campaign is set back to active, total phone and completed stats should show the correct stats /// </summary> [Test] [Category("van"), Category("van_phoneservices"), Category("van_predictivedialer"), Category("van_smoketest")] public void TestCaseListStatsOnTogglingBtnActiveAndInactiveCampaign() { const string autoDialDetailId = "EID6535Q"; const string clientId = "dnc"; var user = new VanTestUser { UserName = "sajautotest", Password = "auto2testing", CommitteeId = "Torvic for Congress", PinCode = "1212", }; //Login as user var login = new LoginPage(_driver, "dnc"); login.Login(user); // Go to AutoDialDetails page var autoDialDetails = new AutoDialDetailsPage(_driver, clientId); autoDialDetails.GoToThisPage(autoDialDetailId); //Assert.IsTrue(_driver.IsElementPresent(autoDialDetails.PdialerCampaignLabel),"Pdialer Campaign label did not display"); //Clicks on Radio button to make the campaign inactive autoDialDetails.ClickInactiveCampaign(); autoDialDetails.ClickSaveButton(); // autoDialDetails.InactiveListStatsDisplayed(); //Clicks on Radio button to make the campaign Active again autoDialDetails.ClickActiveCampaign(); autoDialDetails.ClickSaveButton(); autoDialDetails.ActiveListStatsDisplayed(); } [TearDown] public void Teardown() { _driver.BrowserQuit(); } } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; using KartObjects; using System.ComponentModel; namespace KartSystem { public class AlcoTestRest : Entity { [DBIgnoreAutoGenerateParam] [DBIgnoreReadParam] public override string FriendlyName { get { return "Алкогольная декларация, тест остатков"; } } [DisplayName("Идертификатор группы товара")] public long IdGoodGroup { get; set; } [DisplayName("Наименование группы товара")] public string NameGoodGroup { get; set; } [DisplayName("Артикул")] public string Articul { get; set; } [DisplayName("Наименование товара")] public string NameGood { get; set; } [DisplayName("Остаток на начало")] public double BeginRest { get; set; } [DisplayName("Остаток на конец")] public double EndRest { get; set; } } }
 using System; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace NumbersToWords.Tests { [TestClass] public class TeensConverter_Tests { [TestMethod] public void Given_I_Have_A_Value_Of_11_The_Value_Returned_Should_Be_Eleven() { // Given I have a value of 11 var value = 11; // When I pass the value into the word converter ITeensConverter converter = new TeensConverter(); string result = converter.ConvertTeenNumbersToWord(value); // Then I expect the value returned is "eleven" Assert.AreEqual("eleven", result); } [TestMethod] public void Given_I_Have_A_Value_Of_12_The_Value_Returned_Should_Be_Twelve() { // Given I have a value of 12 var value = 12; // When I pass the value into the word converter ITeensConverter converter = new TeensConverter(); string result = converter.ConvertTeenNumbersToWord(value); // Then I expect the value returned is "twelve" Assert.AreEqual("twelve", result); } [TestMethod] public void Given_I_Have_A_Value_Of_13_The_Value_Returned_Should_Be_Thirteen() { // Given I have a value of 13 var value = 13; // When I pass the value into the word converter ITeensConverter converter = new TeensConverter(); string result = converter.ConvertTeenNumbersToWord(value); // Then I expect the value returned is "thirteen" Assert.AreEqual("thirteen", result); } [TestMethod] public void Given_I_Have_A_Value_Of_14_The_Value_Returned_Should_Be_Fourteen() { // Given I have a value of 14 var value = 14; // When I pass the value into the word converter ITeensConverter converter = new TeensConverter(); string result = converter.ConvertTeenNumbersToWord(value); // Then I expect the value returned is "fourteen" Assert.AreEqual("fourteen", result); } [TestMethod] public void Given_I_Have_A_Value_Of_15_The_Value_Returned_Should_Be_Fifteen() { // Given I have a value of 15 var value = 15; // When I pass the value into the word converter ITeensConverter converter = new TeensConverter(); string result = converter.ConvertTeenNumbersToWord(value); // Then I expect the value returned is "fifteen" Assert.AreEqual("fifteen", result); } [TestMethod] public void Given_I_Have_A_Value_Of_16_The_Value_Returned_Should_Be_Sixteen() { // Given I have a value of 16 var value = 16; // When I pass the value into the word converter ITeensConverter converter = new TeensConverter(); string result = converter.ConvertTeenNumbersToWord(value); // Then I expect the value returned is "sixteen" Assert.AreEqual("sixteen", result); } [TestMethod] public void Given_I_Have_A_Value_Of_17_The_Value_Returned_Should_Be_Seventeen() { // Given I have a value of 17 var value = 17; // When I pass the value into the word converter ITeensConverter converter = new TeensConverter(); string result = converter.ConvertTeenNumbersToWord(value); // Then I expect the value returned is "seventeen" Assert.AreEqual("seventeen", result); } [TestMethod] public void Given_I_Have_A_Value_Of_18_The_Value_Returned_Should_Be_Eighteen() { // Given I have a value of 18 var value = 18; // When I pass the value into the word converter ITeensConverter converter = new TeensConverter(); string result = converter.ConvertTeenNumbersToWord(value); // Then I expect the value returned is "eighteen" Assert.AreEqual("eighteen", result); } [TestMethod] public void Given_I_Have_A_Value_Of_19_The_Value_Returned_Should_Be_Nineteen() { // Given I have a value of 19 var value = 19; // When I pass the value into the word converter ITeensConverter converter = new TeensConverter(); string result = converter.ConvertTeenNumbersToWord(value); // Then I expect the value returned is "nineteen" Assert.AreEqual("nineteen", result); } } }
using Microsoft.Xna.Framework; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Terraria; using Terraria.ModLoader; namespace StarlightRiver.Food { class MainCourse : ModItem { public string IName; public string ITooltip; public int Buff = 0; public float Strength = 0; public int Fill = 0; public MainCourse(string name, string tooltip, int buffID, float strength, int filling) { Buff = buffID; Strength = strength; Fill = filling; IName = name; ITooltip = tooltip; } public override bool CloneNewInstances => true; public override void SetStaticDefaults() { Tooltip.SetDefault("\n\n"); } public override void SetDefaults() { item.maxStack = 99; item.width = 32; item.height = 32; item.useStyle = 1; item.useTime = 30; item.useAnimation = 30; } public override void ModifyTooltips(List<TooltipLine> tooltips) { foreach (TooltipLine line in tooltips) { if (line.mod == "Terraria" && line.Name == "ItemName") { line.text = IName; } if (line.mod == "Terraria" && line.Name == "Tooltip0") { line.text = "Main Course"; line.overrideColor = new Color(255, 220, 140); } if (line.mod == "Terraria" && line.Name == "Tooltip1") { line.text = "+ " + Strength + ITooltip; line.overrideColor = new Color(255, 220, 80); } } } } class RoastRabbit : MainCourse { public RoastRabbit() : base("Roast Rabbit", "% Damage", 1, 10, 19800) { } } }
using System; using AutoMapper; using Microsoft.Practices.Unity; using OrgMan.Data.UnitOfWork; using OrgMan.Domain.Handler.HandlerBase; using OrgMan.DomainContracts.Adress; using OrgMan.DomainObjects.Adress; using System.Data; using OrgMan.DomainObjects.Common; using System.Collections.Generic; using OrgMan.DataModel; namespace OrgMan.Domain.Handler.Adress { public class UpdateAdressQueryHandler : QueryHandlerBase { private readonly UpdateAdressQuery _query; public UpdateAdressQueryHandler(UpdateAdressQuery query, IUnityContainer unityContainer) : base(unityContainer) { _query = query; } public AdressManagementDetailDomainModel Handle() { try { OrgManUnitOfWork uow = new OrgManUnitOfWork(); Guid newMemberInformationUID = Guid.Empty; if (_query.AdressManagementDetailDomainModel.MemberInformation != null && _query.AdressManagementDetailDomainModel.MemberInformation.UID == null || _query.AdressManagementDetailDomainModel.MemberInformation.UID == Guid.Empty) { newMemberInformationUID = Guid.NewGuid(); _query.AdressManagementDetailDomainModel.MemberInformation.UID = newMemberInformationUID; } if(_query.AdressManagementDetailDomainModel.MemberInformation != null && _query.AdressManagementDetailDomainModel.MemberInformation.MemberInformationToMemberships != null) { foreach (var memberInformationToMembership in _query.AdressManagementDetailDomainModel.MemberInformation.MemberInformationToMemberships) { if (memberInformationToMembership.UID == null || memberInformationToMembership.UID == Guid.Empty) { Guid newUid = Guid.NewGuid(); memberInformationToMembership.UID = newUid; } if(memberInformationToMembership.Membership == null) { memberInformationToMembership.Membership = Mapper.Map<MembershipDomainModel>(uow.MembershipRepository.Get(_query.MandatorUIDs, memberInformationToMembership.MembershipUID)); } } } if(_query.AdressManagementDetailDomainModel.Phones != null) { foreach (var phone in _query.AdressManagementDetailDomainModel.Phones) { if (phone.UID == null || phone.UID == Guid.Empty) { phone.UID = Guid.NewGuid(); phone.IndividualPersonUID = _query.AdressManagementDetailDomainModel.UID; } } } if(_query.AdressManagementDetailDomainModel.Person.PersonToMandators != null) { foreach (var personToMandator in _query.AdressManagementDetailDomainModel.Person.PersonToMandators) { personToMandator.PersonUID = _query.AdressManagementDetailDomainModel.Person.UID; personToMandator.UID = Guid.NewGuid(); } } if (_query.AdressManagementDetailDomainModel.Emails != null) { foreach (var email in _query.AdressManagementDetailDomainModel.Emails) { if (email.UID == null || email.UID == Guid.Empty) { email.UID = Guid.NewGuid(); email.IndividualPersonUID = _query.AdressManagementDetailDomainModel.UID; } } } var individualPerson = Mapper.Map<DataModel.IndividualPerson>(_query.AdressManagementDetailDomainModel); uow.IndividualPersonRepository.Update(_query.MandatorUIDs, individualPerson); uow.MemberInformationRepository.Update(_query.MandatorUIDs,individualPerson.MemberInformation); uow.PersonRepository.Update(_query.MandatorUIDs, individualPerson.Person); uow.AdressRepository.Update(_query.MandatorUIDs, individualPerson.Adress); if(individualPerson.Phones != null) { foreach (var phone in individualPerson.Phones) { uow.PhoneRepository.Update(_query.MandatorUIDs, phone); } } if(individualPerson.Emails != null) { foreach (var email in individualPerson.Emails) { uow.EmailRepository.Update(_query.MandatorUIDs, email); } } uow.Commit(); foreach (var membership in individualPerson.MemberInformation.MemberInformationToMemberships) { var membershipTest = uow.MemberInformationToMembershipRepository.Get(membership.UID); if(membershipTest == null) { uow.MemberInformationToMembershipRepository.Insert(membership); }else { uow.MemberInformationToMembershipRepository.Update(membership); } } uow.Commit(); return Mapper.Map<AdressManagementDetailDomainModel>(uow.IndividualPersonRepository.Get(_query.AdressManagementDetailDomainModel.UID)); } catch(InvalidOperationException e) { throw new Exception("Internal Server Error thrown during update process", e); } catch (DataException e) { throw new Exception("Internal Server Error", e); } catch (Exception e) { throw new Exception("Internal Server Error", e); } } } }
namespace Fragenkatalog.Model { class Schueler : Benutzer { public Schueler(uint benutzer_nr, string login_name, string email_adresse, string passwort) : base(benutzer_nr, login_name, email_adresse, passwort, 3) { // TODO : eventuell anpassen } } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace WeatherApp1 { public class WeatherCard { public DateTime Date { get; private set; } public string Weather { get; private set; } public DateTime UpdateTime { get; private set; } public int MinTemp { get; private set; } public int MaxTemp { get; private set; } public string Source { get; set; } public WeatherCard(int year, int month, int day, string inWeather, int inMinTemp, int inMaxTemp) { Date = new DateTime(year, month, day); Weather = inWeather; UpdateTime = DateTime.Now.Date; MinTemp = inMinTemp; MaxTemp = inMaxTemp; } public WeatherCard(DateTime inDateTime, string inWeather, int inMinTemp, int inMaxTemp) { Date = inDateTime; Weather = inWeather; UpdateTime = DateTime.Now.Date; MinTemp = inMinTemp; MaxTemp = inMaxTemp; } } }
using SocketLite.Forms; using System; using System.Threading; using System.Windows.Forms; namespace SocketLite.Client { public partial class MainForm : ClientForm { NotifyIcon notifyIcon1 = new NotifyIcon(); public MainForm() { InitializeComponent(); notifyIcon1.Text = Text; notifyIcon1.Icon = Icon; notifyIcon1.DoubleClick += OnNotifyIconDoubleClicked; SizeChanged += OnSizeChanged; ThreadPool.RegisterWaitForSingleObject(Program.ProgramStarted, OnProgramStarted, null, -1, false); WindowState = FormWindowState.Normal; context = new AsyncContext(new RichTextBoxLogger(rtbLog, true)); context.Logger.Clear(); } #region NotifyIcon void OnSizeChanged(object sender, EventArgs e) { if (WindowState == FormWindowState.Minimized) { notifyIcon1.Visible = true; Visible = false; } } void OnNotifyIconDoubleClicked(object sender, EventArgs e) { Visible = true; notifyIcon1.Visible = false; WindowState = FormWindowState.Normal; } void OnProgramStarted(object state, bool timeout) { notifyIcon1.ShowBalloonTip(2000, "您好", "我在这呢!", ToolTipIcon.Info); Show(); WindowState = FormWindowState.Normal; } #endregion #region FormEvents private void MainForm_Load(object sender, EventArgs e) { SetEnabledForm(false); var context = new AsyncContext(new RichTextBoxLogger(rtbLog)); Utils.ExecuteAsync(context, e1 => { var ctx = e1.Argument as AsyncContext; if (ctx == null) return; ctx.Logger.WriteLog("正在连接服务器......"); ConnectServer(); SendRequest("Connect"); }, e2 => { }); } private void MainForm_FormClosed(object sender, FormClosedEventArgs e) { Application.Exit(); } #endregion #region ButtonEvents private void BtnSend_Click(object sender, EventArgs e) { SetEnabledForm(false); SendRequest(txtHandler.Text, txtAction.Text, txtData.Text); } #endregion #region Private private void SetEnabledForm(bool enabled) { pnlForm.Enabled = enabled; } #endregion #region Protected protected override void ConnectSuccess() { SetEnabledForm(true); } protected override void ResponseFinished() { SetEnabledForm(true); } #endregion } }
using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace LocusNew.Core.Models { public class ListingImage { public int Id { get; set; } public string FileName { get; set; } public string Extension { get; set; } public int ListingId { get; set; } public Listing Listing { get; set; } public int SortOrder { get; set; } public string FileNameNoExt { get; set; } public string FilePath { get; set; } } }
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using API.Models; using API.Repository; namespace API { public class Mutation { private readonly IDataProfileRepository _dataProfileRepository; public Mutation(IDataProfileRepository dataProfileRepository) { _dataProfileRepository = dataProfileRepository ?? throw new ArgumentNullException(nameof(dataProfileRepository)); } public bool InsertAnalystNotes(int fileTrackingID, string note, string user) { if (string.IsNullOrEmpty(note)) return false; return _dataProfileRepository.InsertAnalystNotes(fileTrackingID, note, user); } public bool InsertAnalytNotesObject(AnalystNoteInput input) { if (string.IsNullOrEmpty(input.Note)) return false; return _dataProfileRepository.InsertAnalytNotesObject(input); } } }
using System; using System.Collections.Generic; namespace fibonachi { class fibonachi { static void Main(string[] args) { Stack<long> fibonachi = new Stack<long>(); int n = int.Parse(Console.ReadLine()); fibonachi.Push(0); fibonachi.Push(1); for (int i = 0; i < n - 1; i++) { long firstNumber = fibonachi.Pop(); long secondNumber = fibonachi.Peek(); fibonachi.Push(firstNumber); fibonachi.Push(firstNumber + secondNumber); } Console.WriteLine(fibonachi.Pop()); } } }
using Microsoft.AspNetCore.Razor.TagHelpers; using System.Threading.Tasks; namespace Wee.UI.Core.TagHelpers { [HtmlTargetElement("bootstrap-button-group")] public class ButtonGroupTagHelper : TagHelper { [HtmlAttributeName("class")] public string ButtonGroupClass { get; set; } [HtmlAttributeName("orientation")] public string ButtonGroupOrientation { get; set; } public ButtonGroupTagHelper() { } public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output) { string content = (await output.GetChildContentAsync()).GetContent(); string str = "btn-group"; if (this.ButtonGroupOrientation == "vertical") str = "btn-group-vertical"; output.Content.AppendHtml(content); output.Attributes.SetAttribute("class", (object) (str + " " + this.ButtonGroupClass)); output.Attributes.SetAttribute("data-toggle", (object) "buttons"); output.Attributes.SetAttribute("role", (object) "group"); // ISSUE: reference to a compiler-generated method } } }
namespace Data.Migrations { using System; using System.Data.Entity.Migrations; public partial class InitialCreate : DbMigration { public override void Up() { CreateTable( "Web._Users", c => new { UserName = c.String(nullable: false, maxLength: 128), FirstName = c.String(), LastName = c.String(), }) .PrimaryKey(t => t.UserName); CreateTable( "Web.ActivityLogs", c => new { ActivityLogId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(), DocId = c.Int(nullable: false), DocNo = c.String(), DocDate = c.DateTime(), DocLineId = c.Int(), ActivityType = c.Int(nullable: false), Narration = c.String(), UserRemark = c.String(), CreatedBy = c.String(), CreatedDate = c.DateTime(nullable: false), UploadDate = c.DateTime(), TransactionId = c.String(maxLength: 50), TransactionError = c.String(), Modifications = c.String(), ControllerName = c.String(maxLength: 50), ActionName = c.String(maxLength: 50), DocStatus = c.Int(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ActivityLogId) .ForeignKey("Web.ActivityTypes", t => t.ActivityType) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .Index(t => t.DocTypeId) .Index(t => t.ActivityType); CreateTable( "Web.ActivityTypes", c => new { ActivityTypeId = c.Int(nullable: false, identity: true), ActivityTypeName = c.String(nullable: false, maxLength: 50), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ActivityTypeId) .Index(t => t.ActivityTypeName, unique: true, name: "IX_ActivityType_ActivityTypeName"); CreateTable( "Web.DocumentTypes", c => new { DocumentTypeId = c.Int(nullable: false, identity: true), DocumentTypeShortName = c.String(nullable: false, maxLength: 5), DocumentTypeName = c.String(nullable: false, maxLength: 50), DocumentCategoryId = c.Int(nullable: false), ControllerActionId = c.Int(), DomainName = c.String(maxLength: 25), VoucherType = c.String(maxLength: 20), IsSystemDefine = c.Boolean(nullable: false), IsActive = c.Boolean(nullable: false), ReportMenuId = c.Int(), Nature = c.String(maxLength: 10), IconDisplayName = c.String(), ImageFileName = c.String(), ImageFolderName = c.String(), SupportGatePass = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), DatabaseTableName = c.String(maxLength: 50), ControllerName = c.String(maxLength: 50), ActionNamePendingToSubmit = c.String(maxLength: 50), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.DocumentTypeId) .ForeignKey("Web.ControllerActions", t => t.ControllerActionId) .ForeignKey("Web.DocumentCategories", t => t.DocumentCategoryId) .ForeignKey("Web.Menus", t => t.ReportMenuId) .Index(t => t.DocumentTypeShortName, unique: true, name: "IX_DocumentType_DocumentTypeShortName") .Index(t => t.DocumentTypeName, unique: true, name: "IX_DocumentType_DocumentTypeName") .Index(t => t.DocumentCategoryId) .Index(t => t.ControllerActionId) .Index(t => t.ReportMenuId); CreateTable( "Web.ControllerActions", c => new { ControllerActionId = c.Int(nullable: false, identity: true), ControllerId = c.Int(), ControllerName = c.String(maxLength: 100), ActionName = c.String(nullable: false, maxLength: 100), PubModuleName = c.String(), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.ControllerActionId) .ForeignKey("Web.MvcControllers", t => t.ControllerId) .Index(t => t.ControllerId) .Index(t => new { t.ControllerName, t.ActionName }, unique: true, name: "IX_ControllerAction_ControllerName"); CreateTable( "Web.MvcControllers", c => new { ControllerId = c.Int(nullable: false, identity: true), ControllerName = c.String(nullable: false, maxLength: 100), ParentControllerId = c.Int(), PubModuleName = c.String(maxLength: 30), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.ControllerId) .ForeignKey("Web.MvcControllers", t => t.ParentControllerId) .Index(t => new { t.ControllerName, t.PubModuleName }, unique: true, name: "IX_Controller_ControllerName") .Index(t => t.ParentControllerId); CreateTable( "Web.DocumentCategories", c => new { DocumentCategoryId = c.Int(nullable: false, identity: true), DocumentCategoryName = c.String(nullable: false, maxLength: 50), IsActive = c.Boolean(nullable: false), IsSystemDefine = c.Boolean(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.DocumentCategoryId) .Index(t => t.DocumentCategoryName, unique: true, name: "IX_DocumentCategory_DocumentCategoryName"); CreateTable( "Web.Menus", c => new { MenuId = c.Int(nullable: false, identity: true), MenuName = c.String(nullable: false, maxLength: 50), Srl = c.String(nullable: false, maxLength: 5), IconName = c.String(nullable: false, maxLength: 100), Description = c.String(nullable: false, maxLength: 100), URL = c.String(maxLength: 100), ModuleId = c.Int(nullable: false), SubModuleId = c.Int(nullable: false), ControllerActionId = c.Int(nullable: false), IsVisible = c.Boolean(), isDivisionBased = c.Boolean(), isSiteBased = c.Boolean(), RouteId = c.String(), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.MenuId) .ForeignKey("Web.ControllerActions", t => t.ControllerActionId) .ForeignKey("Web.MenuModules", t => t.ModuleId) .ForeignKey("Web.MenuSubModules", t => t.SubModuleId) .Index(t => new { t.MenuName, t.ModuleId, t.SubModuleId }, unique: true, name: "IX_Menu_MenuName") .Index(t => t.ControllerActionId); CreateTable( "Web.MenuModules", c => new { ModuleId = c.Int(nullable: false, identity: true), ModuleName = c.String(nullable: false, maxLength: 50), Srl = c.Int(nullable: false), IconName = c.String(nullable: false, maxLength: 100), IsActive = c.Boolean(nullable: false), URL = c.String(maxLength: 100), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.ModuleId) .Index(t => t.ModuleName, unique: true, name: "IX_Module_ModuleName"); CreateTable( "Web.MenuSubModules", c => new { SubModuleId = c.Int(nullable: false, identity: true), SubModuleName = c.String(nullable: false, maxLength: 50), IconName = c.String(nullable: false, maxLength: 100), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.SubModuleId) .Index(t => t.SubModuleName, unique: true, name: "IX_SubModule_SubModuleName"); CreateTable( "Web.Agents", c => new { PersonID = c.Int(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PersonID) .ForeignKey("Web.People", t => t.PersonID) .Index(t => t.PersonID); CreateTable( "Web.People", c => new { PersonID = c.Int(nullable: false, identity: true), Name = c.String(nullable: false, maxLength: 100), Suffix = c.String(nullable: false, maxLength: 20), Code = c.String(nullable: false, maxLength: 20), Description = c.String(maxLength: 500), Phone = c.String(maxLength: 11), Mobile = c.String(maxLength: 10), Email = c.String(maxLength: 100), IsActive = c.Boolean(nullable: false), Tags = c.String(), ImageFolderName = c.String(maxLength: 100), ImageFileName = c.String(maxLength: 100), IsSisterConcern = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), Nature = c.String(maxLength: 20), ApplicationUser_Id = c.String(maxLength: 128), }) .PrimaryKey(t => t.PersonID) .ForeignKey("Web.Users", t => t.ApplicationUser_Id) .Index(t => t.Code, unique: true, name: "IX_Person_Code") .Index(t => t.ApplicationUser_Id); CreateTable( "Web.Users", c => new { Id = c.String(nullable: false, maxLength: 128), Email = c.String(maxLength: 256), EmailConfirmed = c.Boolean(nullable: false), PasswordHash = c.String(), SecurityStamp = c.String(), PhoneNumber = c.String(), PhoneNumberConfirmed = c.Boolean(nullable: false), TwoFactorEnabled = c.Boolean(nullable: false), LockoutEndDateUtc = c.DateTime(), LockoutEnabled = c.Boolean(nullable: false), AccessFailedCount = c.Int(nullable: false), UserName = c.String(nullable: false, maxLength: 256), FirstName = c.String(), LastName = c.String(), Discriminator = c.String(nullable: false, maxLength: 128), }) .PrimaryKey(t => t.Id) .Index(t => t.UserName, unique: true, name: "UserNameIndex"); CreateTable( "Web.AspNetUserClaims", c => new { Id = c.Int(nullable: false, identity: true), UserId = c.String(), ClaimType = c.String(), ClaimValue = c.String(), IdentityUser_Id = c.String(maxLength: 128), }) .PrimaryKey(t => t.Id) .ForeignKey("Web.Users", t => t.IdentityUser_Id) .Index(t => t.IdentityUser_Id); CreateTable( "Web.AspNetUserLogins", c => new { LoginProvider = c.String(nullable: false, maxLength: 128), ProviderKey = c.String(nullable: false, maxLength: 128), UserId = c.String(nullable: false, maxLength: 128), IdentityUser_Id = c.String(maxLength: 128), }) .PrimaryKey(t => new { t.LoginProvider, t.ProviderKey, t.UserId }) .ForeignKey("Web.Users", t => t.IdentityUser_Id) .Index(t => t.IdentityUser_Id); CreateTable( "Web.AspNetUserRoles", c => new { UserId = c.String(nullable: false, maxLength: 128), RoleId = c.String(nullable: false, maxLength: 128), IdentityUser_Id = c.String(maxLength: 128), }) .PrimaryKey(t => new { t.UserId, t.RoleId }) .ForeignKey("Web.AspNetRoles", t => t.RoleId) .ForeignKey("Web.Users", t => t.IdentityUser_Id) .Index(t => t.RoleId) .Index(t => t.IdentityUser_Id); CreateTable( "Web.PersonAddresses", c => new { PersonAddressID = c.Int(nullable: false, identity: true), PersonId = c.Int(nullable: false), AddressType = c.String(), Address = c.String(), CityId = c.Int(), AreaId = c.Int(), Zipcode = c.String(nullable: false, maxLength: 6), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PersonAddressID) .ForeignKey("Web.Areas", t => t.AreaId) .ForeignKey("Web.Cities", t => t.CityId) .ForeignKey("Web.People", t => t.PersonId) .Index(t => t.PersonId) .Index(t => t.CityId) .Index(t => t.AreaId); CreateTable( "Web.Areas", c => new { AreaId = c.Int(nullable: false, identity: true), AreaName = c.String(nullable: false, maxLength: 50), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.AreaId) .Index(t => t.AreaName, unique: true, name: "IX_Area_AreaName"); CreateTable( "Web.Cities", c => new { CityId = c.Int(nullable: false, identity: true), CityName = c.String(nullable: false, maxLength: 50), StateId = c.Int(nullable: false), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.CityId) .ForeignKey("Web.States", t => t.StateId) .Index(t => t.CityName, unique: true, name: "IX_City_CityName") .Index(t => t.StateId); CreateTable( "Web.States", c => new { StateId = c.Int(nullable: false, identity: true), StateName = c.String(nullable: false, maxLength: 50), CountryId = c.Int(nullable: false), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), Calculation_CalculationId = c.Int(), Charge_ChargeId = c.Int(), }) .PrimaryKey(t => t.StateId) .ForeignKey("Web.Countries", t => t.CountryId) .ForeignKey("Web.Calculations", t => t.Calculation_CalculationId) .ForeignKey("Web.Charges", t => t.Charge_ChargeId) .Index(t => t.StateName, unique: true, name: "IX_State_StateName") .Index(t => t.CountryId) .Index(t => t.Calculation_CalculationId) .Index(t => t.Charge_ChargeId); CreateTable( "Web.Countries", c => new { CountryId = c.Int(nullable: false, identity: true), CountryName = c.String(nullable: false, maxLength: 50), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.CountryId) .Index(t => t.CountryName, unique: true, name: "IX_Country_Country"); CreateTable( "Web.PersonContacts", c => new { PersonContactID = c.Int(nullable: false, identity: true), PersonId = c.Int(nullable: false), PersonContactTypeId = c.Int(nullable: false), ContactId = c.Int(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), Person_PersonID = c.Int(), }) .PrimaryKey(t => t.PersonContactID) .ForeignKey("Web.People", t => t.ContactId) .ForeignKey("Web.People", t => t.PersonId) .ForeignKey("Web.PersonContactTypes", t => t.PersonContactTypeId) .ForeignKey("Web.People", t => t.Person_PersonID) .Index(t => t.PersonId) .Index(t => t.PersonContactTypeId) .Index(t => t.ContactId) .Index(t => t.Person_PersonID); CreateTable( "Web.PersonContactTypes", c => new { PersonContactTypeId = c.Int(nullable: false, identity: true), PersonContactTypeName = c.String(nullable: false, maxLength: 50), IsActive = c.Boolean(nullable: false), IsSystemDefine = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PersonContactTypeId) .Index(t => t.PersonContactTypeName, unique: true, name: "IX_PersonContactType_PersonContactTypeName"); CreateTable( "Web.AspNetRoles1", c => new { Id = c.String(nullable: false, maxLength: 128), Name = c.String(), }) .PrimaryKey(t => t.Id); CreateTable( "Web.AspNetUserRoles1", c => new { UserId = c.String(nullable: false, maxLength: 128), RoleId = c.String(nullable: false, maxLength: 128), }) .PrimaryKey(t => new { t.UserId, t.RoleId }) .ForeignKey("Web.AspNetRoles1", t => t.RoleId) .Index(t => t.RoleId); CreateTable( "Web.BomDetails", c => new { BomDetailId = c.Int(nullable: false, identity: true), BaseProductId = c.Int(nullable: false), BatchQty = c.Decimal(nullable: false, precision: 18, scale: 4), ProductId = c.Int(nullable: false), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), ConsumptionPer = c.Decimal(nullable: false, precision: 18, scale: 4), ProcessId = c.Int(), Dimension1Id = c.Int(), Dimension2Id = c.Int(), DevloperNotes = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.BomDetailId) .ForeignKey("Web.Products", t => t.BaseProductId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.Products", t => t.ProductId) .Index(t => t.BaseProductId) .Index(t => t.ProductId) .Index(t => t.ProcessId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id); CreateTable( "Web.Products", c => new { ProductId = c.Int(nullable: false, identity: true), ProductCode = c.String(nullable: false, maxLength: 20), ProductName = c.String(nullable: false, maxLength: 50), ProductDescription = c.String(maxLength: 1000), ProductSpecification = c.String(), StandardCost = c.Decimal(precision: 18, scale: 4), ProductGroupId = c.Int(), SalesTaxGroupProductId = c.Int(), DrawBackTariffHeadId = c.Int(), UnitId = c.String(maxLength: 3), DivisionId = c.Int(nullable: false), ImageFolderName = c.String(maxLength: 100), ImageFileName = c.String(maxLength: 100), StandardWeight = c.Decimal(precision: 18, scale: 4), Tags = c.String(), CBM = c.Decimal(precision: 18, scale: 4), IsActive = c.Boolean(nullable: false), IsSystemDefine = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), ReferenceDocTypeId = c.Int(), ReferenceDocId = c.Int(), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ProductId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.ReferenceDocTypeId) .ForeignKey("Web.DrawBackTariffHeads", t => t.DrawBackTariffHeadId) .ForeignKey("Web.ProductGroups", t => t.ProductGroupId) .ForeignKey("Web.SalesTaxGroupProducts", t => t.SalesTaxGroupProductId) .ForeignKey("Web.Units", t => t.UnitId) .Index(t => t.ProductCode, unique: true, name: "IX_Product_ProductCode") .Index(t => t.ProductName, unique: true, name: "IX_Product_ProductName") .Index(t => t.ProductGroupId) .Index(t => t.SalesTaxGroupProductId) .Index(t => t.DrawBackTariffHeadId) .Index(t => t.UnitId) .Index(t => t.DivisionId) .Index(t => t.ReferenceDocTypeId); CreateTable( "Web.Divisions", c => new { DivisionId = c.Int(nullable: false, identity: true), DivisionName = c.String(nullable: false, maxLength: 50), Address = c.String(maxLength: 250), LstNo = c.String(maxLength: 20), CstNo = c.String(maxLength: 20), IsActive = c.Boolean(nullable: false), IsSystemDefine = c.Boolean(nullable: false), CompanyId = c.Int(), ThemeColour = c.String(maxLength: 25), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.DivisionId) .Index(t => t.DivisionName, unique: true, name: "IX_Division_Division"); CreateTable( "Web.DrawBackTariffHeads", c => new { DrawBackTariffHeadId = c.Int(nullable: false, identity: true), DrawBackTariffHeadName = c.String(nullable: false, maxLength: 50), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.DrawBackTariffHeadId) .Index(t => t.DrawBackTariffHeadName, unique: true, name: "IX_DrawBackTariffHead_DrawBackTariffHeadName"); CreateTable( "Web.JobOrderBoms", c => new { JobOrderBomId = c.Int(nullable: false, identity: true), JobOrderHeaderId = c.Int(nullable: false), JobOrderLineId = c.Int(), ProductId = c.Int(nullable: false), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), Dimension1Id = c.Int(), Dimension2Id = c.Int(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.JobOrderBomId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.JobOrderHeaders", t => t.JobOrderHeaderId) .ForeignKey("Web.JobOrderLines", t => t.JobOrderLineId) .ForeignKey("Web.Products", t => t.ProductId) .Index(t => t.JobOrderHeaderId) .Index(t => t.JobOrderLineId) .Index(t => t.ProductId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id); CreateTable( "Web.Dimension1", c => new { Dimension1Id = c.Int(nullable: false, identity: true), Dimension1Name = c.String(nullable: false, maxLength: 50), ProductTypeId = c.Int(), IsActive = c.Boolean(nullable: false), Description = c.String(maxLength: 50), ReferenceDocTypeId = c.Int(), ReferenceDocId = c.Int(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.Dimension1Id) .ForeignKey("Web.ProductTypes", t => t.ProductTypeId) .ForeignKey("Web.DocumentTypes", t => t.ReferenceDocTypeId) .Index(t => t.Dimension1Name, unique: true, name: "IX_Dimension1_Dimension1Name") .Index(t => t.ProductTypeId) .Index(t => t.ReferenceDocTypeId); CreateTable( "Web.ProductTypes", c => new { ProductTypeId = c.Int(nullable: false, identity: true), ProductTypeName = c.String(nullable: false, maxLength: 50), ProductNatureId = c.Int(nullable: false), ImageFolderName = c.String(maxLength: 100), ImageFileName = c.String(maxLength: 100), IsCustomUI = c.Boolean(), IsActive = c.Boolean(nullable: false), IsPostedInStock = c.Boolean(nullable: false), IsSystemDefine = c.Boolean(nullable: false), Dimension1TypeId = c.Int(), Dimension2TypeId = c.Int(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ProductTypeId) .ForeignKey("Web.Dimension1Types", t => t.Dimension1TypeId) .ForeignKey("Web.Dimension2Types", t => t.Dimension2TypeId) .ForeignKey("Web.ProductNatures", t => t.ProductNatureId) .Index(t => t.ProductTypeName, unique: true, name: "IX_ProductType_ProductTypeName") .Index(t => t.ProductNatureId) .Index(t => t.Dimension1TypeId) .Index(t => t.Dimension2TypeId); CreateTable( "Web.Dimension1Types", c => new { Dimension1TypeId = c.Int(nullable: false, identity: true), Dimension1TypeName = c.String(nullable: false, maxLength: 50), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.Dimension1TypeId) .Index(t => t.Dimension1TypeName, unique: true, name: "IX_Dimension1Type_Dimension1TypeName"); CreateTable( "Web.Dimension2Types", c => new { Dimension2TypeId = c.Int(nullable: false, identity: true), Dimension2TypeName = c.String(nullable: false, maxLength: 50), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.Dimension2TypeId) .Index(t => t.Dimension2TypeName, unique: true, name: "IX_Dimension2Type_Dimension2TypeName"); CreateTable( "Web.ProductCategories", c => new { ProductCategoryId = c.Int(nullable: false, identity: true), ProductCategoryName = c.String(nullable: false, maxLength: 50), ProductTypeId = c.Int(nullable: false), IsSystemDefine = c.Boolean(nullable: false), IsActive = c.Boolean(nullable: false), ImageFolderName = c.String(maxLength: 100), ImageFileName = c.String(maxLength: 100), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ProductCategoryId) .ForeignKey("Web.ProductTypes", t => t.ProductTypeId) .Index(t => t.ProductCategoryName, unique: true, name: "IX_ProductCategory_ProductCategoryName") .Index(t => t.ProductTypeId); CreateTable( "Web.ProductDesigns", c => new { ProductDesignId = c.Int(nullable: false, identity: true), ProductDesignName = c.String(nullable: false, maxLength: 50), ProductTypeId = c.Int(), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ProductDesignId) .ForeignKey("Web.ProductTypes", t => t.ProductTypeId) .Index(t => t.ProductDesignName, unique: true, name: "IX_ProductDesign_ProductDesignName") .Index(t => t.ProductTypeId); CreateTable( "Web.ProductGroups", c => new { ProductGroupId = c.Int(nullable: false, identity: true), ProductGroupName = c.String(nullable: false, maxLength: 50), ProductTypeId = c.Int(nullable: false), IsSystemDefine = c.Boolean(nullable: false), IsActive = c.Boolean(nullable: false), ImageFolderName = c.String(maxLength: 100), ImageFileName = c.String(maxLength: 100), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ProductGroupId) .ForeignKey("Web.ProductTypes", t => t.ProductTypeId) .Index(t => t.ProductGroupName, unique: true, name: "IX_ProductGroup_ProductGroupName") .Index(t => t.ProductTypeId); CreateTable( "Web.ProductNatures", c => new { ProductNatureId = c.Int(nullable: false, identity: true), ProductNatureName = c.String(nullable: false, maxLength: 50), ImageFolderName = c.String(maxLength: 100), ImageFileName = c.String(maxLength: 100), IsActive = c.Boolean(nullable: false), IsSystemDefine = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ProductNatureId) .Index(t => t.ProductNatureName, unique: true, name: "IX_ProductNature_ProductNatureName"); CreateTable( "Web.ProductTypeAttributes", c => new { ProductTypeAttributeId = c.Int(nullable: false, identity: true), Name = c.String(nullable: false), IsMandatory = c.Boolean(nullable: false), DataType = c.String(), ListItem = c.String(), DefaultValue = c.String(), IsActive = c.Boolean(nullable: false), ProductType_ProductTypeId = c.Int(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ProductTypeAttributeId) .ForeignKey("Web.ProductTypes", t => t.ProductType_ProductTypeId) .Index(t => t.ProductType_ProductTypeId); CreateTable( "Web.Dimension2", c => new { Dimension2Id = c.Int(nullable: false, identity: true), Dimension2Name = c.String(nullable: false, maxLength: 50), ProductTypeId = c.Int(), IsSystemDefine = c.Boolean(nullable: false), IsActive = c.Boolean(nullable: false), Description = c.String(maxLength: 50), ReferenceDocTypeId = c.Int(), ReferenceDocId = c.Int(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.Dimension2Id) .ForeignKey("Web.ProductTypes", t => t.ProductTypeId) .ForeignKey("Web.DocumentTypes", t => t.ReferenceDocTypeId) .Index(t => t.Dimension2Name, unique: true, name: "IX_Dimension2_Dimension2Name") .Index(t => t.ProductTypeId) .Index(t => t.ReferenceDocTypeId); CreateTable( "Web.JobOrderHeaders", c => new { JobOrderHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(maxLength: 20), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DueDate = c.DateTime(nullable: false), ActualDueDate = c.DateTime(nullable: false), ActualDocDate = c.DateTime(nullable: false), JobWorkerId = c.Int(nullable: false), BillToPartyId = c.Int(nullable: false), OrderById = c.Int(), GodownId = c.Int(), ProcessId = c.Int(nullable: false), CostCenterId = c.Int(), MachineId = c.Int(), TermsAndConditions = c.String(), CreditDays = c.Int(), Remark = c.String(), GatePassHeaderId = c.Int(), StockHeaderId = c.Int(), Status = c.Int(nullable: false), UnitConversionForId = c.Byte(), ReviewCount = c.Int(), ReviewBy = c.String(), CreatedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedBy = c.String(), ModifiedDate = c.DateTime(nullable: false), LockReason = c.String(), Priority = c.Int(nullable: false), IsGatePassPrinted = c.Boolean(), OMSId = c.String(maxLength: 50), ReferentialCheckSum = c.Int(nullable: false), }) .PrimaryKey(t => t.JobOrderHeaderId) .ForeignKey("Web.JobWorkers", t => t.BillToPartyId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.GatePassHeaders", t => t.GatePassHeaderId) .ForeignKey("Web.Godowns", t => t.GodownId) .ForeignKey("Web.JobWorkers", t => t.JobWorkerId) .ForeignKey("Web.Machines", t => t.MachineId) .ForeignKey("Web.Employees", t => t.OrderById) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.Sites", t => t.SiteId) .ForeignKey("Web.StockHeaders", t => t.StockHeaderId) .ForeignKey("Web.UnitConversionFors", t => t.UnitConversionForId) .Index(t => t.DocTypeId) .Index(t => t.DivisionId) .Index(t => t.SiteId) .Index(t => t.JobWorkerId) .Index(t => t.BillToPartyId) .Index(t => t.OrderById) .Index(t => t.GodownId) .Index(t => t.ProcessId) .Index(t => t.CostCenterId) .Index(t => t.MachineId) .Index(t => t.GatePassHeaderId) .Index(t => t.StockHeaderId) .Index(t => t.UnitConversionForId); CreateTable( "Web.JobWorkers", c => new { PersonID = c.Int(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PersonID) .ForeignKey("Web.People", t => t.PersonID) .Index(t => t.PersonID); CreateTable( "Web.CostCenters", c => new { CostCenterId = c.Int(nullable: false, identity: true), CostCenterName = c.String(nullable: false, maxLength: 50), DocTypeId = c.Int(), DivisionId = c.Int(), SiteId = c.Int(), Status = c.Int(nullable: false), LedgerAccountId = c.Int(), ParentCostCenterId = c.Int(), ProcessId = c.Int(), IsActive = c.Boolean(nullable: false), IsSystemDefine = c.Boolean(nullable: false), ReferenceDocTypeId = c.Int(), StartDate = c.DateTime(), CloseDate = c.DateTime(), ReferenceDocId = c.Int(), ReferenceDocNo = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.CostCenterId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountId) .ForeignKey("Web.CostCenters", t => t.ParentCostCenterId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.DocumentTypes", t => t.ReferenceDocTypeId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.CostCenterName, unique: true, name: "IX_CostCenter_CostCenterName") .Index(t => t.DocTypeId) .Index(t => t.DivisionId) .Index(t => t.SiteId) .Index(t => t.LedgerAccountId) .Index(t => t.ParentCostCenterId) .Index(t => t.ProcessId) .Index(t => t.ReferenceDocTypeId); CreateTable( "Web.LedgerAccounts", c => new { LedgerAccountId = c.Int(nullable: false, identity: true), LedgerAccountName = c.String(nullable: false, maxLength: 100), LedgerAccountSuffix = c.String(nullable: false, maxLength: 20), PersonId = c.Int(), LedgerAccountGroupId = c.Int(nullable: false), IsActive = c.Boolean(nullable: false), IsSystemDefine = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.LedgerAccountId) .ForeignKey("Web.LedgerAccountGroups", t => t.LedgerAccountGroupId) .ForeignKey("Web.People", t => t.PersonId) .Index(t => new { t.LedgerAccountName, t.LedgerAccountSuffix }, unique: true, name: "IX_LedgerAccount_LedgerAccountName") .Index(t => t.PersonId) .Index(t => t.LedgerAccountGroupId); CreateTable( "Web.LedgerAccountGroups", c => new { LedgerAccountGroupId = c.Int(nullable: false, identity: true), LedgerAccountGroupName = c.String(nullable: false, maxLength: 50), IsActive = c.Boolean(nullable: false), IsSystemDefine = c.Boolean(nullable: false), LedgerAccountType = c.String(maxLength: 10), LedgerAccountNature = c.String(maxLength: 10), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.LedgerAccountGroupId) .Index(t => t.LedgerAccountGroupName, unique: true, name: "IX_LedgerAccountGroup_LedgerAccountGroupName"); CreateTable( "Web.Processes", c => new { ProcessId = c.Int(nullable: false, identity: true), ProcessCode = c.String(nullable: false, maxLength: 50), ProcessName = c.String(nullable: false, maxLength: 50), ParentProcessId = c.Int(), AccountId = c.Int(nullable: false), IsAffectedStock = c.Boolean(nullable: false), IsSystemDefine = c.Boolean(nullable: false), IsActive = c.Boolean(nullable: false), CostCenterId = c.Int(), ProcessSr = c.Int(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ProcessId) .ForeignKey("Web.LedgerAccounts", t => t.AccountId) .ForeignKey("Web.Processes", t => t.ParentProcessId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .Index(t => t.ProcessCode, unique: true, name: "IX_Process_ProcessCode") .Index(t => t.ProcessName, unique: true, name: "IX_Process_ProcessName") .Index(t => t.ParentProcessId) .Index(t => t.AccountId) .Index(t => t.CostCenterId); CreateTable( "Web.Sites", c => new { SiteId = c.Int(nullable: false, identity: true), SiteName = c.String(nullable: false, maxLength: 50), SiteCode = c.String(maxLength: 250), Address = c.String(maxLength: 20), PhoneNo = c.String(maxLength: 50), CityId = c.Int(nullable: false), PersonId = c.Int(), DefaultGodownId = c.Int(), DefaultDivisionId = c.Int(), IsActive = c.Boolean(nullable: false), IsSystemDefine = c.Boolean(nullable: false), ThemeColour = c.String(maxLength: 25), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.SiteId) .ForeignKey("Web.Cities", t => t.CityId) .ForeignKey("Web.Divisions", t => t.DefaultDivisionId) .ForeignKey("Web.Godowns", t => t.DefaultGodownId) .ForeignKey("Web.People", t => t.PersonId) .Index(t => t.CityId) .Index(t => t.PersonId) .Index(t => t.DefaultGodownId) .Index(t => t.DefaultDivisionId); CreateTable( "Web.Godowns", c => new { GodownId = c.Int(nullable: false, identity: true), GodownName = c.String(nullable: false, maxLength: 50), SiteId = c.Int(nullable: false), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), GateId = c.Int(), }) .PrimaryKey(t => t.GodownId) .ForeignKey("Web.Gates", t => t.GateId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.GodownName, unique: true, name: "IX_Godown_GodownName") .Index(t => t.SiteId) .Index(t => t.GateId); CreateTable( "Web.Gates", c => new { GateId = c.Int(nullable: false, identity: true), GateName = c.String(nullable: false, maxLength: 50), SiteId = c.Int(nullable: false), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.GateId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.GateName, unique: true, name: "IX_Gate_GateName") .Index(t => t.SiteId); CreateTable( "Web.GatePassHeaders", c => new { GatePassHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(nullable: false, maxLength: 20), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), PersonId = c.Int(nullable: false), GodownId = c.Int(nullable: false), Remark = c.String(), Status = c.Int(nullable: false), CreatedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedBy = c.String(), ModifiedDate = c.DateTime(nullable: false), ReferenceDocTypeId = c.Int(), ReferenceDocId = c.Int(), ReferenceDocNo = c.String(), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.GatePassHeaderId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Godowns", t => t.GodownId) .ForeignKey("Web.People", t => t.PersonId) .ForeignKey("Web.DocumentTypes", t => t.ReferenceDocTypeId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => new { t.DocTypeId, t.DocNo, t.DivisionId }, unique: true, name: "IX_GatePassHeader_DocID") .Index(t => t.SiteId) .Index(t => t.PersonId) .Index(t => t.GodownId) .Index(t => t.ReferenceDocTypeId); CreateTable( "Web.GatePassLines", c => new { GatePassLineId = c.Int(nullable: false, identity: true), GatePassHeaderId = c.Int(nullable: false), Product = c.String(nullable: false, maxLength: 100), Specification = c.String(maxLength: 50), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), UnitId = c.String(maxLength: 3), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.GatePassLineId) .ForeignKey("Web.GatePassHeaders", t => t.GatePassHeaderId) .ForeignKey("Web.Units", t => t.UnitId) .Index(t => t.GatePassHeaderId) .Index(t => t.UnitId); CreateTable( "Web.Units", c => new { UnitId = c.String(nullable: false, maxLength: 3), UnitName = c.String(nullable: false, maxLength: 20), Symbol = c.String(maxLength: 1), FractionName = c.String(maxLength: 20), FractionUnits = c.Int(), FractionSymbol = c.String(maxLength: 1), DecimalPlaces = c.Byte(nullable: false), IsSystemDefine = c.Boolean(nullable: false), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.UnitId) .Index(t => t.UnitName, unique: true, name: "IX_Unit_UnitName"); CreateTable( "Web.JobOrderLines", c => new { JobOrderLineId = c.Int(nullable: false, identity: true), JobOrderHeaderId = c.Int(nullable: false), ProductUidId = c.Int(), ProductId = c.Int(nullable: false), ProdOrderLineId = c.Int(), Dimension1Id = c.Int(), Dimension2Id = c.Int(), Specification = c.String(maxLength: 50), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), DueDate = c.DateTime(), LotNo = c.String(maxLength: 50), FromProcessId = c.Int(), UnitId = c.String(maxLength: 3), DealUnitId = c.String(maxLength: 3), DealQty = c.Decimal(nullable: false, precision: 18, scale: 4), UnitConversionMultiplier = c.Decimal(nullable: false, precision: 18, scale: 4), NonCountedQty = c.Decimal(nullable: false, precision: 18, scale: 4), LossQty = c.Decimal(precision: 18, scale: 4), Rate = c.Decimal(nullable: false, precision: 18, scale: 4), Amount = c.Decimal(nullable: false, precision: 18, scale: 4), Remark = c.String(), StockId = c.Int(), StockProcessId = c.Int(), ProductUidHeaderId = c.Int(), Sr = c.Int(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), LockReason = c.String(), OMSId = c.String(maxLength: 50), ProductUidLastTransactionDocId = c.Int(), ProductUidLastTransactionDocNo = c.String(), ProductUidLastTransactionDocTypeId = c.Int(), ProductUidLastTransactionDocDate = c.DateTime(), ProductUidLastTransactionPersonId = c.Int(), ProductUidCurrentGodownId = c.Int(), ProductUidCurrentProcessId = c.Int(), ProductUidStatus = c.String(maxLength: 10), }) .PrimaryKey(t => t.JobOrderLineId) .ForeignKey("Web.Units", t => t.DealUnitId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.Processes", t => t.FromProcessId) .ForeignKey("Web.JobOrderHeaders", t => t.JobOrderHeaderId) .ForeignKey("Web.ProdOrderLines", t => t.ProdOrderLineId) .ForeignKey("Web.Products", t => t.ProductId) .ForeignKey("Web.ProductUids", t => t.ProductUidId) .ForeignKey("Web.Godowns", t => t.ProductUidCurrentGodownId) .ForeignKey("Web.Processes", t => t.ProductUidCurrentProcessId) .ForeignKey("Web.ProductUidHeaders", t => t.ProductUidHeaderId) .ForeignKey("Web.DocumentTypes", t => t.ProductUidLastTransactionDocTypeId) .ForeignKey("Web.People", t => t.ProductUidLastTransactionPersonId) .ForeignKey("Web.Stocks", t => t.StockId) .ForeignKey("Web.StockProcesses", t => t.StockProcessId) .ForeignKey("Web.Units", t => t.UnitId) .Index(t => t.JobOrderHeaderId) .Index(t => t.ProductUidId) .Index(t => t.ProductId) .Index(t => t.ProdOrderLineId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id) .Index(t => t.FromProcessId) .Index(t => t.UnitId) .Index(t => t.DealUnitId) .Index(t => t.StockId) .Index(t => t.StockProcessId) .Index(t => t.ProductUidHeaderId) .Index(t => t.ProductUidLastTransactionDocTypeId) .Index(t => t.ProductUidLastTransactionPersonId) .Index(t => t.ProductUidCurrentGodownId) .Index(t => t.ProductUidCurrentProcessId); CreateTable( "Web.ProdOrderLines", c => new { ProdOrderLineId = c.Int(nullable: false, identity: true), ProdOrderHeaderId = c.Int(nullable: false), ProductId = c.Int(nullable: false), Dimension1Id = c.Int(), Dimension2Id = c.Int(), Specification = c.String(maxLength: 50), ProcessId = c.Int(), MaterialPlanLineId = c.Int(), ReferenceDocTypeId = c.Int(), ReferenceDocLineId = c.Int(), Sr = c.Int(), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), Remark = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), LockReason = c.String(), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ProdOrderLineId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.MaterialPlanLines", t => t.MaterialPlanLineId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.ProdOrderHeaders", t => t.ProdOrderHeaderId) .ForeignKey("Web.Products", t => t.ProductId) .ForeignKey("Web.DocumentTypes", t => t.ReferenceDocTypeId) .Index(t => t.ProdOrderHeaderId) .Index(t => t.ProductId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id) .Index(t => t.ProcessId) .Index(t => t.MaterialPlanLineId) .Index(t => t.ReferenceDocTypeId); CreateTable( "Web.MaterialPlanLines", c => new { MaterialPlanLineId = c.Int(nullable: false, identity: true), MaterialPlanHeaderId = c.Int(nullable: false), GeneratedFor = c.String(maxLength: 10), ProductId = c.Int(nullable: false), RequiredQty = c.Decimal(nullable: false, precision: 18, scale: 4), DueDate = c.DateTime(), ExcessStockQty = c.Decimal(nullable: false, precision: 18, scale: 4), StockPlanQty = c.Decimal(nullable: false, precision: 18, scale: 4), ProdPlanQty = c.Decimal(nullable: false, precision: 18, scale: 4), PurchPlanQty = c.Decimal(nullable: false, precision: 18, scale: 4), ProcessId = c.Int(), Remark = c.String(), Dimension1Id = c.Int(), Dimension2Id = c.Int(), Specification = c.String(), LockReason = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), Sr = c.Int(), }) .PrimaryKey(t => t.MaterialPlanLineId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.MaterialPlanHeaders", t => t.MaterialPlanHeaderId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.Products", t => t.ProductId) .Index(t => t.MaterialPlanHeaderId) .Index(t => t.ProductId) .Index(t => t.ProcessId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id); CreateTable( "Web.MaterialPlanHeaders", c => new { MaterialPlanHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(maxLength: 20), BuyerId = c.Int(), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DueDate = c.DateTime(nullable: false), GodownId = c.Int(), ReferenceDocTypeId = c.Int(), ReferenceDocId = c.Int(), Status = c.Int(nullable: false), Remark = c.String(), LockReason = c.String(), ReviewCount = c.Int(), ReviewBy = c.String(), CreatedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedBy = c.String(), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.MaterialPlanHeaderId) .ForeignKey("Web.Buyers", t => t.BuyerId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Godowns", t => t.GodownId) .ForeignKey("Web.DocumentTypes", t => t.ReferenceDocTypeId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.DocTypeId) .Index(t => t.BuyerId) .Index(t => t.DivisionId) .Index(t => t.SiteId) .Index(t => t.GodownId) .Index(t => t.ReferenceDocTypeId); CreateTable( "Web.Buyers", c => new { PersonID = c.Int(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PersonID) .ForeignKey("Web.People", t => t.PersonID) .Index(t => t.PersonID); CreateTable( "Web.ProdOrderHeaders", c => new { ProdOrderHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(maxLength: 20), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DueDate = c.DateTime(nullable: false), ReferenceDocTypeId = c.Int(), ReferenceDocId = c.Int(), Status = c.Int(nullable: false), Remark = c.String(), BuyerId = c.Int(), ReviewCount = c.Int(), ReviewBy = c.String(), CreatedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedBy = c.String(), ModifiedDate = c.DateTime(nullable: false), MaterialPlanHeaderId = c.Int(), LockReason = c.String(), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ProdOrderHeaderId) .ForeignKey("Web.Buyers", t => t.BuyerId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.MaterialPlanHeaders", t => t.MaterialPlanHeaderId) .ForeignKey("Web.DocumentTypes", t => t.ReferenceDocTypeId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.DocTypeId) .Index(t => t.DivisionId) .Index(t => t.SiteId) .Index(t => t.ReferenceDocTypeId) .Index(t => t.BuyerId) .Index(t => t.MaterialPlanHeaderId); CreateTable( "Web.ProductUids", c => new { ProductUIDId = c.Int(nullable: false, identity: true), ProductUidName = c.String(nullable: false, maxLength: 50), ProductUidHeaderId = c.Int(), ProductId = c.Int(nullable: false), Dimension1Id = c.Int(), Dimension2Id = c.Int(), LotNo = c.String(maxLength: 50), GenDocId = c.Int(), GenLineId = c.Int(), GenDocNo = c.String(), GenDocTypeId = c.Int(), GenDocDate = c.DateTime(), GenPersonId = c.Int(), LastTransactionDocId = c.Int(), LastTransactionLineId = c.Int(), LastTransactionDocNo = c.String(), LastTransactionDocTypeId = c.Int(), LastTransactionDocDate = c.DateTime(), LastTransactionPersonId = c.Int(), CurrenctGodownId = c.Int(), CurrenctProcessId = c.Int(), Status = c.String(maxLength: 10), ProcessesDone = c.String(), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ProductUIDId) .ForeignKey("Web.Godowns", t => t.CurrenctGodownId) .ForeignKey("Web.Processes", t => t.CurrenctProcessId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.DocumentTypes", t => t.GenDocTypeId) .ForeignKey("Web.Buyers", t => t.GenPersonId) .ForeignKey("Web.DocumentTypes", t => t.LastTransactionDocTypeId) .ForeignKey("Web.People", t => t.LastTransactionPersonId) .ForeignKey("Web.Products", t => t.ProductId) .ForeignKey("Web.ProductUidHeaders", t => t.ProductUidHeaderId) .Index(t => t.ProductUidName, unique: true, name: "IX_ProductUid_ProductUidName") .Index(t => t.ProductUidHeaderId) .Index(t => t.ProductId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id) .Index(t => t.GenDocTypeId) .Index(t => t.GenPersonId) .Index(t => t.LastTransactionDocTypeId) .Index(t => t.LastTransactionPersonId) .Index(t => t.CurrenctGodownId) .Index(t => t.CurrenctProcessId); CreateTable( "Web.PackingLines", c => new { PackingLineId = c.Int(nullable: false, identity: true), PackingHeaderId = c.Int(nullable: false), ProductUidId = c.Int(), ProductId = c.Int(nullable: false), Dimension1Id = c.Int(), Dimension2Id = c.Int(), SaleOrderLineId = c.Int(), SaleDeliveryOrderLineId = c.Int(), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), BaleNo = c.String(maxLength: 10), LotNo = c.String(maxLength: 50), FromProcessId = c.Int(), PartyProductUid = c.String(maxLength: 50), DealUnitId = c.String(nullable: false, maxLength: 3), DealQty = c.Decimal(nullable: false, precision: 18, scale: 4), GrossWeight = c.Decimal(nullable: false, precision: 18, scale: 4), NetWeight = c.Decimal(nullable: false, precision: 18, scale: 4), Remark = c.String(), Specification = c.String(), LockReason = c.String(), UnitConversionMultiplier = c.Decimal(nullable: false, precision: 18, scale: 4), StockIssueId = c.Int(), StockReceiveId = c.Int(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), ProductUidLastTransactionDocId = c.Int(), ProductUidLastTransactionDocNo = c.String(), ProductUidLastTransactionDocTypeId = c.Int(), ProductUidLastTransactionDocDate = c.DateTime(), ProductUidLastTransactionPersonId = c.Int(), ProductUidCurrentGodownId = c.Int(), ProductUidCurrentProcessId = c.Int(), ProductUidStatus = c.String(maxLength: 10), }) .PrimaryKey(t => t.PackingLineId) .ForeignKey("Web.Units", t => t.DealUnitId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.Processes", t => t.FromProcessId) .ForeignKey("Web.PackingHeaders", t => t.PackingHeaderId) .ForeignKey("Web.Products", t => t.ProductId) .ForeignKey("Web.ProductUids", t => t.ProductUidId) .ForeignKey("Web.Godowns", t => t.ProductUidCurrentGodownId) .ForeignKey("Web.Processes", t => t.ProductUidCurrentProcessId) .ForeignKey("Web.DocumentTypes", t => t.ProductUidLastTransactionDocTypeId) .ForeignKey("Web.People", t => t.ProductUidLastTransactionPersonId) .ForeignKey("Web.SaleDeliveryOrderLines", t => t.SaleDeliveryOrderLineId) .ForeignKey("Web.SaleOrderLines", t => t.SaleOrderLineId) .ForeignKey("Web.Stocks", t => t.StockIssueId) .ForeignKey("Web.Stocks", t => t.StockReceiveId) .Index(t => t.PackingHeaderId) .Index(t => t.ProductUidId) .Index(t => t.ProductId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id) .Index(t => t.SaleOrderLineId) .Index(t => t.SaleDeliveryOrderLineId) .Index(t => t.FromProcessId) .Index(t => t.DealUnitId) .Index(t => t.StockIssueId) .Index(t => t.StockReceiveId) .Index(t => t.ProductUidLastTransactionDocTypeId) .Index(t => t.ProductUidLastTransactionPersonId) .Index(t => t.ProductUidCurrentGodownId) .Index(t => t.ProductUidCurrentProcessId); CreateTable( "Web.PackingHeaders", c => new { PackingHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(nullable: false, maxLength: 20), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), StockHeaderId = c.Int(), BuyerId = c.Int(nullable: false), JobWorkerId = c.Int(), GodownId = c.Int(nullable: false), ShipMethodId = c.Int(nullable: false), DealUnitId = c.String(maxLength: 3), BaleNoPattern = c.Byte(nullable: false), Remark = c.String(), LockReason = c.String(), Status = c.Int(nullable: false), ReviewCount = c.Int(), ReviewBy = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PackingHeaderId) .ForeignKey("Web.People", t => t.BuyerId) .ForeignKey("Web.Units", t => t.DealUnitId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Godowns", t => t.GodownId) .ForeignKey("Web.JobWorkers", t => t.JobWorkerId) .ForeignKey("Web.ShipMethods", t => t.ShipMethodId) .ForeignKey("Web.Sites", t => t.SiteId) .ForeignKey("Web.StockHeaders", t => t.StockHeaderId) .Index(t => new { t.DocTypeId, t.DocNo, t.DivisionId, t.SiteId }, unique: true, name: "IX_PackingHeader_DocID") .Index(t => t.StockHeaderId) .Index(t => t.BuyerId) .Index(t => t.JobWorkerId) .Index(t => t.GodownId) .Index(t => t.ShipMethodId) .Index(t => t.DealUnitId); CreateTable( "Web.ShipMethods", c => new { ShipMethodId = c.Int(nullable: false, identity: true), ShipMethodName = c.String(nullable: false, maxLength: 50), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ShipMethodId) .Index(t => t.ShipMethodName, unique: true, name: "IX_ShipMethod_ShipMethodName"); CreateTable( "Web.StockHeaders", c => new { StockHeaderId = c.Int(nullable: false, identity: true), DocHeaderId = c.Int(), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(nullable: false, maxLength: 20), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), CurrencyId = c.Int(), PersonId = c.Int(), ProcessId = c.Int(), FromGodownId = c.Int(), GodownId = c.Int(), GatePassHeaderId = c.Int(), Remark = c.String(), Status = c.Int(nullable: false), CostCenterId = c.Int(), MachineId = c.Int(), LedgerHeaderId = c.Int(), ContraLedgerAccountId = c.Int(), LedgerAccountId = c.Int(), ReviewCount = c.Int(), ReviewBy = c.String(), CreatedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedBy = c.String(), ModifiedDate = c.DateTime(nullable: false), ReferenceDocTypeId = c.Int(), ReferenceDocId = c.Int(), LockReason = c.String(), IsGatePassPrinted = c.Boolean(), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.StockHeaderId) .ForeignKey("Web.LedgerAccounts", t => t.ContraLedgerAccountId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.Currencies", t => t.CurrencyId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Godowns", t => t.FromGodownId) .ForeignKey("Web.GatePassHeaders", t => t.GatePassHeaderId) .ForeignKey("Web.Godowns", t => t.GodownId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountId) .ForeignKey("Web.LedgerHeaders", t => t.LedgerHeaderId) .ForeignKey("Web.Machines", t => t.MachineId) .ForeignKey("Web.People", t => t.PersonId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.DocumentTypes", t => t.ReferenceDocTypeId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => new { t.DocTypeId, t.DocNo, t.DivisionId, t.SiteId }, unique: true, name: "IX_StockHeader_DocID") .Index(t => t.CurrencyId) .Index(t => t.PersonId) .Index(t => t.ProcessId) .Index(t => t.FromGodownId) .Index(t => t.GodownId) .Index(t => t.GatePassHeaderId) .Index(t => t.CostCenterId) .Index(t => t.MachineId) .Index(t => t.LedgerHeaderId) .Index(t => t.ContraLedgerAccountId) .Index(t => t.LedgerAccountId) .Index(t => t.ReferenceDocTypeId); CreateTable( "Web.Currencies", c => new { ID = c.Int(nullable: false, identity: true), Name = c.String(nullable: false, maxLength: 20), Symbol = c.String(nullable: false, maxLength: 5), FractionName = c.String(maxLength: 20), FractionUnits = c.Int(), FractionSymbol = c.String(maxLength: 1), BaseCurrencyRate = c.Decimal(nullable: false, precision: 18, scale: 4), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ID) .Index(t => t.Name, unique: true, name: "IX_Currency_Name"); CreateTable( "Web.LedgerHeaders", c => new { LedgerHeaderId = c.Int(nullable: false, identity: true), DocHeaderId = c.Int(), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), PaymentFor = c.DateTime(), DocNo = c.String(nullable: false, maxLength: 20), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), LedgerAccountId = c.Int(), ProcessId = c.Int(), CostCenterId = c.Int(), CreditDays = c.Int(), GodownId = c.Int(), Narration = c.String(), Remark = c.String(), Status = c.Int(nullable: false), LockReason = c.String(), AdjustmentType = c.String(maxLength: 20), ReviewCount = c.Int(), ReviewBy = c.String(), CreatedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedBy = c.String(), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.LedgerHeaderId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Godowns", t => t.GodownId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => new { t.DocTypeId, t.DocNo, t.DivisionId, t.SiteId }, unique: true, name: "IX_LedgerHeader_DocID") .Index(t => t.LedgerAccountId) .Index(t => t.ProcessId) .Index(t => t.CostCenterId) .Index(t => t.GodownId); CreateTable( "Web.Machines", c => new { MachineId = c.Int(nullable: false, identity: true), MachineName = c.String(nullable: false, maxLength: 50), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.MachineId) .Index(t => t.MachineName, unique: true, name: "IX_Machine_MachineName"); CreateTable( "Web.StockLines", c => new { StockLineId = c.Int(nullable: false, identity: true), StockHeaderId = c.Int(nullable: false), ProductUidId = c.Int(), RequisitionLineId = c.Int(), ProductId = c.Int(nullable: false), FromProcessId = c.Int(), LotNo = c.String(maxLength: 10), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), Remark = c.String(), FromStockId = c.Int(), StockId = c.Int(), StockProcessId = c.Int(), FromStockProcessId = c.Int(), Dimension1Id = c.Int(), Dimension2Id = c.Int(), Specification = c.String(maxLength: 50), Rate = c.Decimal(nullable: false, precision: 18, scale: 4), Amount = c.Decimal(nullable: false, precision: 18, scale: 4), CostCenterId = c.Int(), DocNature = c.String(maxLength: 1), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), LockReason = c.String(), OMSId = c.String(maxLength: 50), Sr = c.Int(), Weight = c.Decimal(precision: 18, scale: 4), ProductUidLastTransactionDocId = c.Int(), ProductUidLastTransactionDocNo = c.String(), ProductUidLastTransactionDocTypeId = c.Int(), ProductUidLastTransactionDocDate = c.DateTime(), ProductUidLastTransactionPersonId = c.Int(), ProductUidCurrentGodownId = c.Int(), ProductUidCurrentProcessId = c.Int(), ProductUidStatus = c.String(maxLength: 10), }) .PrimaryKey(t => t.StockLineId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.Processes", t => t.FromProcessId) .ForeignKey("Web.Stocks", t => t.FromStockId) .ForeignKey("Web.StockProcesses", t => t.FromStockProcessId) .ForeignKey("Web.Products", t => t.ProductId) .ForeignKey("Web.ProductUids", t => t.ProductUidId) .ForeignKey("Web.Godowns", t => t.ProductUidCurrentGodownId) .ForeignKey("Web.Processes", t => t.ProductUidCurrentProcessId) .ForeignKey("Web.DocumentTypes", t => t.ProductUidLastTransactionDocTypeId) .ForeignKey("Web.People", t => t.ProductUidLastTransactionPersonId) .ForeignKey("Web.RequisitionLines", t => t.RequisitionLineId) .ForeignKey("Web.Stocks", t => t.StockId) .ForeignKey("Web.StockHeaders", t => t.StockHeaderId) .ForeignKey("Web.StockProcesses", t => t.StockProcessId) .Index(t => t.StockHeaderId) .Index(t => t.ProductUidId) .Index(t => t.RequisitionLineId) .Index(t => t.ProductId) .Index(t => t.FromProcessId) .Index(t => t.FromStockId) .Index(t => t.StockId) .Index(t => t.StockProcessId) .Index(t => t.FromStockProcessId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id) .Index(t => t.CostCenterId) .Index(t => t.ProductUidLastTransactionDocTypeId) .Index(t => t.ProductUidLastTransactionPersonId) .Index(t => t.ProductUidCurrentGodownId) .Index(t => t.ProductUidCurrentProcessId); CreateTable( "Web.Stocks", c => new { StockId = c.Int(nullable: false, identity: true), StockHeaderId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), ProductUidId = c.Int(), ProductId = c.Int(nullable: false), ProcessId = c.Int(), GodownId = c.Int(nullable: false), LotNo = c.String(maxLength: 50), CostCenterId = c.Int(), Qty_Iss = c.Decimal(nullable: false, precision: 18, scale: 4), Qty_Rec = c.Decimal(nullable: false, precision: 18, scale: 4), Rate = c.Decimal(precision: 18, scale: 4), ExpiryDate = c.DateTime(), Specification = c.String(), Dimension1Id = c.Int(), Dimension2Id = c.Int(), DocQty_Iss = c.Decimal(precision: 18, scale: 4), DocQty_Rec = c.Decimal(precision: 18, scale: 4), Weight_Iss = c.Decimal(precision: 18, scale: 4), Weight_Rec = c.Decimal(precision: 18, scale: 4), ReferenceDocTypeId = c.Int(), ReferenceDocId = c.Int(), Remark = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.StockId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.Godowns", t => t.GodownId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.Products", t => t.ProductId) .ForeignKey("Web.ProductUids", t => t.ProductUidId) .ForeignKey("Web.DocumentTypes", t => t.ReferenceDocTypeId) .ForeignKey("Web.StockHeaders", t => t.StockHeaderId) .Index(t => t.StockHeaderId) .Index(t => t.ProductUidId) .Index(t => t.ProductId) .Index(t => t.ProcessId) .Index(t => t.GodownId) .Index(t => t.CostCenterId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id) .Index(t => t.ReferenceDocTypeId); CreateTable( "Web.StockProcesses", c => new { StockProcessId = c.Int(nullable: false, identity: true), StockHeaderId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), ProductId = c.Int(nullable: false), ProductUidId = c.Int(), ProcessId = c.Int(), GodownId = c.Int(), LotNo = c.String(maxLength: 50), CostCenterId = c.Int(), Qty_Iss = c.Decimal(nullable: false, precision: 18, scale: 4), Qty_Rec = c.Decimal(nullable: false, precision: 18, scale: 4), Weight_Iss = c.Decimal(precision: 18, scale: 4), Weight_Rec = c.Decimal(precision: 18, scale: 4), Rate = c.Decimal(precision: 18, scale: 4), ExpiryDate = c.DateTime(), Specification = c.String(), Dimension1Id = c.Int(), Dimension2Id = c.Int(), Remark = c.String(), ReferenceDocTypeId = c.Int(), ReferenceDocId = c.Int(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.StockProcessId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.Godowns", t => t.GodownId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.Products", t => t.ProductId) .ForeignKey("Web.ProductUids", t => t.ProductUidId) .ForeignKey("Web.DocumentTypes", t => t.ReferenceDocTypeId) .ForeignKey("Web.StockHeaders", t => t.StockHeaderId) .Index(t => t.StockHeaderId) .Index(t => t.ProductId) .Index(t => t.ProductUidId) .Index(t => t.ProcessId) .Index(t => t.GodownId) .Index(t => t.CostCenterId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id) .Index(t => t.ReferenceDocTypeId); CreateTable( "Web.RequisitionLines", c => new { RequisitionLineId = c.Int(nullable: false, identity: true), RequisitionHeaderId = c.Int(nullable: false), ProductId = c.Int(nullable: false), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), Dimension1Id = c.Int(), Dimension2Id = c.Int(), Specification = c.String(maxLength: 50), DueDate = c.DateTime(), ProcessId = c.Int(), LockReason = c.String(), Remark = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.RequisitionLineId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.Products", t => t.ProductId) .ForeignKey("Web.RequisitionHeaders", t => t.RequisitionHeaderId) .Index(t => t.RequisitionHeaderId) .Index(t => t.ProductId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id) .Index(t => t.ProcessId); CreateTable( "Web.RequisitionHeaders", c => new { RequisitionHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(nullable: false, maxLength: 20), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), PersonId = c.Int(nullable: false), CostCenterId = c.Int(), ReasonId = c.Int(nullable: false), ReferenceDocTypeId = c.Int(), ReferenceDocId = c.Int(), LockReason = c.String(), Remark = c.String(), ReviewCount = c.Int(), ReviewBy = c.String(), Status = c.Int(nullable: false), CreatedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedBy = c.String(), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.RequisitionHeaderId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.People", t => t.PersonId) .ForeignKey("Web.Reasons", t => t.ReasonId) .ForeignKey("Web.DocumentTypes", t => t.ReferenceDocTypeId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => new { t.DocTypeId, t.DocNo, t.DivisionId, t.SiteId }, unique: true, name: "IX_RequisitionHeader_DocID") .Index(t => t.PersonId) .Index(t => t.CostCenterId) .Index(t => t.ReasonId) .Index(t => t.ReferenceDocTypeId); CreateTable( "Web.Reasons", c => new { ReasonId = c.Int(nullable: false, identity: true), ReasonName = c.String(nullable: false, maxLength: 100), DocumentCategoryId = c.Int(nullable: false), IsSystemDefine = c.Boolean(nullable: false), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ReasonId) .ForeignKey("Web.DocumentCategories", t => t.DocumentCategoryId) .Index(t => new { t.ReasonName, t.DocumentCategoryId }, unique: true, name: "IX_Reason_ReasonName"); CreateTable( "Web.SaleDeliveryOrderLines", c => new { SaleDeliveryOrderLineId = c.Int(nullable: false, identity: true), SaleOrderLineId = c.Int(nullable: false), SaleDeliveryOrderHeaderId = c.Int(nullable: false), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), DueDate = c.DateTime(), Remark = c.String(), LockReason = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), Sr = c.Int(), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.SaleDeliveryOrderLineId) .ForeignKey("Web.SaleDeliveryOrderHeaders", t => t.SaleDeliveryOrderHeaderId) .ForeignKey("Web.SaleOrderLines", t => t.SaleOrderLineId) .Index(t => t.SaleOrderLineId) .Index(t => t.SaleDeliveryOrderHeaderId); CreateTable( "Web.SaleDeliveryOrderHeaders", c => new { SaleDeliveryOrderHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(maxLength: 20), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DueDate = c.DateTime(nullable: false), BuyerId = c.Int(nullable: false), Priority = c.Int(nullable: false), ShipMethodId = c.Int(nullable: false), ShipAddress = c.String(maxLength: 250), Status = c.Int(nullable: false), Remark = c.String(), LockReason = c.String(), ReviewCount = c.Int(), ReviewBy = c.String(), CreatedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedBy = c.String(), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.SaleDeliveryOrderHeaderId) .ForeignKey("Web.Buyers", t => t.BuyerId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.ShipMethods", t => t.ShipMethodId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.DocTypeId) .Index(t => t.DivisionId) .Index(t => t.SiteId) .Index(t => t.BuyerId) .Index(t => t.ShipMethodId); CreateTable( "Web.SaleOrderLines", c => new { SaleOrderLineId = c.Int(nullable: false, identity: true), SaleOrderHeaderId = c.Int(nullable: false), ProductId = c.Int(nullable: false), Dimension1Id = c.Int(), Dimension2Id = c.Int(), Specification = c.String(maxLength: 50), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), DueDate = c.DateTime(), DealUnitId = c.String(maxLength: 3), DealQty = c.Decimal(nullable: false, precision: 18, scale: 4), UnitConversionMultiplier = c.Decimal(precision: 18, scale: 4), Rate = c.Decimal(nullable: false, precision: 18, scale: 4), Amount = c.Decimal(nullable: false, precision: 18, scale: 4), DiscountPer = c.Decimal(precision: 18, scale: 4), ReferenceDocTypeId = c.Int(), ReferenceDocLineId = c.Int(), Remark = c.String(), LockReason = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.SaleOrderLineId) .ForeignKey("Web.Units", t => t.DealUnitId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.Products", t => t.ProductId) .ForeignKey("Web.DocumentTypes", t => t.ReferenceDocTypeId) .ForeignKey("Web.SaleOrderHeaders", t => t.SaleOrderHeaderId) .Index(t => new { t.SaleOrderHeaderId, t.ProductId, t.DueDate }, unique: true, name: "IX_SaleOrderLine_SaleOrdeHeaderProductDueDate") .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id) .Index(t => t.DealUnitId) .Index(t => t.ReferenceDocTypeId); CreateTable( "Web.SaleOrderHeaders", c => new { SaleOrderHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(maxLength: 20), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), BuyerOrderNo = c.String(maxLength: 20), DueDate = c.DateTime(nullable: false), ActualDueDate = c.DateTime(nullable: false), SaleToBuyerId = c.Int(nullable: false), BillToBuyerId = c.Int(nullable: false), CurrencyId = c.Int(nullable: false), Priority = c.Int(nullable: false), ShipMethodId = c.Int(nullable: false), ShipAddress = c.String(maxLength: 250), DeliveryTermsId = c.Int(nullable: false), TermsAndConditions = c.String(), CreditDays = c.Int(nullable: false), LedgerHeaderId = c.Int(), Status = c.Int(nullable: false), UnitConversionForId = c.Byte(nullable: false), Advance = c.Decimal(precision: 18, scale: 4), Remark = c.String(), LockReason = c.String(), ReviewCount = c.Int(), ReviewBy = c.String(), CreatedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedBy = c.String(), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.SaleOrderHeaderId) .ForeignKey("Web.Buyers", t => t.BillToBuyerId) .ForeignKey("Web.Currencies", t => t.CurrencyId) .ForeignKey("Web.DeliveryTerms", t => t.DeliveryTermsId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.LedgerHeaders", t => t.LedgerHeaderId) .ForeignKey("Web.People", t => t.SaleToBuyerId) .ForeignKey("Web.ShipMethods", t => t.ShipMethodId) .ForeignKey("Web.Sites", t => t.SiteId) .ForeignKey("Web.UnitConversionFors", t => t.UnitConversionForId) .Index(t => t.DocTypeId) .Index(t => t.DivisionId) .Index(t => t.SiteId) .Index(t => t.SaleToBuyerId) .Index(t => t.BillToBuyerId) .Index(t => t.CurrencyId) .Index(t => t.ShipMethodId) .Index(t => t.DeliveryTermsId) .Index(t => t.LedgerHeaderId) .Index(t => t.UnitConversionForId); CreateTable( "Web.DeliveryTerms", c => new { DeliveryTermsId = c.Int(nullable: false, identity: true), DeliveryTermsName = c.String(nullable: false, maxLength: 50), PrintingDescription = c.String(nullable: false, maxLength: 50), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.DeliveryTermsId) .Index(t => t.DeliveryTermsName, unique: true, name: "IX_DeliveryTerms_DeliveryTermsName"); CreateTable( "Web.UnitConversionFors", c => new { UnitconversionForId = c.Byte(nullable: false), UnitconversionForName = c.String(maxLength: 50), }) .PrimaryKey(t => t.UnitconversionForId); CreateTable( "Web.ProductUidHeaders", c => new { ProductUidHeaderId = c.Int(nullable: false, identity: true), ProductId = c.Int(nullable: false), Dimension1Id = c.Int(), Dimension2Id = c.Int(), LotNo = c.String(maxLength: 50), GenDocId = c.Int(), GenDocNo = c.String(), GenDocTypeId = c.Int(), GenDocDate = c.DateTime(), GenPersonId = c.Int(), GenRemark = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ProductUidHeaderId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.DocumentTypes", t => t.GenDocTypeId) .ForeignKey("Web.People", t => t.GenPersonId) .ForeignKey("Web.Products", t => t.ProductId) .Index(t => t.ProductId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id) .Index(t => t.GenDocTypeId) .Index(t => t.GenPersonId); CreateTable( "Web.Employees", c => new { PersonID = c.Int(nullable: false), DesignationID = c.Int(nullable: false), DepartmentID = c.Int(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PersonID) .ForeignKey("Web.Departments", t => t.DepartmentID) .ForeignKey("Web.Designations", t => t.DesignationID) .ForeignKey("Web.People", t => t.PersonID) .Index(t => t.PersonID) .Index(t => t.DesignationID) .Index(t => t.DepartmentID); CreateTable( "Web.Departments", c => new { DepartmentId = c.Int(nullable: false, identity: true), DepartmentName = c.String(nullable: false, maxLength: 50), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.DepartmentId) .Index(t => t.DepartmentName, unique: true, name: "IX_Department_DepartmentName"); CreateTable( "Web.Designations", c => new { DesignationId = c.Int(nullable: false, identity: true), DesignationName = c.String(nullable: false, maxLength: 50), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.DesignationId) .Index(t => t.DesignationName, unique: true, name: "IX_Designation_DesignationName"); CreateTable( "Web.ProductAttributes", c => new { ProductAttributeId = c.Int(nullable: false, identity: true), ProductId = c.Int(nullable: false), ProductTypeAttributeId = c.Int(nullable: false), ProductAttributeValue = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ProductAttributeId) .ForeignKey("Web.Products", t => t.ProductId) .Index(t => t.ProductId); CreateTable( "Web.ProductBuyers", c => new { ProductBuyerId = c.Int(nullable: false, identity: true), ProductId = c.Int(nullable: false), BuyerId = c.Int(nullable: false), BuyerSku = c.String(maxLength: 50), BuyerUpcCode = c.String(maxLength: 20), BuyerSpecification = c.String(maxLength: 50), BuyerSpecification1 = c.String(maxLength: 50), BuyerSpecification2 = c.String(maxLength: 50), BuyerSpecification3 = c.String(maxLength: 50), BuyerSpecification4 = c.String(maxLength: 50), BuyerSpecification5 = c.String(maxLength: 50), BuyerSpecification6 = c.String(maxLength: 50), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ProductBuyerId) .ForeignKey("Web.Buyers", t => t.BuyerId) .ForeignKey("Web.Products", t => t.ProductId) .Index(t => t.ProductId) .Index(t => t.BuyerId); CreateTable( "Web.ProductIncludedAccessories", c => new { ProductIncludedAccessoriesId = c.Int(nullable: false, identity: true), ProductId = c.Int(nullable: false), AccessoryId = c.Int(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), Product_ProductId = c.Int(), }) .PrimaryKey(t => t.ProductIncludedAccessoriesId) .ForeignKey("Web.Products", t => t.AccessoryId) .ForeignKey("Web.Products", t => t.ProductId) .ForeignKey("Web.Products", t => t.Product_ProductId) .Index(t => t.ProductId, unique: true, name: "IX_ProductIncludedAccessories_ProductId") .Index(t => t.AccessoryId, unique: true, name: "IX_ProductIncludedAccessories_AccessoryId") .Index(t => t.Product_ProductId); CreateTable( "Web.ProductRelatedAccessories", c => new { ProductRelatedAccessoriesId = c.Int(nullable: false, identity: true), ProductId = c.Int(nullable: false), AccessoryId = c.Int(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), Product_ProductId = c.Int(), }) .PrimaryKey(t => t.ProductRelatedAccessoriesId) .ForeignKey("Web.Products", t => t.AccessoryId) .ForeignKey("Web.Products", t => t.ProductId) .ForeignKey("Web.Products", t => t.Product_ProductId) .Index(t => t.ProductId, unique: true, name: "IX_ProductRelatedAccessories_ProductId") .Index(t => t.AccessoryId, unique: true, name: "IX_ProductRelatedAccessories_AccessoryId") .Index(t => t.Product_ProductId); CreateTable( "Web.ProductSizes", c => new { ProductSizeId = c.Int(nullable: false, identity: true), ProductSizeTypeId = c.Int(nullable: false), ProductId = c.Int(nullable: false), SizeId = c.Int(nullable: false), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ProductSizeId) .ForeignKey("Web.Products", t => t.ProductId) .ForeignKey("Web.ProductSizeTypes", t => t.ProductSizeTypeId) .ForeignKey("Web.Sizes", t => t.SizeId) .Index(t => t.ProductSizeTypeId) .Index(t => t.ProductId) .Index(t => t.SizeId); CreateTable( "Web.ProductSizeTypes", c => new { ProductSizeTypeId = c.Int(nullable: false, identity: true), ProductSizeTypeName = c.String(nullable: false, maxLength: 50), IsActive = c.Boolean(nullable: false), IsSystemDefine = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ProductSizeTypeId) .Index(t => t.ProductSizeTypeName, unique: true, name: "IX_ProductSizeType_ProductSizeTypeName"); CreateTable( "Web.Sizes", c => new { SizeId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), SizeName = c.String(nullable: false, maxLength: 50), ProductShapeId = c.Int(), UnitId = c.String(maxLength: 3), Length = c.Decimal(nullable: false, precision: 18, scale: 4), LengthFraction = c.Decimal(nullable: false, precision: 18, scale: 4), Width = c.Decimal(nullable: false, precision: 18, scale: 4), WidthFraction = c.Decimal(nullable: false, precision: 18, scale: 4), Height = c.Decimal(nullable: false, precision: 18, scale: 4), HeightFraction = c.Decimal(nullable: false, precision: 18, scale: 4), Area = c.Decimal(nullable: false, precision: 18, scale: 4), Perimeter = c.Decimal(nullable: false, precision: 18, scale: 4), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.SizeId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.ProductTypes", t => t.ProductShapeId) .ForeignKey("Web.Units", t => t.UnitId) .ForeignKey("Web.ProductShapes", t => t.ProductShapeId) .Index(t => t.DocTypeId) .Index(t => t.SizeName, unique: true, name: "IX_Size_SizeName") .Index(t => t.ProductShapeId) .Index(t => t.UnitId); CreateTable( "Web.ProductSuppliers", c => new { ProductSupplierId = c.Int(nullable: false, identity: true), ProductId = c.Int(nullable: false), SupplierId = c.Int(nullable: false), LeadTime = c.Int(), MinimumOrderQty = c.Decimal(precision: 18, scale: 4), MaximumOrderQty = c.Decimal(precision: 18, scale: 4), Cost = c.Decimal(precision: 18, scale: 4), Default = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ProductSupplierId) .ForeignKey("Web.Products", t => t.ProductId) .ForeignKey("Web.Suppliers", t => t.SupplierId) .Index(t => t.ProductId) .Index(t => t.SupplierId); CreateTable( "Web.Suppliers", c => new { PersonID = c.Int(nullable: false), SalesTaxGroupPartyId = c.Int(), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PersonID) .ForeignKey("Web.People", t => t.PersonID) .ForeignKey("Web.SalesTaxGroupParties", t => t.SalesTaxGroupPartyId) .Index(t => t.PersonID) .Index(t => t.SalesTaxGroupPartyId); CreateTable( "Web.SalesTaxGroupParties", c => new { SalesTaxGroupPartyId = c.Int(nullable: false, identity: true), SalesTaxGroupPartyName = c.String(nullable: false, maxLength: 50), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.SalesTaxGroupPartyId) .Index(t => t.SalesTaxGroupPartyName, unique: true, name: "IX_SalesTaxGroupParty_SalesTaxGroupPartyName"); CreateTable( "Web.PurchaseGoodsReceiptLines", c => new { PurchaseGoodsReceiptLineId = c.Int(nullable: false, identity: true), PurchaseGoodsReceiptHeaderId = c.Int(nullable: false), PurchaseOrderLineId = c.Int(), PurchaseIndentLineId = c.Int(), ProductUidId = c.Int(), ProductId = c.Int(nullable: false), Dimension1Id = c.Int(), Dimension2Id = c.Int(), LotNo = c.String(maxLength: 20), DocQty = c.Decimal(nullable: false, precision: 18, scale: 4), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), DebitNoteAmount = c.Decimal(nullable: false, precision: 18, scale: 4), DebitNoteReason = c.String(maxLength: 50), isUninspected = c.Boolean(), UnitConversionMultiplier = c.Decimal(nullable: false, precision: 18, scale: 4), DealUnitId = c.String(nullable: false, maxLength: 3), DealQty = c.Decimal(nullable: false, precision: 18, scale: 4), BaleNo = c.String(maxLength: 10), StockId = c.Int(), ReferenceDocTypeId = c.Int(), ReferenceDocLineId = c.Int(), Sr = c.Int(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), Remark = c.String(), Specification = c.String(maxLength: 50), LockReason = c.String(), OMSId = c.String(maxLength: 50), ProductUidLastTransactionDocId = c.Int(), ProductUidLastTransactionDocNo = c.String(), ProductUidLastTransactionDocTypeId = c.Int(), ProductUidLastTransactionDocDate = c.DateTime(), ProductUidLastTransactionPersonId = c.Int(), ProductUidCurrentGodownId = c.Int(), ProductUidCurrentProcessId = c.Int(), ProductUidStatus = c.String(maxLength: 10), }) .PrimaryKey(t => t.PurchaseGoodsReceiptLineId) .ForeignKey("Web.Units", t => t.DealUnitId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.Products", t => t.ProductId) .ForeignKey("Web.ProductUids", t => t.ProductUidId) .ForeignKey("Web.Godowns", t => t.ProductUidCurrentGodownId) .ForeignKey("Web.Processes", t => t.ProductUidCurrentProcessId) .ForeignKey("Web.DocumentTypes", t => t.ProductUidLastTransactionDocTypeId) .ForeignKey("Web.People", t => t.ProductUidLastTransactionPersonId) .ForeignKey("Web.PurchaseGoodsReceiptHeaders", t => t.PurchaseGoodsReceiptHeaderId) .ForeignKey("Web.PurchaseIndentLines", t => t.PurchaseIndentLineId) .ForeignKey("Web.PurchaseOrderLines", t => t.PurchaseOrderLineId) .ForeignKey("Web.DocumentTypes", t => t.ReferenceDocTypeId) .ForeignKey("Web.Stocks", t => t.StockId) .Index(t => t.PurchaseGoodsReceiptHeaderId) .Index(t => t.PurchaseOrderLineId) .Index(t => t.PurchaseIndentLineId) .Index(t => t.ProductUidId) .Index(t => t.ProductId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id) .Index(t => t.DealUnitId) .Index(t => t.StockId) .Index(t => t.ReferenceDocTypeId) .Index(t => t.ProductUidLastTransactionDocTypeId) .Index(t => t.ProductUidLastTransactionPersonId) .Index(t => t.ProductUidCurrentGodownId) .Index(t => t.ProductUidCurrentProcessId); CreateTable( "Web.PurchaseGoodsReceiptHeaders", c => new { PurchaseGoodsReceiptHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(nullable: false, maxLength: 20), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), SupplierId = c.Int(nullable: false), GodownId = c.Int(nullable: false), SupplierDocNo = c.String(maxLength: 20), SupplierDocDate = c.DateTime(), PurchaseWaybillId = c.Int(), GateInId = c.Int(), RoadPermitFormId = c.Int(), StockHeaderId = c.Int(), ReferenceDocTypeId = c.Int(), ReferenceDocId = c.Int(), Status = c.Int(nullable: false), Remark = c.String(), UnitConversionForId = c.Byte(), ReviewCount = c.Int(), ReviewBy = c.String(), LockReason = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PurchaseGoodsReceiptHeaderId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.GateIns", t => t.GateInId) .ForeignKey("Web.Godowns", t => t.GodownId) .ForeignKey("Web.PurchaseWaybills", t => t.PurchaseWaybillId) .ForeignKey("Web.DocumentTypes", t => t.ReferenceDocTypeId) .ForeignKey("Web.ProductUids", t => t.RoadPermitFormId) .ForeignKey("Web.Sites", t => t.SiteId) .ForeignKey("Web.StockHeaders", t => t.StockHeaderId) .ForeignKey("Web.Suppliers", t => t.SupplierId) .ForeignKey("Web.UnitConversionFors", t => t.UnitConversionForId) .Index(t => new { t.DocTypeId, t.DocNo, t.DivisionId, t.SiteId }, unique: true, name: "IX_PurchaseGoodsReceiptHeader_DocID") .Index(t => t.SupplierId) .Index(t => t.GodownId) .Index(t => t.PurchaseWaybillId) .Index(t => t.GateInId) .Index(t => t.RoadPermitFormId) .Index(t => t.StockHeaderId) .Index(t => t.ReferenceDocTypeId) .Index(t => t.UnitConversionForId); CreateTable( "Web.GateIns", c => new { GateInId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(nullable: false, maxLength: 20), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), ProductDescription = c.String(), VehicleNo = c.String(maxLength: 20), Transporter = c.String(maxLength: 250), VehicleGrossWeight = c.Decimal(nullable: false, precision: 18, scale: 4), VehicleTareWeight = c.Decimal(nullable: false, precision: 18, scale: 4), DiverName = c.String(maxLength: 250), NoOfPackages = c.Decimal(nullable: false, precision: 18, scale: 4), Remark = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.GateInId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => new { t.DocTypeId, t.DocNo, t.DivisionId, t.SiteId }, unique: true, name: "IX_GateIn_DocID"); CreateTable( "Web.PurchaseWaybills", c => new { PurchaseWaybillId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), EntryNo = c.String(nullable: false, maxLength: 20), DocDate = c.DateTime(nullable: false), DocNo = c.String(maxLength: 20), TransporterId = c.Int(nullable: false), ConsignerId = c.Int(nullable: false), ReferenceDocNo = c.String(maxLength: 30), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), ShipMethodId = c.Int(nullable: false), DeliveryPoint = c.String(maxLength: 100), EstimatedDeliveryDate = c.DateTime(nullable: false), FreightType = c.String(nullable: false), FromCityId = c.Int(nullable: false), ToCityId = c.Int(nullable: false), ProductDescription = c.String(maxLength: 100), PrivateMark = c.String(maxLength: 30), NoOfPackages = c.String(nullable: false), ActualWeight = c.Decimal(nullable: false, precision: 18, scale: 4), ChargedWeight = c.Decimal(precision: 18, scale: 4), ContainerNo = c.String(maxLength: 20), FreightAmt = c.Decimal(precision: 18, scale: 4), OtherCharges = c.Decimal(precision: 18, scale: 4), ServiceTax = c.Decimal(precision: 18, scale: 4), ServiceTaxPer = c.Decimal(precision: 18, scale: 4), TotalAmount = c.Decimal(nullable: false, precision: 18, scale: 4), Remark = c.String(), FreightDescription = c.String(), IsDoorDelivery = c.Boolean(nullable: false), IsPOD = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PurchaseWaybillId) .ForeignKey("Web.People", t => t.ConsignerId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Cities", t => t.FromCityId) .ForeignKey("Web.ShipMethods", t => t.ShipMethodId) .ForeignKey("Web.Sites", t => t.SiteId) .ForeignKey("Web.Cities", t => t.ToCityId) .ForeignKey("Web.Transporters", t => t.TransporterId) .Index(t => new { t.DocTypeId, t.DocNo, t.DivisionId }, unique: true, name: "IX_PurchaseWaybill_DocID") .Index(t => t.EntryNo, unique: true, name: "IX_PurchaseWaybill_EntryNo") .Index(t => t.TransporterId) .Index(t => t.ConsignerId) .Index(t => t.SiteId, unique: true, name: "IX_PurchaseTransportGR_DocID") .Index(t => t.ShipMethodId) .Index(t => t.FromCityId) .Index(t => t.ToCityId); CreateTable( "Web.Transporters", c => new { PersonID = c.Int(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PersonID) .ForeignKey("Web.People", t => t.PersonID) .Index(t => t.PersonID); CreateTable( "Web.PurchaseIndentLines", c => new { PurchaseIndentLineId = c.Int(nullable: false, identity: true), PurchaseIndentHeaderId = c.Int(nullable: false), MaterialPlanLineId = c.Int(), DueDate = c.DateTime(), Specification = c.String(), ProductId = c.Int(nullable: false), Dimension1Id = c.Int(), Dimension2Id = c.Int(), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), Remark = c.String(), Sr = c.Int(), LockReason = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PurchaseIndentLineId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.MaterialPlanLines", t => t.MaterialPlanLineId) .ForeignKey("Web.Products", t => t.ProductId) .ForeignKey("Web.PurchaseIndentHeaders", t => t.PurchaseIndentHeaderId) .Index(t => t.PurchaseIndentHeaderId) .Index(t => t.MaterialPlanLineId) .Index(t => t.ProductId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id); CreateTable( "Web.PurchaseIndentCancelLines", c => new { PurchaseIndentCancelLineId = c.Int(nullable: false, identity: true), PurchaseIndentCancelHeaderId = c.Int(nullable: false), PurchaseIndentLineId = c.Int(nullable: false), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), Remark = c.String(), Sr = c.Int(), LockReason = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PurchaseIndentCancelLineId) .ForeignKey("Web.PurchaseIndentCancelHeaders", t => t.PurchaseIndentCancelHeaderId) .ForeignKey("Web.PurchaseIndentLines", t => t.PurchaseIndentLineId) .Index(t => t.PurchaseIndentCancelHeaderId) .Index(t => t.PurchaseIndentLineId); CreateTable( "Web.PurchaseIndentCancelHeaders", c => new { PurchaseIndentCancelHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(nullable: false, maxLength: 20), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), Remark = c.String(), Status = c.Int(nullable: false), ReasonId = c.Int(nullable: false), LockReason = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), ReviewCount = c.Int(), ReviewBy = c.String(), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PurchaseIndentCancelHeaderId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Reasons", t => t.ReasonId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => new { t.DocTypeId, t.DocNo, t.DivisionId, t.SiteId }, unique: true, name: "IX_PurchaseIndentCancelHeader_DocID") .Index(t => t.ReasonId); CreateTable( "Web.PurchaseIndentHeaders", c => new { PurchaseIndentHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(nullable: false, maxLength: 20), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DepartmentId = c.Int(nullable: false), ReasonId = c.Int(), Remark = c.String(), Status = c.Int(nullable: false), MaterialPlanHeaderId = c.Int(), LockReason = c.String(), CreatedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedBy = c.String(), ModifiedDate = c.DateTime(nullable: false), ReviewCount = c.Int(), ReviewBy = c.String(), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PurchaseIndentHeaderId) .ForeignKey("Web.Departments", t => t.DepartmentId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.MaterialPlanHeaders", t => t.MaterialPlanHeaderId) .ForeignKey("Web.Reasons", t => t.ReasonId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => new { t.DocTypeId, t.DocNo, t.DivisionId, t.SiteId }, unique: true, name: "IX_PurchaseIndentHeader_DocID") .Index(t => t.DepartmentId) .Index(t => t.ReasonId) .Index(t => t.MaterialPlanHeaderId); CreateTable( "Web.PurchaseOrderLines", c => new { PurchaseOrderLineId = c.Int(nullable: false, identity: true), PurchaseOrderHeaderId = c.Int(nullable: false), PurchaseIndentLineId = c.Int(), ProductId = c.Int(nullable: false), Dimension1Id = c.Int(), Dimension2Id = c.Int(), Specification = c.String(maxLength: 50), SalesTaxGroupId = c.Int(), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), ShipDate = c.DateTime(), LotNo = c.String(maxLength: 10), DueDate = c.DateTime(), UnitConversionMultiplier = c.Decimal(nullable: false, precision: 18, scale: 4), DealUnitId = c.String(nullable: false, maxLength: 3), DealQty = c.Decimal(nullable: false, precision: 18, scale: 4), Rate = c.Decimal(precision: 18, scale: 4), DiscountPer = c.Decimal(precision: 18, scale: 4), Amount = c.Decimal(precision: 18, scale: 4), Remark = c.String(), ProductUidHeaderId = c.Int(), Sr = c.Int(), LockReason = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PurchaseOrderLineId) .ForeignKey("Web.Units", t => t.DealUnitId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.Products", t => t.ProductId) .ForeignKey("Web.ProductUidHeaders", t => t.ProductUidHeaderId) .ForeignKey("Web.PurchaseIndentLines", t => t.PurchaseIndentLineId) .ForeignKey("Web.PurchaseOrderHeaders", t => t.PurchaseOrderHeaderId) .ForeignKey("Web.SalesTaxGroups", t => t.SalesTaxGroupId) .Index(t => t.PurchaseOrderHeaderId) .Index(t => t.PurchaseIndentLineId) .Index(t => t.ProductId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id) .Index(t => t.SalesTaxGroupId) .Index(t => t.DealUnitId) .Index(t => t.ProductUidHeaderId); CreateTable( "Web.PurchaseOrderCancelLines", c => new { PurchaseOrderCancelLineId = c.Int(nullable: false, identity: true), PurchaseOrderCancelHeaderId = c.Int(nullable: false), PurchaseOrderLineId = c.Int(nullable: false), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), Remark = c.String(), Sr = c.Int(), LockReason = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PurchaseOrderCancelLineId) .ForeignKey("Web.PurchaseOrderCancelHeaders", t => t.PurchaseOrderCancelHeaderId) .ForeignKey("Web.PurchaseOrderLines", t => t.PurchaseOrderLineId) .Index(t => t.PurchaseOrderCancelHeaderId) .Index(t => t.PurchaseOrderLineId); CreateTable( "Web.PurchaseOrderCancelHeaders", c => new { PurchaseOrderCancelHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(nullable: false, maxLength: 20), ReasonId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), SupplierId = c.Int(nullable: false), Remark = c.String(nullable: false), Status = c.Int(nullable: false), LockReason = c.String(), ReviewCount = c.Int(), ReviewBy = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PurchaseOrderCancelHeaderId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Reasons", t => t.ReasonId) .ForeignKey("Web.Sites", t => t.SiteId) .ForeignKey("Web.Suppliers", t => t.SupplierId) .Index(t => new { t.DocTypeId, t.DocNo, t.DivisionId, t.SiteId }, unique: true, name: "IX_PurchaseOrderCancelHeader_DocID") .Index(t => t.ReasonId) .Index(t => t.SupplierId); CreateTable( "Web.PurchaseOrderHeaders", c => new { PurchaseOrderHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(nullable: false, maxLength: 20), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), SupplierId = c.Int(nullable: false), DueDate = c.DateTime(nullable: false), ActualDueDate = c.DateTime(nullable: false), ShipMethodId = c.Int(nullable: false), DeliveryTermsId = c.Int(), TermsAndConditions = c.String(), ShipAddress = c.String(), Remark = c.String(), CurrencyId = c.Int(nullable: false), SalesTaxGroupPersonId = c.Int(), SupplierShipDate = c.DateTime(), SupplierRemark = c.String(), CreditDays = c.Int(), ProgressPer = c.Int(), isUninspected = c.Boolean(), CalculateDiscountOnRate = c.Boolean(nullable: false), UnitConversionForId = c.Byte(), Status = c.Int(nullable: false), ReviewCount = c.Int(), ReviewBy = c.String(), LockReason = c.String(), Priority = c.Int(nullable: false), CreatedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedBy = c.String(), ModifiedDate = c.DateTime(nullable: false), ApprovedBy = c.String(), ApprovedDate = c.DateTime(), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PurchaseOrderHeaderId) .ForeignKey("Web.Currencies", t => t.CurrencyId) .ForeignKey("Web.DeliveryTerms", t => t.DeliveryTermsId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.ChargeGroupPersons", t => t.SalesTaxGroupPersonId) .ForeignKey("Web.ShipMethods", t => t.ShipMethodId) .ForeignKey("Web.Sites", t => t.SiteId) .ForeignKey("Web.People", t => t.SupplierId) .ForeignKey("Web.UnitConversionFors", t => t.UnitConversionForId) .Index(t => new { t.DocTypeId, t.DocNo, t.DivisionId, t.SiteId, t.SupplierId }, unique: true, name: "IX_PurchaseOrderHeader_DocID") .Index(t => t.ShipMethodId) .Index(t => t.DeliveryTermsId) .Index(t => t.CurrencyId) .Index(t => t.SalesTaxGroupPersonId) .Index(t => t.UnitConversionForId); CreateTable( "Web.ChargeGroupPersons", c => new { ChargeGroupPersonId = c.Int(nullable: false, identity: true), ChargeGroupPersonName = c.String(nullable: false, maxLength: 50), ChargeTypeId = c.Int(nullable: false), IsActive = c.Boolean(nullable: false), IsSystemDefine = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ChargeGroupPersonId) .ForeignKey("Web.ChargeTypes", t => t.ChargeTypeId) .Index(t => t.ChargeGroupPersonName, unique: true, name: "IX_ChargeGroupPerson_ChargeGroupPersonName") .Index(t => t.ChargeTypeId); CreateTable( "Web.ChargeTypes", c => new { ChargeTypeId = c.Int(nullable: false, identity: true), ChargeTypeName = c.String(nullable: false, maxLength: 50), IsActive = c.Boolean(nullable: false), IsSystemDefine = c.Boolean(nullable: false), isCommentNeeded = c.Boolean(nullable: false), isPersonBased = c.Boolean(nullable: false), isProductBased = c.Boolean(nullable: false), ImageFolderName = c.String(maxLength: 100), ImageFileName = c.String(maxLength: 100), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ChargeTypeId) .Index(t => t.ChargeTypeName, unique: true, name: "IX_Charges_ChargesName"); CreateTable( "Web.SalesTaxGroups", c => new { SalesTaxGroupId = c.Int(nullable: false, identity: true), SalesTaxGroupProductId = c.Int(nullable: false), SalesTaxGroupPartyId = c.Int(nullable: false), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.SalesTaxGroupId) .ForeignKey("Web.SalesTaxGroupParties", t => t.SalesTaxGroupPartyId) .ForeignKey("Web.SalesTaxGroupProducts", t => t.SalesTaxGroupProductId) .Index(t => t.SalesTaxGroupProductId) .Index(t => t.SalesTaxGroupPartyId); CreateTable( "Web.SalesTaxGroupProducts", c => new { SalesTaxGroupProductId = c.Int(nullable: false, identity: true), SalesTaxGroupProductName = c.String(nullable: false, maxLength: 50), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.SalesTaxGroupProductId) .Index(t => t.SalesTaxGroupProductName, unique: true, name: "IX_SalesTaxGroupProduct_SalesTaxGroupProductName"); CreateTable( "Web.Colours", c => new { ColourId = c.Int(nullable: false, identity: true), ColourName = c.String(nullable: false, maxLength: 50), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ColourId) .Index(t => t.ColourName, unique: true, name: "IX_Colour_ColourName"); CreateTable( "Web.ProductContentHeaders", c => new { ProductContentHeaderId = c.Int(nullable: false, identity: true), ProductContentName = c.String(nullable: false, maxLength: 100), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ProductContentHeaderId) .Index(t => t.ProductContentName, unique: true, name: "IX_ProductContent_ProductContentName"); CreateTable( "Web.ProductContentLines", c => new { ProductContentLineId = c.Int(nullable: false, identity: true), ProductContentHeaderId = c.Int(nullable: false), ProductGroupId = c.Int(nullable: false), ContentPer = c.Decimal(nullable: false, precision: 18, scale: 4), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ProductContentLineId) .ForeignKey("Web.ProductContentHeaders", t => t.ProductContentHeaderId) .ForeignKey("Web.ProductGroups", t => t.ProductGroupId) .Index(t => t.ProductContentHeaderId) .Index(t => t.ProductGroupId); CreateTable( "Web.DescriptionOfGoods", c => new { DescriptionOfGoodsId = c.Int(nullable: false, identity: true), DescriptionOfGoodsName = c.String(nullable: false, maxLength: 50), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.DescriptionOfGoodsId) .Index(t => t.DescriptionOfGoodsName, unique: true, name: "IX_DescriptionOfGoods_DescriptionOfGoodsName"); CreateTable( "Web.ProcessSequenceHeaders", c => new { ProcessSequenceHeaderId = c.Int(nullable: false, identity: true), ProcessSequenceHeaderName = c.String(nullable: false, maxLength: 50), Status = c.Int(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), ReferenceDocTypeId = c.Int(), ReferenceDocId = c.Int(), CheckSum = c.String(), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ProcessSequenceHeaderId) .ForeignKey("Web.DocumentTypes", t => t.ReferenceDocTypeId) .Index(t => t.ProcessSequenceHeaderName, unique: true, name: "IX_ProcessSequence_ProcessSequenceHeaderName") .Index(t => t.ReferenceDocTypeId); CreateTable( "Web.ProductCollections", c => new { ProductCollectionId = c.Int(nullable: false, identity: true), ProductCollectionName = c.String(nullable: false, maxLength: 50), IsActive = c.Boolean(nullable: false), ProductTypeId = c.Int(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ProductCollectionId) .ForeignKey("Web.ProductTypes", t => t.ProductTypeId) .Index(t => t.ProductCollectionName, unique: true, name: "IX_ProductCollection_ProductCollectionName") .Index(t => t.ProductTypeId); CreateTable( "Web.ProductDesignPatterns", c => new { ProductDesignPatternId = c.Int(nullable: false, identity: true), ProductDesignPatternName = c.String(nullable: false, maxLength: 50), ProductTypeId = c.Int(nullable: false), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ProductDesignPatternId) .ForeignKey("Web.ProductTypes", t => t.ProductTypeId) .Index(t => t.ProductDesignPatternName, unique: true, name: "IX_ProductDesignPattern_ProductDesignName") .Index(t => t.ProductTypeId); CreateTable( "Web.ProductInvoiceGroups", c => new { ProductInvoiceGroupId = c.Int(nullable: false, identity: true), ProductInvoiceGroupName = c.String(nullable: false, maxLength: 50), ItcHsCode = c.String(maxLength: 25), Rate = c.Decimal(nullable: false, precision: 18, scale: 4), Knots = c.Decimal(nullable: false, precision: 18, scale: 4), DivisionId = c.Int(nullable: false), IsSample = c.Boolean(nullable: false), Weight = c.Decimal(nullable: false, precision: 18, scale: 4), SeparateWeightInInvoice = c.Boolean(nullable: false), DescriptionOfGoodsId = c.Int(), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ProductInvoiceGroupId) .ForeignKey("Web.DescriptionOfGoods", t => t.DescriptionOfGoodsId) .ForeignKey("Web.Divisions", t => t.DivisionId) .Index(t => t.ProductInvoiceGroupName, unique: true, name: "IX_ProductInvoiceGroup_ProductInvoiceGroupName") .Index(t => t.DivisionId) .Index(t => t.DescriptionOfGoodsId); CreateTable( "Web.ProductQualities", c => new { ProductQualityId = c.Int(nullable: false, identity: true), ProductQualityName = c.String(nullable: false, maxLength: 50), IsActive = c.Boolean(nullable: false), ProductTypeId = c.Int(nullable: false), Weight = c.Decimal(nullable: false, precision: 18, scale: 4), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ProductQualityId) .ForeignKey("Web.ProductTypes", t => t.ProductTypeId) .Index(t => t.ProductQualityName, unique: true, name: "IX_ProductQuality_ProductQualityName") .Index(t => t.ProductTypeId); CreateTable( "Web.ProductStyles", c => new { ProductStyleId = c.Int(nullable: false, identity: true), ProductStyleName = c.String(nullable: false, maxLength: 50), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ProductStyleId) .Index(t => t.ProductStyleName, unique: true, name: "IX_ProductStyle_ProductStyleName"); CreateTable( "Web.BusinessEntities", c => new { PersonID = c.Int(nullable: false), ParentId = c.Int(), TdsCategoryId = c.Int(), TdsGroupId = c.Int(), GuarantorId = c.Int(), SalesTaxGroupPartyId = c.Int(), IsSisterConcern = c.Boolean(nullable: false), PersonRateGroupId = c.Int(), ServiceTaxCategoryId = c.Int(), CreaditDays = c.Int(), CreaditLimit = c.Decimal(precision: 18, scale: 4), DivisionIds = c.String(maxLength: 100), SiteIds = c.String(maxLength: 100), OMSId = c.String(maxLength: 50), Buyer_PersonID = c.Int(), }) .PrimaryKey(t => t.PersonID) .ForeignKey("Web.Buyers", t => t.Buyer_PersonID) .ForeignKey("Web.People", t => t.GuarantorId) .ForeignKey("Web.People", t => t.ParentId) .ForeignKey("Web.People", t => t.PersonID) .ForeignKey("Web.PersonRateGroups", t => t.PersonRateGroupId) .ForeignKey("Web.SalesTaxGroupParties", t => t.SalesTaxGroupPartyId) .ForeignKey("Web.ServiceTaxCategories", t => t.ServiceTaxCategoryId) .ForeignKey("Web.TdsCategories", t => t.TdsCategoryId) .ForeignKey("Web.TdsGroups", t => t.TdsGroupId) .Index(t => t.PersonID) .Index(t => t.ParentId) .Index(t => t.TdsCategoryId) .Index(t => t.TdsGroupId) .Index(t => t.GuarantorId) .Index(t => t.SalesTaxGroupPartyId) .Index(t => t.PersonRateGroupId) .Index(t => t.ServiceTaxCategoryId) .Index(t => t.Buyer_PersonID); CreateTable( "Web.PersonRateGroups", c => new { PersonRateGroupId = c.Int(nullable: false, identity: true), PersonRateGroupName = c.String(nullable: false, maxLength: 50), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), Processes = c.String(), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PersonRateGroupId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => new { t.PersonRateGroupName, t.DivisionId, t.SiteId }, unique: true, name: "IX_PersonRateGroup_PersonRateGroupName"); CreateTable( "Web.ServiceTaxCategories", c => new { ServiceTaxCategoryId = c.Int(nullable: false, identity: true), ServiceTaxCategoryName = c.String(nullable: false, maxLength: 50), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ServiceTaxCategoryId) .Index(t => t.ServiceTaxCategoryName, unique: true, name: "IX_ServiceTaxCategory_ServiceTaxCategoryName"); CreateTable( "Web.TdsCategories", c => new { TdsCategoryId = c.Int(nullable: false, identity: true), TdsCategoryName = c.String(nullable: false, maxLength: 50), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.TdsCategoryId) .Index(t => t.TdsCategoryName, unique: true, name: "IX_TdsCategory_TdsCategoryName"); CreateTable( "Web.TdsGroups", c => new { TdsGroupId = c.Int(nullable: false, identity: true), TdsGroupName = c.String(nullable: false, maxLength: 50), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.TdsGroupId) .Index(t => t.TdsGroupName, unique: true, name: "IX_TdsGroup_TdsGroupName"); CreateTable( "Web.BusinessSessions", c => new { BusinessSessionId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), BusinessSessionName = c.String(), FromDate = c.DateTime(nullable: false), UptoDate = c.DateTime(nullable: false), Status = c.Int(nullable: false), LockReason = c.String(), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.BusinessSessionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .Index(t => t.DocTypeId); CreateTable( "Web.Calculations", c => new { CalculationId = c.Int(nullable: false, identity: true), CalculationName = c.String(nullable: false, maxLength: 50), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.CalculationId) .Index(t => t.CalculationName, unique: true, name: "IX_Calculation_Calculation"); CreateTable( "Web.CalculationFooters", c => new { CalculationFooterLineId = c.Int(nullable: false, identity: true), CalculationId = c.Int(nullable: false), Sr = c.Int(nullable: false), ChargeId = c.Int(nullable: false), AddDeduct = c.Int(), AffectCost = c.Boolean(nullable: false), ChargeTypeId = c.Int(), CalculateOnId = c.Int(), ProductChargeId = c.Int(), CostCenterId = c.Int(), PersonId = c.Int(), RateType = c.Byte(nullable: false), IncludedInBase = c.Boolean(nullable: false), ParentChargeId = c.Int(), Rate = c.Decimal(nullable: false, precision: 18, scale: 4), Amount = c.Decimal(nullable: false, precision: 18, scale: 4), RoundOff = c.Decimal(precision: 18, scale: 4), LedgerAccountDrId = c.Int(), LedgerAccountCrId = c.Int(), IsVisible = c.Boolean(nullable: false), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.CalculationFooterLineId) .ForeignKey("Web.Charges", t => t.CalculateOnId) .ForeignKey("Web.Calculations", t => t.CalculationId) .ForeignKey("Web.Charges", t => t.ChargeId) .ForeignKey("Web.ChargeTypes", t => t.ChargeTypeId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountCrId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountDrId) .ForeignKey("Web.Charges", t => t.ParentChargeId) .ForeignKey("Web.People", t => t.PersonId) .ForeignKey("Web.Charges", t => t.ProductChargeId) .Index(t => new { t.CalculationId, t.ChargeId }, unique: true, name: "IX_CalculationLine_CalculationLineName") .Index(t => t.ChargeTypeId) .Index(t => t.CalculateOnId) .Index(t => t.ProductChargeId) .Index(t => t.CostCenterId) .Index(t => t.PersonId) .Index(t => t.ParentChargeId) .Index(t => t.LedgerAccountDrId) .Index(t => t.LedgerAccountCrId); CreateTable( "Web.Charges", c => new { ChargeId = c.Int(nullable: false, identity: true), ChargeName = c.String(nullable: false, maxLength: 50), ChargeCode = c.String(nullable: false, maxLength: 50), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.ChargeId) .Index(t => t.ChargeName, unique: true, name: "IX_Charge_Charge") .Index(t => t.ChargeCode, unique: true, name: "IX_Charge_ChargeCode"); CreateTable( "Web.CalculationHeaderLedgerAccounts", c => new { CalculationHeaderLedgerAccountId = c.Int(nullable: false, identity: true), CalculationId = c.Int(nullable: false), CalculationFooterId = c.Int(nullable: false), DocTypeId = c.Int(nullable: false), LedgerAccountDrId = c.Int(), LedgerAccountCrId = c.Int(), ContraLedgerAccountId = c.Int(), CostCenterId = c.Int(), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.CalculationHeaderLedgerAccountId) .ForeignKey("Web.Calculations", t => t.CalculationId) .ForeignKey("Web.CalculationFooters", t => t.CalculationFooterId) .ForeignKey("Web.LedgerAccounts", t => t.ContraLedgerAccountId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountCrId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountDrId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.CalculationId) .Index(t => new { t.CalculationFooterId, t.DocTypeId }, unique: true, name: "IX_CalculationHeaderLedgerAccount_UniqueRow") .Index(t => t.LedgerAccountDrId) .Index(t => t.LedgerAccountCrId) .Index(t => t.ContraLedgerAccountId) .Index(t => t.CostCenterId) .Index(t => t.DivisionId) .Index(t => t.SiteId); CreateTable( "Web.CalculationLineLedgerAccounts", c => new { CalculationLineLedgerAccountId = c.Int(nullable: false, identity: true), CalculationId = c.Int(nullable: false), CalculationProductId = c.Int(nullable: false), DocTypeId = c.Int(nullable: false), LedgerAccountDrId = c.Int(), LedgerAccountCrId = c.Int(), ContraLedgerAccountId = c.Int(), CostCenterId = c.Int(), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.CalculationLineLedgerAccountId) .ForeignKey("Web.Calculations", t => t.CalculationId) .ForeignKey("Web.CalculationProducts", t => t.CalculationProductId) .ForeignKey("Web.LedgerAccounts", t => t.ContraLedgerAccountId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountCrId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountDrId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.CalculationId) .Index(t => new { t.CalculationProductId, t.DocTypeId }, unique: true, name: "IX_CalculationLineLedgerAccount_UniqueRow") .Index(t => t.LedgerAccountDrId) .Index(t => t.LedgerAccountCrId) .Index(t => t.ContraLedgerAccountId) .Index(t => t.CostCenterId) .Index(t => t.DivisionId) .Index(t => t.SiteId); CreateTable( "Web.CalculationProducts", c => new { CalculationProductId = c.Int(nullable: false, identity: true), CalculationId = c.Int(nullable: false), Sr = c.Int(nullable: false), ChargeId = c.Int(nullable: false), AddDeduct = c.Int(), AffectCost = c.Boolean(nullable: false), ChargeTypeId = c.Int(), CalculateOnId = c.Int(), CostCenterId = c.Int(), RateType = c.Byte(nullable: false), IncludedInBase = c.Boolean(nullable: false), ParentChargeId = c.Int(), Rate = c.Decimal(nullable: false, precision: 18, scale: 4), Amount = c.Decimal(nullable: false, precision: 18, scale: 4), RoundOff = c.Decimal(precision: 18, scale: 4), LedgerAccountDrId = c.Int(), LedgerAccountCrId = c.Int(), PersonId = c.Int(), IsVisible = c.Boolean(nullable: false), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.CalculationProductId) .ForeignKey("Web.Charges", t => t.CalculateOnId) .ForeignKey("Web.Calculations", t => t.CalculationId) .ForeignKey("Web.Charges", t => t.ChargeId) .ForeignKey("Web.ChargeTypes", t => t.ChargeTypeId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountCrId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountDrId) .ForeignKey("Web.Charges", t => t.ParentChargeId) .ForeignKey("Web.People", t => t.PersonId) .Index(t => new { t.CalculationId, t.ChargeId }, unique: true, name: "IX_CalculationProduct_CalculationProductName") .Index(t => t.ChargeTypeId) .Index(t => t.CalculateOnId) .Index(t => t.CostCenterId) .Index(t => t.ParentChargeId) .Index(t => t.LedgerAccountDrId) .Index(t => t.LedgerAccountCrId) .Index(t => t.PersonId); CreateTable( "Web.ChargeGroupProducts", c => new { ChargeGroupProductId = c.Int(nullable: false, identity: true), ChargeGroupProductName = c.String(nullable: false, maxLength: 50), ChargeTypeId = c.Int(nullable: false), IsActive = c.Boolean(nullable: false), IsSystemDefine = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ChargeGroupProductId) .ForeignKey("Web.ChargeTypes", t => t.ChargeTypeId) .Index(t => t.ChargeGroupProductName, unique: true, name: "IX_ChargeGroupProduct_ChargeGroupProductName") .Index(t => t.ChargeTypeId); CreateTable( "Web.Companies", c => new { CompanyId = c.Int(nullable: false, identity: true), CompanyName = c.String(nullable: false, maxLength: 50), Address = c.String(maxLength: 250), CityId = c.Int(), LstNo = c.String(maxLength: 20), CstNo = c.String(maxLength: 20), TinNo = c.String(maxLength: 20), IECNo = c.String(maxLength: 20), Phone = c.String(maxLength: 15), Fax = c.String(maxLength: 15), CurrencyId = c.Int(nullable: false), ExciseDivision = c.String(maxLength: 100), DirectorName = c.String(maxLength: 100), BankName = c.String(maxLength: 100), BankBranch = c.String(maxLength: 250), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.CompanyId) .ForeignKey("Web.Cities", t => t.CityId) .ForeignKey("Web.Currencies", t => t.CurrencyId) .Index(t => t.CompanyName, unique: true, name: "IX_Company_Company") .Index(t => t.CityId) .Index(t => t.CurrencyId); CreateTable( "Web.CostCenterStatus", c => new { CostCenterId = c.Int(nullable: false), ProductId = c.Int(), AmountDr = c.Decimal(precision: 18, scale: 4), AmountCr = c.Decimal(precision: 18, scale: 4), }) .PrimaryKey(t => t.CostCenterId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.Products", t => t.ProductId) .Index(t => t.CostCenterId) .Index(t => t.ProductId); CreateTable( "Web.CostCenterStatusExtendeds", c => new { CostCenterId = c.Int(nullable: false), MaterialIssueQty = c.Decimal(precision: 18, scale: 4), MaterialIssueDate = c.DateTime(), MaterialReturnQty = c.Decimal(precision: 18, scale: 4), MaterialReturnDate = c.DateTime(), RequisitionProductCount = c.Int(), MaterialIssueProductCount = c.Int(), MaterialReturnProductCount = c.Int(), BOMQty = c.Decimal(precision: 18, scale: 4), BOMCancelQty = c.Decimal(precision: 18, scale: 4), ConsumeQty = c.Decimal(precision: 18, scale: 4), RateSettlementQty = c.Decimal(precision: 18, scale: 4), RateSettlementDate = c.DateTime(), RateSettlementAmount = c.Decimal(precision: 18, scale: 4), TransferQty = c.Decimal(precision: 18, scale: 4), TransferDate = c.DateTime(), TransferAmount = c.Decimal(precision: 18, scale: 4), ConsumptionAdjustmentQty = c.Decimal(precision: 18, scale: 4), ConsumptionAdjustmentDate = c.DateTime(), OrderQty = c.Decimal(precision: 18, scale: 4), OrderDealQty = c.Decimal(precision: 18, scale: 4), OrderCancelQty = c.Decimal(precision: 18, scale: 4), OrderCancelDealQty = c.Decimal(precision: 18, scale: 4), ReceiveQty = c.Decimal(precision: 18, scale: 4), ReceiveDealQty = c.Decimal(precision: 18, scale: 4), InvoiceQty = c.Decimal(precision: 18, scale: 4), InvoiceDealQty = c.Decimal(precision: 18, scale: 4), PendingToInvoiceAmount = c.Decimal(precision: 18, scale: 4), InvoiceAmount = c.Decimal(precision: 18, scale: 4), ReceiveIncentiveAmount = c.Decimal(precision: 18, scale: 4), ReceivePenaltyAmount = c.Decimal(precision: 18, scale: 4), TimeIncentiveAmount = c.Decimal(precision: 18, scale: 4), TimePenaltyAmount = c.Decimal(precision: 18, scale: 4), FragmentationPenaltyAmount = c.Decimal(precision: 18, scale: 4), SchemeIncentiveAmount = c.Decimal(precision: 18, scale: 4), DebitAmount = c.Decimal(precision: 18, scale: 4), CreditAmount = c.Decimal(precision: 18, scale: 4), PaymentAmount = c.Decimal(precision: 18, scale: 4), TDSAmount = c.Decimal(precision: 18, scale: 4), ProductId = c.Int(), ReturnQty = c.Decimal(precision: 18, scale: 4), ReturnDealQty = c.Decimal(precision: 18, scale: 4), PaymentCancelAmount = c.Decimal(precision: 18, scale: 4), Rate = c.Decimal(precision: 18, scale: 4), WeavingReceipt = c.Decimal(precision: 18, scale: 4), AmountTransferDate = c.DateTime(), ReturnConsumeQty = c.Decimal(precision: 18, scale: 4), }) .PrimaryKey(t => t.CostCenterId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .Index(t => t.CostCenterId); CreateTable( "Web.Counters", c => new { CounterId = c.Int(nullable: false, identity: true), ImageFolderName = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.CounterId); CreateTable( "Web.Couriers", c => new { PersonID = c.Int(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PersonID) .ForeignKey("Web.People", t => t.PersonID) .Index(t => t.PersonID); CreateTable( "Web.CurrencyConversions", c => new { CurrencyConversionsId = c.Int(nullable: false, identity: true), FromQty = c.Decimal(nullable: false, precision: 18, scale: 4), FromCurrencyId = c.Int(nullable: false), ToQty = c.Decimal(nullable: false, precision: 18, scale: 4), ToCurrencyId = c.Int(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), Remark = c.String(), }) .PrimaryKey(t => t.CurrencyConversionsId) .ForeignKey("Web.Currencies", t => t.FromCurrencyId) .ForeignKey("Web.Currencies", t => t.ToCurrencyId) .Index(t => t.FromCurrencyId) .Index(t => t.ToCurrencyId); CreateTable( "Web.CustomDetails", c => new { CustomDetailId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(nullable: false, maxLength: 20), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), SaleInvoiceHeaderId = c.Int(), TRNo = c.String(maxLength: 20), TRDate = c.DateTime(), TRCourierId = c.Int(), TRCourierDate = c.DateTime(), TRCourierRefNo = c.String(maxLength: 50), ShippingBillNo = c.String(maxLength: 50), ShippingBillDate = c.DateTime(), CustomSealNo = c.String(maxLength: 50), LineSealNo = c.String(maxLength: 50), NoOfPackages = c.Decimal(precision: 18, scale: 4), ActualWeight = c.Decimal(precision: 18, scale: 4), ChargedWeight = c.Decimal(precision: 18, scale: 4), ContainerNo = c.String(maxLength: 50), Status = c.Int(nullable: false), Remark = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.CustomDetailId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.SaleInvoiceHeaders", t => t.SaleInvoiceHeaderId) .ForeignKey("Web.Sites", t => t.SiteId) .ForeignKey("Web.People", t => t.TRCourierId) .Index(t => new { t.DocTypeId, t.DocNo, t.DivisionId, t.SiteId }, unique: true, name: "IX_CustomDetail_DocID") .Index(t => t.SaleInvoiceHeaderId) .Index(t => t.TRCourierId); CreateTable( "Web.SaleInvoiceHeaders", c => new { SaleInvoiceHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(nullable: false, maxLength: 20), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), LedgerHeaderId = c.Int(), SaleToBuyerId = c.Int(nullable: false), BillToBuyerId = c.Int(nullable: false), AgentId = c.Int(), CurrencyId = c.Int(nullable: false), ExchangeRate = c.Decimal(precision: 18, scale: 4), CreditLimit = c.Decimal(precision: 18, scale: 4), CreditDays = c.Decimal(precision: 18, scale: 4), CurrentBalance = c.Decimal(precision: 18, scale: 4), Status = c.Int(nullable: false), Remark = c.String(), LockReason = c.String(), SaleDispatchHeaderId = c.Int(), CalculateDiscountOnRate = c.Boolean(nullable: false), ReviewCount = c.Int(), ReviewBy = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.SaleInvoiceHeaderId) .ForeignKey("Web.People", t => t.AgentId) .ForeignKey("Web.Buyers", t => t.BillToBuyerId) .ForeignKey("Web.Currencies", t => t.CurrencyId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.LedgerHeaders", t => t.LedgerHeaderId) .ForeignKey("Web.SaleDispatchHeaders", t => t.SaleDispatchHeaderId) .ForeignKey("Web.People", t => t.SaleToBuyerId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => new { t.DocTypeId, t.DocNo, t.DivisionId, t.SiteId }, unique: true, name: "IX_SaleInvoiceHeader_DocID") .Index(t => t.LedgerHeaderId) .Index(t => t.SaleToBuyerId) .Index(t => t.BillToBuyerId) .Index(t => t.AgentId) .Index(t => t.CurrencyId) .Index(t => t.SaleDispatchHeaderId); CreateTable( "Web.SaleDispatchHeaders", c => new { SaleDispatchHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(nullable: false, maxLength: 20), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), SaleToBuyerId = c.Int(nullable: false), ShipToPartyAddress = c.String(maxLength: 250), GateEntryNo = c.String(maxLength: 20), FormNo = c.String(maxLength: 20), Transporter = c.String(maxLength: 100), DeliveryTermsId = c.Int(nullable: false), ShipMethodId = c.Int(), Remark = c.String(), Status = c.Int(nullable: false), GatePassHeaderId = c.Int(), StockHeaderId = c.Int(), PackingHeaderId = c.Int(), ReviewCount = c.Int(), ReviewBy = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.SaleDispatchHeaderId) .ForeignKey("Web.DeliveryTerms", t => t.DeliveryTermsId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.GatePassHeaders", t => t.GatePassHeaderId) .ForeignKey("Web.PackingHeaders", t => t.PackingHeaderId) .ForeignKey("Web.People", t => t.SaleToBuyerId) .ForeignKey("Web.ShipMethods", t => t.ShipMethodId) .ForeignKey("Web.Sites", t => t.SiteId) .ForeignKey("Web.StockHeaders", t => t.StockHeaderId) .Index(t => new { t.DocTypeId, t.DocNo, t.DivisionId, t.SiteId }, unique: true, name: "IX_SaleDispatchHeader_DocID") .Index(t => t.SaleToBuyerId) .Index(t => t.DeliveryTermsId) .Index(t => t.ShipMethodId) .Index(t => t.GatePassHeaderId) .Index(t => t.StockHeaderId) .Index(t => t.PackingHeaderId); CreateTable( "Web.SaleDispatchLines", c => new { SaleDispatchLineId = c.Int(nullable: false, identity: true), SaleDispatchHeaderId = c.Int(nullable: false), PackingLineId = c.Int(nullable: false), GodownId = c.Int(nullable: false), StockId = c.Int(), StockInId = c.Int(), Remark = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), ProductUidLastTransactionDocId = c.Int(), ProductUidLastTransactionDocNo = c.String(), ProductUidLastTransactionDocTypeId = c.Int(), ProductUidLastTransactionDocDate = c.DateTime(), ProductUidLastTransactionPersonId = c.Int(), ProductUidCurrentGodownId = c.Int(), ProductUidCurrentProcessId = c.Int(), ProductUidStatus = c.String(maxLength: 10), LockReason = c.String(), }) .PrimaryKey(t => t.SaleDispatchLineId) .ForeignKey("Web.Godowns", t => t.GodownId) .ForeignKey("Web.PackingLines", t => t.PackingLineId) .ForeignKey("Web.Godowns", t => t.ProductUidCurrentGodownId) .ForeignKey("Web.Processes", t => t.ProductUidCurrentProcessId) .ForeignKey("Web.DocumentTypes", t => t.ProductUidLastTransactionDocTypeId) .ForeignKey("Web.People", t => t.ProductUidLastTransactionPersonId) .ForeignKey("Web.SaleDispatchHeaders", t => t.SaleDispatchHeaderId) .ForeignKey("Web.Stocks", t => t.StockId) .ForeignKey("Web.Stocks", t => t.StockInId) .Index(t => t.SaleDispatchHeaderId) .Index(t => t.PackingLineId) .Index(t => t.GodownId) .Index(t => t.StockId) .Index(t => t.StockInId) .Index(t => t.ProductUidLastTransactionDocTypeId) .Index(t => t.ProductUidLastTransactionPersonId) .Index(t => t.ProductUidCurrentGodownId) .Index(t => t.ProductUidCurrentProcessId); CreateTable( "Web.SaleInvoiceLines", c => new { SaleInvoiceLineId = c.Int(nullable: false, identity: true), SaleInvoiceHeaderId = c.Int(nullable: false), SaleDispatchLineId = c.Int(nullable: false), SaleOrderLineId = c.Int(), ProductId = c.Int(nullable: false), Dimension1Id = c.Int(), Dimension2Id = c.Int(), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), SalesTaxGroupId = c.Int(), ProductInvoiceGroupId = c.Int(), DealUnitId = c.String(nullable: false, maxLength: 3), DealQty = c.Decimal(nullable: false, precision: 18, scale: 4), UnitConversionMultiplier = c.Decimal(precision: 18, scale: 4), Rate = c.Decimal(nullable: false, precision: 18, scale: 4), Weight = c.Decimal(precision: 18, scale: 4), PromoCodeId = c.Int(), DiscountPer = c.Decimal(precision: 18, scale: 4), DiscountAmount = c.Decimal(precision: 18, scale: 4), Amount = c.Decimal(nullable: false, precision: 18, scale: 4), Remark = c.String(), LockReason = c.String(), Sr = c.Int(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.SaleInvoiceLineId) .ForeignKey("Web.Units", t => t.DealUnitId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.Products", t => t.ProductId) .ForeignKey("Web.ProductInvoiceGroups", t => t.ProductInvoiceGroupId) .ForeignKey("Web.PromoCodes", t => t.PromoCodeId) .ForeignKey("Web.SaleDispatchLines", t => t.SaleDispatchLineId) .ForeignKey("Web.SaleInvoiceHeaders", t => t.SaleInvoiceHeaderId) .ForeignKey("Web.SaleOrderLines", t => t.SaleOrderLineId) .ForeignKey("Web.SalesTaxGroups", t => t.SalesTaxGroupId) .Index(t => t.SaleInvoiceHeaderId) .Index(t => t.SaleDispatchLineId) .Index(t => t.SaleOrderLineId) .Index(t => t.ProductId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id) .Index(t => t.SalesTaxGroupId) .Index(t => t.ProductInvoiceGroupId) .Index(t => t.DealUnitId) .Index(t => t.PromoCodeId); CreateTable( "Web.PromoCodes", c => new { PromoCodeId = c.Int(nullable: false, identity: true), PromoCodeName = c.String(nullable: false, maxLength: 50), FromDate = c.DateTime(nullable: false), ToDate = c.DateTime(nullable: false), ProductId = c.Int(), ProductGroupId = c.Int(), ProductCategoryId = c.Int(), ProductTypeId = c.Int(), MinInvoiceValue = c.Decimal(precision: 18, scale: 4), DiscountPer = c.Decimal(precision: 18, scale: 4), FlatDiscount = c.Decimal(precision: 18, scale: 4), MaxDiscountAmount = c.Decimal(precision: 18, scale: 4), IsApplicableOnce = c.Boolean(nullable: false), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PromoCodeId) .ForeignKey("Web.Products", t => t.ProductId) .ForeignKey("Web.ProductCategories", t => t.ProductCategoryId) .ForeignKey("Web.ProductGroups", t => t.ProductGroupId) .ForeignKey("Web.ProductTypes", t => t.ProductTypeId) .Index(t => t.PromoCodeName, unique: true, name: "IX_PromoCode_PromoCode") .Index(t => t.ProductId) .Index(t => t.ProductGroupId) .Index(t => t.ProductCategoryId) .Index(t => t.ProductTypeId); CreateTable( "Web.DispatchWaybillHeaders", c => new { DispatchWaybillHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(nullable: false, maxLength: 20), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), ConsigneeId = c.Int(nullable: false), ShipMethodId = c.Int(nullable: false), SaleInvoiceHeaderId = c.Int(nullable: false), TransporterId = c.Int(nullable: false), DeliveryOffice = c.String(maxLength: 100), WaybillNo = c.String(nullable: false, maxLength: 50), WaybillDate = c.DateTime(nullable: false), EstimatedDeliveryDate = c.DateTime(nullable: false), PaymentType = c.String(nullable: false, maxLength: 20), FromCityId = c.Int(nullable: false), ToCityId = c.Int(nullable: false), RouteId = c.Int(nullable: false), ProductDescription = c.String(), PrivateMark = c.String(maxLength: 100), NoOfPackages = c.String(maxLength: 50), ActualWeight = c.Decimal(precision: 18, scale: 4), ChargedWeight = c.Decimal(precision: 18, scale: 4), ContainerNo = c.String(maxLength: 50), Freight = c.Decimal(precision: 18, scale: 4), OtherCharges = c.Decimal(precision: 18, scale: 4), ServiceTaxPer = c.Decimal(precision: 18, scale: 4), ServiceTaxAmount = c.Decimal(precision: 18, scale: 4), TotalAmount = c.Decimal(precision: 18, scale: 4), Remark = c.String(), IsPreCarriage = c.Boolean(nullable: false), Status = c.Int(nullable: false), ReviewCount = c.Int(), ReviewBy = c.String(), LockReason = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.DispatchWaybillHeaderId) .ForeignKey("Web.Buyers", t => t.ConsigneeId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Cities", t => t.FromCityId) .ForeignKey("Web.Routes", t => t.RouteId) .ForeignKey("Web.SaleInvoiceHeaders", t => t.SaleInvoiceHeaderId) .ForeignKey("Web.ShipMethods", t => t.ShipMethodId) .ForeignKey("Web.Sites", t => t.SiteId) .ForeignKey("Web.Cities", t => t.ToCityId) .ForeignKey("Web.Transporters", t => t.TransporterId) .Index(t => new { t.DocTypeId, t.DocNo, t.DivisionId, t.SiteId }, unique: true, name: "IX_DispatchWaybillHeader_DocID") .Index(t => t.ConsigneeId) .Index(t => t.ShipMethodId) .Index(t => t.SaleInvoiceHeaderId) .Index(t => t.TransporterId) .Index(t => t.FromCityId) .Index(t => t.ToCityId) .Index(t => t.RouteId); CreateTable( "Web.Routes", c => new { RouteId = c.Int(nullable: false, identity: true), RouteName = c.String(nullable: false, maxLength: 50), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.RouteId) .Index(t => t.RouteName, unique: true, name: "IX_Route_RouteName"); CreateTable( "Web.DispatchWaybillLines", c => new { DispatchWaybillLineId = c.Int(nullable: false, identity: true), DispatchWaybillHeaderId = c.Int(nullable: false), CityId = c.Int(nullable: false), ReceiveDateTime = c.DateTime(), ReceiveRemark = c.String(), ForwardingDateTime = c.DateTime(), ForwardedBy = c.String(maxLength: 250), ForwardingRemark = c.String(), LockReason = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.DispatchWaybillLineId) .ForeignKey("Web.Cities", t => t.CityId) .ForeignKey("Web.DispatchWaybillHeaders", t => t.DispatchWaybillHeaderId) .Index(t => t.DispatchWaybillHeaderId) .Index(t => t.CityId); CreateTable( "Web.DocEmailContents", c => new { DocEmailContentId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), ActivityTypeId = c.Int(nullable: false), ProcEmailContent = c.String(maxLength: 100), AttachmentTypes = c.String(maxLength: 100), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.DocEmailContentId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.DocTypeId) .Index(t => t.SiteId) .Index(t => t.DivisionId); CreateTable( "Web.DocNotificationContents", c => new { DocNotificationContentId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), ActivityTypeId = c.Int(nullable: false), ProcNotificationContent = c.String(maxLength: 100), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.DocNotificationContentId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.DocTypeId) .Index(t => t.SiteId) .Index(t => t.DivisionId); CreateTable( "Web.DocSmsContents", c => new { DocSmsContentId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), ActivityTypeId = c.Int(nullable: false), ProcSmsContent = c.String(maxLength: 100), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.DocSmsContentId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.DocTypeId) .Index(t => t.SiteId) .Index(t => t.DivisionId); CreateTable( "Web.DocumentAttachments", c => new { DocumentAttachmentId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocId = c.Int(nullable: false), FileFolderName = c.String(), FileName = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.DocumentAttachmentId); CreateTable( "Web.DocumentStatus", c => new { DocumentStatusId = c.Int(nullable: false, identity: true), DocumentStatusName = c.String(nullable: false, maxLength: 50), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.DocumentStatusId) .Index(t => t.DocumentStatusName, unique: true, name: "IX_DocumentStatus_DocumentStatusName"); CreateTable( "Web.DocumentTypeDivisions", c => new { DocumentTypeDivisionId = c.Int(nullable: false, identity: true), DocumentTypeId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.DocumentTypeDivisionId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocumentTypeId) .Index(t => t.DocumentTypeId) .Index(t => t.DivisionId); CreateTable( "Web.DocumentTypeSites", c => new { DocumentTypeSiteId = c.Int(nullable: false, identity: true), DocumentTypeId = c.Int(nullable: false), SiteId = c.Int(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.DocumentTypeSiteId) .ForeignKey("Web.DocumentTypes", t => t.DocumentTypeId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.DocumentTypeId) .Index(t => t.SiteId); CreateTable( "Web.DocumentTypeTimeExtensions", c => new { DocumentTypeTimeExtensionId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), Type = c.String(), ExpiryDate = c.DateTime(nullable: false), UserName = c.String(), Reason = c.String(), NoOfRecords = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.DocumentTypeTimeExtensionId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.DocTypeId) .Index(t => t.DivisionId) .Index(t => t.SiteId); CreateTable( "Web.DocumentTypeTimePlans", c => new { DocumentTypeTimePlanId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), Type = c.String(), Days = c.Decimal(nullable: false, precision: 18, scale: 4), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.DocumentTypeTimePlanId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.DocTypeId) .Index(t => t.DivisionId) .Index(t => t.SiteId); CreateTable( "Web.ExcessMaterialHeaders", c => new { ExcessMaterialHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(nullable: false, maxLength: 20), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), CurrencyId = c.Int(), PersonId = c.Int(), ProcessId = c.Int(), GodownId = c.Int(), Remark = c.String(), Status = c.Int(nullable: false), ReviewCount = c.Int(), ReviewBy = c.String(), CreatedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedBy = c.String(), ModifiedDate = c.DateTime(nullable: false), LockReason = c.String(), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ExcessMaterialHeaderId) .ForeignKey("Web.Currencies", t => t.CurrencyId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Godowns", t => t.GodownId) .ForeignKey("Web.People", t => t.PersonId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => new { t.DocTypeId, t.DocNo, t.DivisionId, t.SiteId }, unique: true, name: "IX_ExcessMaterialHeader_DocID") .Index(t => t.CurrencyId) .Index(t => t.PersonId) .Index(t => t.ProcessId) .Index(t => t.GodownId); CreateTable( "Web.ExcessMaterialLines", c => new { ExcessMaterialLineId = c.Int(nullable: false, identity: true), ExcessMaterialHeaderId = c.Int(nullable: false), ProductUidId = c.Int(), ProductId = c.Int(nullable: false), ProcessId = c.Int(), LotNo = c.String(maxLength: 10), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), Remark = c.String(), Dimension1Id = c.Int(), Dimension2Id = c.Int(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), LockReason = c.String(), OMSId = c.String(maxLength: 50), Sr = c.Int(), ProductUidLastTransactionDocId = c.Int(), ProductUidLastTransactionDocNo = c.String(), ProductUidLastTransactionDocTypeId = c.Int(), ProductUidLastTransactionDocDate = c.DateTime(), ProductUidLastTransactionPersonId = c.Int(), ProductUidCurrentGodownId = c.Int(), ProductUidCurrentProcessId = c.Int(), ProductUidStatus = c.String(maxLength: 10), }) .PrimaryKey(t => t.ExcessMaterialLineId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.ExcessMaterialHeaders", t => t.ExcessMaterialHeaderId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.Products", t => t.ProductId) .ForeignKey("Web.ProductUids", t => t.ProductUidId) .ForeignKey("Web.Godowns", t => t.ProductUidCurrentGodownId) .ForeignKey("Web.Processes", t => t.ProductUidCurrentProcessId) .ForeignKey("Web.DocumentTypes", t => t.ProductUidLastTransactionDocTypeId) .ForeignKey("Web.People", t => t.ProductUidLastTransactionPersonId) .Index(t => t.ExcessMaterialHeaderId) .Index(t => t.ProductUidId) .Index(t => t.ProductId) .Index(t => t.ProcessId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id) .Index(t => t.ProductUidLastTransactionDocTypeId) .Index(t => t.ProductUidLastTransactionPersonId) .Index(t => t.ProductUidCurrentGodownId) .Index(t => t.ProductUidCurrentProcessId); CreateTable( "Web.ExcessMaterialSettings", c => new { ExcessMaterialSettingsId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), isVisibleProductUID = c.Boolean(), isVisibleDimension1 = c.Boolean(), isVisibleDimension2 = c.Boolean(), isVisibleLotNo = c.Boolean(), isMandatoryProcessLine = c.Boolean(), isVisibleProcessLine = c.Boolean(), SqlProcDocumentPrint = c.String(maxLength: 100), SqlProcDocumentPrint_AfterApprove = c.String(maxLength: 100), SqlProcDocumentPrint_AfterSubmit = c.String(maxLength: 100), filterProductTypes = c.String(), filterContraSites = c.String(), filterContraDivisions = c.String(), filterProductGroups = c.String(), filterProducts = c.String(), filterContraDocTypes = c.String(), ProcessId = c.Int(), ImportMenuId = c.Int(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.ExcessMaterialSettingsId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Menus", t => t.ImportMenuId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.DocTypeId) .Index(t => t.SiteId) .Index(t => t.DivisionId) .Index(t => t.ProcessId) .Index(t => t.ImportMenuId); CreateTable( "Web.InspectionQaAttributes", c => new { InspectionQaAttributesId = c.Int(nullable: false, identity: true), InspectionHeaderId = c.Int(nullable: false), ProductTypeQaAttributeId = c.Int(nullable: false), Value = c.Int(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.InspectionQaAttributesId) .ForeignKey("Web.ProductTypeQaAttributes", t => t.ProductTypeQaAttributeId) .Index(t => t.ProductTypeQaAttributeId); CreateTable( "Web.ProductTypeQaAttributes", c => new { Id = c.Int(nullable: false, identity: true), Name = c.String(nullable: false), ProductTypeId = c.Int(nullable: false), DefaultValue = c.Int(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.Id) .ForeignKey("Web.ProductTypes", t => t.ProductTypeId) .Index(t => t.ProductTypeId); CreateTable( "Web.JobConsumptionSettings", c => new { JobConsumptionSettingsId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), isVisibleMachine = c.Boolean(), isMandatoryMachine = c.Boolean(), isVisibleCostCenter = c.Boolean(), isMandatoryCostCenter = c.Boolean(), isVisibleProductUID = c.Boolean(), isVisibleDimension1 = c.Boolean(), isVisibleDimension2 = c.Boolean(), isVisibleLotNo = c.Boolean(), isMandatoryProcessLine = c.Boolean(), SqlProcDocumentPrint = c.String(maxLength: 100), filterProductTypes = c.String(), filterProductGroups = c.String(), filterProducts = c.String(), filterContraDocTypes = c.String(), ProcessId = c.Int(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.JobConsumptionSettingsId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.DocTypeId) .Index(t => t.SiteId) .Index(t => t.DivisionId) .Index(t => t.ProcessId); CreateTable( "Web.JobInstructions", c => new { JobInstructionId = c.Int(nullable: false, identity: true), JobInstructionDescription = c.String(nullable: false, maxLength: 50), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.JobInstructionId) .Index(t => t.JobInstructionDescription, unique: true, name: "IX_JobInstruction_JobInstructionDescription"); CreateTable( "Web.JobInvoiceAmendmentHeaders", c => new { JobInvoiceAmendmentHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(maxLength: 10), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), JobWorkerId = c.Int(), OrderById = c.Int(nullable: false), ProcessId = c.Int(nullable: false), Remark = c.String(), Status = c.Int(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), ReviewCount = c.Int(), ReviewBy = c.String(), LockReason = c.String(), }) .PrimaryKey(t => t.JobInvoiceAmendmentHeaderId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.JobWorkers", t => t.JobWorkerId) .ForeignKey("Web.Employees", t => t.OrderById) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.DocTypeId) .Index(t => t.DivisionId) .Index(t => t.SiteId) .Index(t => t.JobWorkerId) .Index(t => t.OrderById) .Index(t => t.ProcessId); CreateTable( "Web.JobInvoiceAmendmentHeaderCharges", c => new { Id = c.Int(nullable: false, identity: true), HeaderTableId = c.Int(nullable: false), Sr = c.Int(nullable: false), ChargeId = c.Int(nullable: false), AddDeduct = c.Int(), AffectCost = c.Boolean(nullable: false), ChargeTypeId = c.Int(), ProductChargeId = c.Int(), CalculateOnId = c.Int(), PersonID = c.Int(), LedgerAccountDrId = c.Int(), LedgerAccountCrId = c.Int(), ContraLedgerAccountId = c.Int(), CostCenterId = c.Int(), RateType = c.Byte(nullable: false), IncludedInBase = c.Boolean(nullable: false), ParentChargeId = c.Int(), Rate = c.Decimal(precision: 18, scale: 4), Amount = c.Decimal(precision: 18, scale: 4), IsVisible = c.Boolean(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.Id) .ForeignKey("Web.Charges", t => t.CalculateOnId) .ForeignKey("Web.Charges", t => t.ChargeId) .ForeignKey("Web.ChargeTypes", t => t.ChargeTypeId) .ForeignKey("Web.LedgerAccounts", t => t.ContraLedgerAccountId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.JobInvoiceAmendmentHeaders", t => t.HeaderTableId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountCrId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountDrId) .ForeignKey("Web.Charges", t => t.ParentChargeId) .ForeignKey("Web.People", t => t.PersonID) .ForeignKey("Web.Charges", t => t.ProductChargeId) .Index(t => t.HeaderTableId) .Index(t => t.ChargeId) .Index(t => t.ChargeTypeId) .Index(t => t.ProductChargeId) .Index(t => t.CalculateOnId) .Index(t => t.PersonID) .Index(t => t.LedgerAccountDrId) .Index(t => t.LedgerAccountCrId) .Index(t => t.ContraLedgerAccountId) .Index(t => t.CostCenterId) .Index(t => t.ParentChargeId); CreateTable( "Web.JobInvoiceHeaders", c => new { JobInvoiceHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(nullable: false, maxLength: 20), JobWorkerDocNo = c.String(maxLength: 20), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), LedgerHeaderId = c.Int(), JobWorkerId = c.Int(), Status = c.Int(nullable: false), ProcessId = c.Int(nullable: false), JobReceiveHeaderId = c.Int(), CreditDays = c.Int(), Remark = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), LockReason = c.String(), OMSId = c.String(maxLength: 50), ReviewCount = c.Int(), ReviewBy = c.String(), }) .PrimaryKey(t => t.JobInvoiceHeaderId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.JobReceiveHeaders", t => t.JobReceiveHeaderId) .ForeignKey("Web.JobWorkers", t => t.JobWorkerId) .ForeignKey("Web.LedgerHeaders", t => t.LedgerHeaderId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => new { t.DocTypeId, t.DocNo, t.DivisionId, t.SiteId }, unique: true, name: "IX_JobInvoiceHeader_DocID") .Index(t => t.LedgerHeaderId) .Index(t => t.JobWorkerId) .Index(t => t.ProcessId) .Index(t => t.JobReceiveHeaderId); CreateTable( "Web.JobInvoiceLines", c => new { JobInvoiceLineId = c.Int(nullable: false, identity: true), JobInvoiceHeaderId = c.Int(nullable: false), JobWorkerId = c.Int(nullable: false), JobReceiveLineId = c.Int(nullable: false), UnitConversionMultiplier = c.Decimal(nullable: false, precision: 18, scale: 4), DealUnitId = c.String(maxLength: 3), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), DealQty = c.Decimal(nullable: false, precision: 18, scale: 4), Rate = c.Decimal(nullable: false, precision: 18, scale: 4), Amount = c.Decimal(nullable: false, precision: 18, scale: 4), IncentiveRate = c.Decimal(precision: 18, scale: 4), IncentiveAmt = c.Decimal(precision: 18, scale: 4), Remark = c.String(), Sr = c.Int(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), LockReason = c.String(), CostCenterId = c.Int(), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.JobInvoiceLineId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.Units", t => t.DealUnitId) .ForeignKey("Web.JobInvoiceHeaders", t => t.JobInvoiceHeaderId) .ForeignKey("Web.JobReceiveLines", t => t.JobReceiveLineId) .ForeignKey("Web.JobWorkers", t => t.JobWorkerId) .Index(t => t.JobInvoiceHeaderId) .Index(t => t.JobWorkerId) .Index(t => t.JobReceiveLineId) .Index(t => t.DealUnitId) .Index(t => t.CostCenterId); CreateTable( "Web.JobReceiveLines", c => new { JobReceiveLineId = c.Int(nullable: false, identity: true), JobReceiveHeaderId = c.Int(nullable: false), ProductUidId = c.Int(), JobOrderLineId = c.Int(nullable: false), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), PassQty = c.Decimal(nullable: false, precision: 18, scale: 4), DealUnitId = c.String(maxLength: 3), DealQty = c.Decimal(nullable: false, precision: 18, scale: 4), UnitConversionMultiplier = c.Decimal(nullable: false, precision: 18, scale: 4), MachineId = c.Int(), LossPer = c.Decimal(nullable: false, precision: 18, scale: 4), LossQty = c.Decimal(nullable: false, precision: 18, scale: 4), PenaltyAmt = c.Decimal(nullable: false, precision: 18, scale: 4), PenaltyRate = c.Decimal(nullable: false, precision: 18, scale: 4), IncentiveRate = c.Decimal(nullable: false, precision: 18, scale: 4), IncentiveAmt = c.Decimal(precision: 18, scale: 4), LotNo = c.String(maxLength: 10), Remark = c.String(), Weight = c.Decimal(nullable: false, precision: 18, scale: 4), StockId = c.Int(), ReferenceDocTypeId = c.Int(), ReferenceDocLineId = c.Int(), StockProcessId = c.Int(), Sr = c.Int(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), LockReason = c.String(), OMSId = c.String(maxLength: 50), ProductUidLastTransactionDocId = c.Int(), ProductUidLastTransactionDocNo = c.String(), ProductUidLastTransactionDocTypeId = c.Int(), ProductUidLastTransactionDocDate = c.DateTime(), ProductUidLastTransactionPersonId = c.Int(), ProductUidCurrentGodownId = c.Int(), ProductUidCurrentProcessId = c.Int(), ProductUidStatus = c.String(maxLength: 10), }) .PrimaryKey(t => t.JobReceiveLineId) .ForeignKey("Web.Units", t => t.DealUnitId) .ForeignKey("Web.JobOrderLines", t => t.JobOrderLineId) .ForeignKey("Web.JobReceiveHeaders", t => t.JobReceiveHeaderId) .ForeignKey("Web.Products", t => t.MachineId) .ForeignKey("Web.ProductUids", t => t.ProductUidId) .ForeignKey("Web.Godowns", t => t.ProductUidCurrentGodownId) .ForeignKey("Web.Processes", t => t.ProductUidCurrentProcessId) .ForeignKey("Web.DocumentTypes", t => t.ProductUidLastTransactionDocTypeId) .ForeignKey("Web.People", t => t.ProductUidLastTransactionPersonId) .ForeignKey("Web.DocumentTypes", t => t.ReferenceDocTypeId) .ForeignKey("Web.Stocks", t => t.StockId) .ForeignKey("Web.StockProcesses", t => t.StockProcessId) .Index(t => t.JobReceiveHeaderId) .Index(t => t.ProductUidId) .Index(t => t.JobOrderLineId) .Index(t => t.DealUnitId) .Index(t => t.MachineId) .Index(t => t.StockId) .Index(t => t.ReferenceDocTypeId) .Index(t => t.StockProcessId) .Index(t => t.ProductUidLastTransactionDocTypeId) .Index(t => t.ProductUidLastTransactionPersonId) .Index(t => t.ProductUidCurrentGodownId) .Index(t => t.ProductUidCurrentProcessId); CreateTable( "Web.JobReceiveHeaders", c => new { JobReceiveHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(nullable: false, maxLength: 20), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), ProcessId = c.Int(nullable: false), JobWorkerId = c.Int(nullable: false), JobWorkerDocNo = c.String(maxLength: 20), JobReceiveById = c.Int(nullable: false), GodownId = c.Int(nullable: false), Remark = c.String(), StockHeaderId = c.Int(), ReferenceDocTypeId = c.Int(), ReferenceDocId = c.Int(), Status = c.Int(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), LockReason = c.String(), ReviewCount = c.Int(), ReviewBy = c.String(), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.JobReceiveHeaderId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Godowns", t => t.GodownId) .ForeignKey("Web.Employees", t => t.JobReceiveById) .ForeignKey("Web.JobWorkers", t => t.JobWorkerId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.DocumentTypes", t => t.ReferenceDocTypeId) .ForeignKey("Web.Sites", t => t.SiteId) .ForeignKey("Web.StockHeaders", t => t.StockHeaderId) .Index(t => new { t.DocTypeId, t.DocNo, t.DivisionId, t.SiteId }, unique: true, name: "IX_JobReceiveHeader_DocID") .Index(t => t.ProcessId) .Index(t => t.JobWorkerId) .Index(t => t.JobReceiveById) .Index(t => t.GodownId) .Index(t => t.StockHeaderId) .Index(t => t.ReferenceDocTypeId); CreateTable( "Web.JobInvoiceHeaderCharges", c => new { Id = c.Int(nullable: false, identity: true), HeaderTableId = c.Int(nullable: false), Sr = c.Int(nullable: false), ChargeId = c.Int(nullable: false), AddDeduct = c.Int(), AffectCost = c.Boolean(nullable: false), ChargeTypeId = c.Int(), ProductChargeId = c.Int(), CalculateOnId = c.Int(), PersonID = c.Int(), LedgerAccountDrId = c.Int(), LedgerAccountCrId = c.Int(), ContraLedgerAccountId = c.Int(), CostCenterId = c.Int(), RateType = c.Byte(nullable: false), IncludedInBase = c.Boolean(nullable: false), ParentChargeId = c.Int(), Rate = c.Decimal(precision: 18, scale: 4), Amount = c.Decimal(precision: 18, scale: 4), IsVisible = c.Boolean(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.Id) .ForeignKey("Web.Charges", t => t.CalculateOnId) .ForeignKey("Web.Charges", t => t.ChargeId) .ForeignKey("Web.ChargeTypes", t => t.ChargeTypeId) .ForeignKey("Web.LedgerAccounts", t => t.ContraLedgerAccountId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.JobInvoiceHeaders", t => t.HeaderTableId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountCrId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountDrId) .ForeignKey("Web.Charges", t => t.ParentChargeId) .ForeignKey("Web.People", t => t.PersonID) .ForeignKey("Web.Charges", t => t.ProductChargeId) .Index(t => t.HeaderTableId) .Index(t => t.ChargeId) .Index(t => t.ChargeTypeId) .Index(t => t.ProductChargeId) .Index(t => t.CalculateOnId) .Index(t => t.PersonID) .Index(t => t.LedgerAccountDrId) .Index(t => t.LedgerAccountCrId) .Index(t => t.ContraLedgerAccountId) .Index(t => t.CostCenterId) .Index(t => t.ParentChargeId); CreateTable( "Web.JobInvoiceLineCharges", c => new { Id = c.Int(nullable: false, identity: true), LineTableId = c.Int(nullable: false), HeaderTableId = c.Int(nullable: false), Sr = c.Int(nullable: false), ChargeId = c.Int(nullable: false), AddDeduct = c.Int(), AffectCost = c.Boolean(nullable: false), ChargeTypeId = c.Int(), CalculateOnId = c.Int(), PersonID = c.Int(), LedgerAccountDrId = c.Int(), LedgerAccountCrId = c.Int(), ContraLedgerAccountId = c.Int(), CostCenterId = c.Int(), RateType = c.Byte(nullable: false), IncludedInBase = c.Boolean(nullable: false), ParentChargeId = c.Int(), Rate = c.Decimal(precision: 18, scale: 4), Amount = c.Decimal(precision: 18, scale: 4), DealQty = c.Decimal(precision: 18, scale: 4), IsVisible = c.Boolean(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.Id) .ForeignKey("Web.Charges", t => t.CalculateOnId) .ForeignKey("Web.Charges", t => t.ChargeId) .ForeignKey("Web.ChargeTypes", t => t.ChargeTypeId) .ForeignKey("Web.LedgerAccounts", t => t.ContraLedgerAccountId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.JobInvoiceLines", t => t.LineTableId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountCrId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountDrId) .ForeignKey("Web.Charges", t => t.ParentChargeId) .ForeignKey("Web.People", t => t.PersonID) .Index(t => t.LineTableId) .Index(t => t.ChargeId) .Index(t => t.ChargeTypeId) .Index(t => t.CalculateOnId) .Index(t => t.PersonID) .Index(t => t.LedgerAccountDrId) .Index(t => t.LedgerAccountCrId) .Index(t => t.ContraLedgerAccountId) .Index(t => t.CostCenterId) .Index(t => t.ParentChargeId); CreateTable( "Web.JobInvoiceLineStatus", c => new { JobInvoiceLineId = c.Int(nullable: false), ReturnQty = c.Decimal(precision: 18, scale: 4), ReturnDealQty = c.Decimal(precision: 18, scale: 4), ReturnWeight = c.Decimal(precision: 18, scale: 4), ReturnDate = c.DateTime(), }) .PrimaryKey(t => t.JobInvoiceLineId) .ForeignKey("Web.JobInvoiceLines", t => t.JobInvoiceLineId) .Index(t => t.JobInvoiceLineId); CreateTable( "Web.JobInvoiceRateAmendmentLines", c => new { JobInvoiceRateAmendmentLineId = c.Int(nullable: false, identity: true), JobInvoiceAmendmentHeaderId = c.Int(nullable: false), JobInvoiceLineId = c.Int(nullable: false), JobWorkerId = c.Int(nullable: false), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), JobInvoiceRate = c.Decimal(nullable: false, precision: 18, scale: 4), AmendedRate = c.Decimal(nullable: false, precision: 18, scale: 4), Rate = c.Decimal(nullable: false, precision: 18, scale: 4), Amount = c.Decimal(nullable: false, precision: 18, scale: 4), PenaltyAmt = c.Decimal(nullable: false, precision: 18, scale: 4), IncentiveAmt = c.Decimal(precision: 18, scale: 4), Remark = c.String(), Sr = c.Int(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), LockReason = c.String(), }) .PrimaryKey(t => t.JobInvoiceRateAmendmentLineId) .ForeignKey("Web.JobInvoiceAmendmentHeaders", t => t.JobInvoiceAmendmentHeaderId) .ForeignKey("Web.JobInvoiceLines", t => t.JobInvoiceLineId) .ForeignKey("Web.JobWorkers", t => t.JobWorkerId) .Index(t => t.JobInvoiceAmendmentHeaderId) .Index(t => t.JobInvoiceLineId) .Index(t => t.JobWorkerId); CreateTable( "Web.JobInvoiceRateAmendmentLineCharges", c => new { Id = c.Int(nullable: false, identity: true), LineTableId = c.Int(nullable: false), HeaderTableId = c.Int(nullable: false), Sr = c.Int(nullable: false), ChargeId = c.Int(nullable: false), AddDeduct = c.Int(), AffectCost = c.Boolean(nullable: false), ChargeTypeId = c.Int(), CalculateOnId = c.Int(), PersonID = c.Int(), LedgerAccountDrId = c.Int(), LedgerAccountCrId = c.Int(), ContraLedgerAccountId = c.Int(), CostCenterId = c.Int(), RateType = c.Byte(nullable: false), IncludedInBase = c.Boolean(nullable: false), ParentChargeId = c.Int(), Rate = c.Decimal(precision: 18, scale: 4), Amount = c.Decimal(precision: 18, scale: 4), DealQty = c.Decimal(precision: 18, scale: 4), IsVisible = c.Boolean(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.Id) .ForeignKey("Web.Charges", t => t.CalculateOnId) .ForeignKey("Web.Charges", t => t.ChargeId) .ForeignKey("Web.ChargeTypes", t => t.ChargeTypeId) .ForeignKey("Web.LedgerAccounts", t => t.ContraLedgerAccountId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.JobInvoiceRateAmendmentLines", t => t.LineTableId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountCrId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountDrId) .ForeignKey("Web.Charges", t => t.ParentChargeId) .ForeignKey("Web.People", t => t.PersonID) .Index(t => t.LineTableId) .Index(t => t.ChargeId) .Index(t => t.ChargeTypeId) .Index(t => t.CalculateOnId) .Index(t => t.PersonID) .Index(t => t.LedgerAccountDrId) .Index(t => t.LedgerAccountCrId) .Index(t => t.ContraLedgerAccountId) .Index(t => t.CostCenterId) .Index(t => t.ParentChargeId); CreateTable( "Web.JobInvoiceReturnHeaders", c => new { JobInvoiceReturnHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(nullable: false, maxLength: 20), ReasonId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), LedgerHeaderId = c.Int(), ExchangeRate = c.Decimal(precision: 18, scale: 4), JobWorkerId = c.Int(nullable: false), ProcessId = c.Int(nullable: false), JobReturnHeaderId = c.Int(), Remark = c.String(nullable: false), Status = c.Int(nullable: false), ReviewCount = c.Int(), ReviewBy = c.String(), LockReason = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.JobInvoiceReturnHeaderId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.JobReturnHeaders", t => t.JobReturnHeaderId) .ForeignKey("Web.JobWorkers", t => t.JobWorkerId) .ForeignKey("Web.LedgerHeaders", t => t.LedgerHeaderId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.Reasons", t => t.ReasonId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => new { t.DocTypeId, t.DocNo, t.DivisionId, t.SiteId }, unique: true, name: "IX_JobInvoiceReturnHeader_DocID") .Index(t => t.ReasonId) .Index(t => t.LedgerHeaderId) .Index(t => t.JobWorkerId) .Index(t => t.ProcessId) .Index(t => t.JobReturnHeaderId); CreateTable( "Web.JobReturnHeaders", c => new { JobReturnHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), ReasonId = c.Int(nullable: false), DocNo = c.String(maxLength: 10), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), ProcessId = c.Int(nullable: false), JobWorkerId = c.Int(nullable: false), OrderById = c.Int(nullable: false), GodownId = c.Int(nullable: false), GatePassHeaderId = c.Int(), StockHeaderId = c.Int(), ReferenceDocTypeId = c.Int(), ReferenceDocId = c.Int(), Status = c.Int(nullable: false), Remark = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), LockReason = c.String(), OMSId = c.String(maxLength: 50), ReviewCount = c.Int(), ReviewBy = c.String(), }) .PrimaryKey(t => t.JobReturnHeaderId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.GatePassHeaders", t => t.GatePassHeaderId) .ForeignKey("Web.Godowns", t => t.GodownId) .ForeignKey("Web.JobWorkers", t => t.JobWorkerId) .ForeignKey("Web.Employees", t => t.OrderById) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.Reasons", t => t.ReasonId) .ForeignKey("Web.DocumentTypes", t => t.ReferenceDocTypeId) .ForeignKey("Web.Sites", t => t.SiteId) .ForeignKey("Web.StockHeaders", t => t.StockHeaderId) .Index(t => t.DocTypeId) .Index(t => t.ReasonId) .Index(t => t.DivisionId) .Index(t => t.SiteId) .Index(t => t.ProcessId) .Index(t => t.JobWorkerId) .Index(t => t.OrderById) .Index(t => t.GodownId) .Index(t => t.GatePassHeaderId) .Index(t => t.StockHeaderId) .Index(t => t.ReferenceDocTypeId); CreateTable( "Web.JobReturnLines", c => new { JobReturnLineId = c.Int(nullable: false, identity: true), JobReturnHeaderId = c.Int(nullable: false), JobReceiveLineId = c.Int(nullable: false), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), LossPer = c.Decimal(nullable: false, precision: 18, scale: 4), LossQty = c.Decimal(nullable: false, precision: 18, scale: 4), DealUnitId = c.String(nullable: false, maxLength: 3), DealQty = c.Decimal(nullable: false, precision: 18, scale: 4), UnitConversionMultiplier = c.Decimal(nullable: false, precision: 18, scale: 4), Remark = c.String(), Weight = c.Decimal(nullable: false, precision: 18, scale: 4), Sr = c.Int(), StockId = c.Int(), StockProcessId = c.Int(), ReferenceDocTypeId = c.Int(), ReferenceDocLineId = c.Int(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), LockReason = c.String(), OMSId = c.String(maxLength: 50), ProductUidLastTransactionDocId = c.Int(), ProductUidLastTransactionDocNo = c.String(), ProductUidLastTransactionDocTypeId = c.Int(), ProductUidLastTransactionDocDate = c.DateTime(), ProductUidLastTransactionPersonId = c.Int(), ProductUidCurrentGodownId = c.Int(), ProductUidCurrentProcessId = c.Int(), ProductUidStatus = c.String(maxLength: 10), }) .PrimaryKey(t => t.JobReturnLineId) .ForeignKey("Web.Units", t => t.DealUnitId) .ForeignKey("Web.JobReceiveLines", t => t.JobReceiveLineId) .ForeignKey("Web.Godowns", t => t.ProductUidCurrentGodownId) .ForeignKey("Web.Processes", t => t.ProductUidCurrentProcessId) .ForeignKey("Web.DocumentTypes", t => t.ProductUidLastTransactionDocTypeId) .ForeignKey("Web.People", t => t.ProductUidLastTransactionPersonId) .ForeignKey("Web.DocumentTypes", t => t.ReferenceDocTypeId) .ForeignKey("Web.Stocks", t => t.StockId) .ForeignKey("Web.StockProcesses", t => t.StockProcessId) .ForeignKey("Web.JobReturnHeaders", t => t.JobReturnHeaderId) .Index(t => t.JobReturnHeaderId) .Index(t => t.JobReceiveLineId) .Index(t => t.DealUnitId) .Index(t => t.StockId) .Index(t => t.StockProcessId) .Index(t => t.ReferenceDocTypeId) .Index(t => t.ProductUidLastTransactionDocTypeId) .Index(t => t.ProductUidLastTransactionPersonId) .Index(t => t.ProductUidCurrentGodownId) .Index(t => t.ProductUidCurrentProcessId); CreateTable( "Web.JobInvoiceReturnHeaderCharges", c => new { Id = c.Int(nullable: false, identity: true), HeaderTableId = c.Int(nullable: false), Sr = c.Int(nullable: false), ChargeId = c.Int(nullable: false), AddDeduct = c.Int(), AffectCost = c.Boolean(nullable: false), ChargeTypeId = c.Int(), ProductChargeId = c.Int(), CalculateOnId = c.Int(), PersonID = c.Int(), LedgerAccountDrId = c.Int(), LedgerAccountCrId = c.Int(), ContraLedgerAccountId = c.Int(), CostCenterId = c.Int(), RateType = c.Byte(nullable: false), IncludedInBase = c.Boolean(nullable: false), ParentChargeId = c.Int(), Rate = c.Decimal(precision: 18, scale: 4), Amount = c.Decimal(precision: 18, scale: 4), IsVisible = c.Boolean(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.Id) .ForeignKey("Web.Charges", t => t.CalculateOnId) .ForeignKey("Web.Charges", t => t.ChargeId) .ForeignKey("Web.ChargeTypes", t => t.ChargeTypeId) .ForeignKey("Web.LedgerAccounts", t => t.ContraLedgerAccountId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.JobInvoiceReturnHeaders", t => t.HeaderTableId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountCrId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountDrId) .ForeignKey("Web.Charges", t => t.ParentChargeId) .ForeignKey("Web.People", t => t.PersonID) .ForeignKey("Web.Charges", t => t.ProductChargeId) .Index(t => t.HeaderTableId) .Index(t => t.ChargeId) .Index(t => t.ChargeTypeId) .Index(t => t.ProductChargeId) .Index(t => t.CalculateOnId) .Index(t => t.PersonID) .Index(t => t.LedgerAccountDrId) .Index(t => t.LedgerAccountCrId) .Index(t => t.ContraLedgerAccountId) .Index(t => t.CostCenterId) .Index(t => t.ParentChargeId); CreateTable( "Web.JobInvoiceReturnLines", c => new { JobInvoiceReturnLineId = c.Int(nullable: false, identity: true), JobInvoiceReturnHeaderId = c.Int(nullable: false), JobInvoiceLineId = c.Int(nullable: false), JobReturnLineId = c.Int(), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), UnitConversionMultiplier = c.Decimal(nullable: false, precision: 18, scale: 4), DealUnitId = c.String(nullable: false, maxLength: 3), DealQty = c.Decimal(nullable: false, precision: 18, scale: 4), Rate = c.Decimal(nullable: false, precision: 18, scale: 4), Amount = c.Decimal(nullable: false, precision: 18, scale: 4), Remark = c.String(), Sr = c.Int(), LockReason = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.JobInvoiceReturnLineId) .ForeignKey("Web.Units", t => t.DealUnitId) .ForeignKey("Web.JobInvoiceLines", t => t.JobInvoiceLineId) .ForeignKey("Web.JobInvoiceReturnHeaders", t => t.JobInvoiceReturnHeaderId) .ForeignKey("Web.JobReturnLines", t => t.JobReturnLineId) .Index(t => t.JobInvoiceReturnHeaderId) .Index(t => t.JobInvoiceLineId) .Index(t => t.JobReturnLineId) .Index(t => t.DealUnitId); CreateTable( "Web.JobInvoiceReturnLineCharges", c => new { Id = c.Int(nullable: false, identity: true), LineTableId = c.Int(nullable: false), HeaderTableId = c.Int(nullable: false), Sr = c.Int(nullable: false), ChargeId = c.Int(nullable: false), AddDeduct = c.Int(), AffectCost = c.Boolean(nullable: false), ChargeTypeId = c.Int(), CalculateOnId = c.Int(), PersonID = c.Int(), LedgerAccountDrId = c.Int(), LedgerAccountCrId = c.Int(), ContraLedgerAccountId = c.Int(), CostCenterId = c.Int(), RateType = c.Byte(nullable: false), IncludedInBase = c.Boolean(nullable: false), ParentChargeId = c.Int(), Rate = c.Decimal(precision: 18, scale: 4), Amount = c.Decimal(precision: 18, scale: 4), DealQty = c.Decimal(precision: 18, scale: 4), IsVisible = c.Boolean(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.Id) .ForeignKey("Web.Charges", t => t.CalculateOnId) .ForeignKey("Web.Charges", t => t.ChargeId) .ForeignKey("Web.ChargeTypes", t => t.ChargeTypeId) .ForeignKey("Web.LedgerAccounts", t => t.ContraLedgerAccountId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.JobInvoiceReturnLines", t => t.LineTableId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountCrId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountDrId) .ForeignKey("Web.Charges", t => t.ParentChargeId) .ForeignKey("Web.People", t => t.PersonID) .Index(t => t.LineTableId) .Index(t => t.ChargeId) .Index(t => t.ChargeTypeId) .Index(t => t.CalculateOnId) .Index(t => t.PersonID) .Index(t => t.LedgerAccountDrId) .Index(t => t.LedgerAccountCrId) .Index(t => t.ContraLedgerAccountId) .Index(t => t.CostCenterId) .Index(t => t.ParentChargeId); CreateTable( "Web.JobInvoiceSettings", c => new { JobInvoiceSettingsId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), isVisibleMachine = c.Boolean(), isMandatoryMachine = c.Boolean(), isVisibleProductUID = c.Boolean(), isVisibleDimension1 = c.Boolean(), isVisibleDimension2 = c.Boolean(), isVisibleLotNo = c.Boolean(), isVisibleLoss = c.Boolean(), isVisibleHeaderJobWorker = c.Boolean(), isPostedInStock = c.Boolean(), isPostedInStockProcess = c.Boolean(), isPostedInStockVirtual = c.Boolean(), isAutoCreateJobReceive = c.Boolean(), SqlProcDocumentPrint = c.String(maxLength: 100), SqlProcDocumentPrint_AfterSubmit = c.String(maxLength: 100), SqlProcDocumentPrint_AfterApprove = c.String(maxLength: 100), DocumentPrint = c.String(maxLength: 100), SqlProcConsumption = c.String(maxLength: 100), SqlProcGatePass = c.String(maxLength: 100), SqlProcGenProductUID = c.String(), filterLedgerAccountGroups = c.String(), filterLedgerAccounts = c.String(), filterProductTypes = c.String(), filterProductGroups = c.String(), filterProducts = c.String(), filterContraDocTypes = c.String(), filterContraSites = c.String(), filterContraDivisions = c.String(), ProcessId = c.Int(nullable: false), ImportMenuId = c.Int(), WizardMenuId = c.Int(), CalculationId = c.Int(), JobReceiveDocTypeId = c.Int(), AmountRoundOff = c.Int(), JobReturnDocTypeId = c.Int(), BarcodeStatusUpdate = c.String(maxLength: 20), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.JobInvoiceSettingsId) .ForeignKey("Web.Calculations", t => t.CalculationId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Menus", t => t.ImportMenuId) .ForeignKey("Web.DocumentTypes", t => t.JobReceiveDocTypeId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.DocumentTypes", t => t.JobReturnDocTypeId) .ForeignKey("Web.Sites", t => t.SiteId) .ForeignKey("Web.Menus", t => t.WizardMenuId) .Index(t => t.DocTypeId) .Index(t => t.SiteId) .Index(t => t.DivisionId) .Index(t => t.ProcessId) .Index(t => t.ImportMenuId) .Index(t => t.WizardMenuId) .Index(t => t.CalculationId) .Index(t => t.JobReceiveDocTypeId) .Index(t => t.JobReturnDocTypeId); CreateTable( "Web.JobOrderAmendmentHeaders", c => new { JobOrderAmendmentHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(maxLength: 10), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), JobWorkerId = c.Int(), OrderById = c.Int(nullable: false), ProcessId = c.Int(nullable: false), LedgerHeaderId = c.Int(), Remark = c.String(), Status = c.Int(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), ReviewCount = c.Int(), ReviewBy = c.String(), LockReason = c.String(), }) .PrimaryKey(t => t.JobOrderAmendmentHeaderId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.JobWorkers", t => t.JobWorkerId) .ForeignKey("Web.LedgerHeaders", t => t.LedgerHeaderId) .ForeignKey("Web.Employees", t => t.OrderById) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.DocTypeId) .Index(t => t.DivisionId) .Index(t => t.SiteId) .Index(t => t.JobWorkerId) .Index(t => t.OrderById) .Index(t => t.ProcessId) .Index(t => t.LedgerHeaderId); CreateTable( "Web.JobOrderByProducts", c => new { JobOrderByProductId = c.Int(nullable: false, identity: true), JobOrderHeaderId = c.Int(nullable: false), ProductId = c.Int(nullable: false), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.JobOrderByProductId) .ForeignKey("Web.JobOrderHeaders", t => t.JobOrderHeaderId) .ForeignKey("Web.Products", t => t.ProductId) .Index(t => t.JobOrderHeaderId) .Index(t => t.ProductId); CreateTable( "Web.JobOrderCancelBoms", c => new { JobOrderCancelBomId = c.Int(nullable: false, identity: true), JobOrderCancelHeaderId = c.Int(nullable: false), JobOrderCancelLineId = c.Int(), JobOrderHeaderId = c.Int(nullable: false), ProductId = c.Int(nullable: false), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), Dimension1Id = c.Int(), Dimension2Id = c.Int(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.JobOrderCancelBomId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.JobOrderCancelHeaders", t => t.JobOrderCancelHeaderId) .ForeignKey("Web.JobOrderCancelLines", t => t.JobOrderCancelLineId) .ForeignKey("Web.JobOrderHeaders", t => t.JobOrderHeaderId) .ForeignKey("Web.Products", t => t.ProductId) .Index(t => t.JobOrderCancelHeaderId) .Index(t => t.JobOrderCancelLineId) .Index(t => t.JobOrderHeaderId) .Index(t => t.ProductId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id); CreateTable( "Web.JobOrderCancelHeaders", c => new { JobOrderCancelHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), ReasonId = c.Int(nullable: false), DocNo = c.String(maxLength: 10), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), ProcessId = c.Int(nullable: false), JobWorkerId = c.Int(nullable: false), OrderById = c.Int(nullable: false), GodownId = c.Int(), StockHeaderId = c.Int(), Status = c.Int(nullable: false), Remark = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), LockReason = c.String(), OMSId = c.String(maxLength: 50), ReviewCount = c.Int(), ReviewBy = c.String(), }) .PrimaryKey(t => t.JobOrderCancelHeaderId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Godowns", t => t.GodownId) .ForeignKey("Web.JobWorkers", t => t.JobWorkerId) .ForeignKey("Web.Employees", t => t.OrderById) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.Reasons", t => t.ReasonId) .ForeignKey("Web.Sites", t => t.SiteId) .ForeignKey("Web.StockHeaders", t => t.StockHeaderId) .Index(t => t.DocTypeId) .Index(t => t.ReasonId) .Index(t => t.DivisionId) .Index(t => t.SiteId) .Index(t => t.ProcessId) .Index(t => t.JobWorkerId) .Index(t => t.OrderById) .Index(t => t.GodownId) .Index(t => t.StockHeaderId); CreateTable( "Web.JobOrderCancelLines", c => new { JobOrderCancelLineId = c.Int(nullable: false, identity: true), JobOrderCancelHeaderId = c.Int(nullable: false), ProductUidId = c.Int(), JobOrderLineId = c.Int(nullable: false), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), Remark = c.String(), StockId = c.Int(), StockProcessId = c.Int(), Sr = c.Int(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), LockReason = c.String(), OMSId = c.String(maxLength: 50), ProductUidLastTransactionDocId = c.Int(), ProductUidLastTransactionDocNo = c.String(), ProductUidLastTransactionDocTypeId = c.Int(), ProductUidLastTransactionDocDate = c.DateTime(), ProductUidLastTransactionPersonId = c.Int(), ProductUidCurrentGodownId = c.Int(), ProductUidCurrentProcessId = c.Int(), ProductUidStatus = c.String(maxLength: 10), }) .PrimaryKey(t => t.JobOrderCancelLineId) .ForeignKey("Web.JobOrderLines", t => t.JobOrderLineId) .ForeignKey("Web.ProductUids", t => t.ProductUidId) .ForeignKey("Web.Godowns", t => t.ProductUidCurrentGodownId) .ForeignKey("Web.Processes", t => t.ProductUidCurrentProcessId) .ForeignKey("Web.DocumentTypes", t => t.ProductUidLastTransactionDocTypeId) .ForeignKey("Web.People", t => t.ProductUidLastTransactionPersonId) .ForeignKey("Web.Stocks", t => t.StockId) .ForeignKey("Web.StockProcesses", t => t.StockProcessId) .ForeignKey("Web.JobOrderCancelHeaders", t => t.JobOrderCancelHeaderId) .Index(t => t.JobOrderCancelHeaderId) .Index(t => t.ProductUidId) .Index(t => t.JobOrderLineId) .Index(t => t.StockId) .Index(t => t.StockProcessId) .Index(t => t.ProductUidLastTransactionDocTypeId) .Index(t => t.ProductUidLastTransactionPersonId) .Index(t => t.ProductUidCurrentGodownId) .Index(t => t.ProductUidCurrentProcessId); CreateTable( "Web.JobOrderHeaderCharges", c => new { Id = c.Int(nullable: false, identity: true), HeaderTableId = c.Int(nullable: false), Sr = c.Int(nullable: false), ChargeId = c.Int(nullable: false), AddDeduct = c.Int(), AffectCost = c.Boolean(nullable: false), ChargeTypeId = c.Int(), ProductChargeId = c.Int(), CalculateOnId = c.Int(), PersonID = c.Int(), LedgerAccountDrId = c.Int(), LedgerAccountCrId = c.Int(), ContraLedgerAccountId = c.Int(), CostCenterId = c.Int(), RateType = c.Byte(nullable: false), IncludedInBase = c.Boolean(nullable: false), ParentChargeId = c.Int(), Rate = c.Decimal(precision: 18, scale: 4), Amount = c.Decimal(precision: 18, scale: 4), IsVisible = c.Boolean(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.Id) .ForeignKey("Web.Charges", t => t.CalculateOnId) .ForeignKey("Web.Charges", t => t.ChargeId) .ForeignKey("Web.ChargeTypes", t => t.ChargeTypeId) .ForeignKey("Web.LedgerAccounts", t => t.ContraLedgerAccountId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.JobOrderHeaders", t => t.HeaderTableId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountCrId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountDrId) .ForeignKey("Web.Charges", t => t.ParentChargeId) .ForeignKey("Web.People", t => t.PersonID) .ForeignKey("Web.Charges", t => t.ProductChargeId) .Index(t => t.HeaderTableId) .Index(t => t.ChargeId) .Index(t => t.ChargeTypeId) .Index(t => t.ProductChargeId) .Index(t => t.CalculateOnId) .Index(t => t.PersonID) .Index(t => t.LedgerAccountDrId) .Index(t => t.LedgerAccountCrId) .Index(t => t.ContraLedgerAccountId) .Index(t => t.CostCenterId) .Index(t => t.ParentChargeId); CreateTable( "Web.JobOrderHeaderStatus", c => new { JobOrderHeaderId = c.Int(nullable: false), BOMQty = c.Decimal(precision: 18, scale: 4), IsTimeIncentiveProcessed = c.Boolean(), ReceiveQty = c.Decimal(precision: 18, scale: 4), ReceiveDealQty = c.Decimal(precision: 18, scale: 4), ReceiveDate = c.DateTime(), CancelQty = c.Decimal(precision: 18, scale: 4), CancelDealQty = c.Decimal(precision: 18, scale: 4), CancelDate = c.DateTime(), IsTimePenaltyProcessed = c.Boolean(), IsSmallChunkPenaltyProcessed = c.Boolean(), TimePenaltyCount = c.Int(), JobReceiveCount = c.Int(), TimeIncentiveId = c.Int(), Status = c.Int(nullable: false), }) .PrimaryKey(t => t.JobOrderHeaderId) .ForeignKey("Web.JobOrderHeaders", t => t.JobOrderHeaderId) .Index(t => t.JobOrderHeaderId); CreateTable( "Web.JobOrderInspectionHeaders", c => new { JobOrderInspectionHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(nullable: false, maxLength: 20), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), ProcessId = c.Int(nullable: false), JobWorkerId = c.Int(nullable: false), InspectionById = c.Int(nullable: false), Remark = c.String(), ReferenceDocTypeId = c.Int(), ReferenceDocId = c.Int(), Status = c.Int(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), LockReason = c.String(), ReviewCount = c.Int(), ReviewBy = c.String(), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.JobOrderInspectionHeaderId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Employees", t => t.InspectionById) .ForeignKey("Web.JobWorkers", t => t.JobWorkerId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.DocumentTypes", t => t.ReferenceDocTypeId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => new { t.DocTypeId, t.DocNo, t.DivisionId, t.SiteId }, unique: true, name: "IX_JobOrderInspectionHeader_DocID") .Index(t => t.ProcessId) .Index(t => t.JobWorkerId) .Index(t => t.InspectionById) .Index(t => t.ReferenceDocTypeId); CreateTable( "Web.JobOrderInspectionLines", c => new { JobOrderInspectionLineId = c.Int(nullable: false, identity: true), JobOrderInspectionHeaderId = c.Int(nullable: false), Sr = c.Int(), ProductUidId = c.Int(), JobOrderInspectionRequestLineId = c.Int(), JobOrderLineId = c.Int(nullable: false), InspectedQty = c.Decimal(nullable: false, precision: 18, scale: 4), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), Marks = c.Decimal(nullable: false, precision: 18, scale: 4), Remark = c.String(), ImageFolderName = c.String(maxLength: 100), ImageFileName = c.String(maxLength: 100), ReferenceDocTypeId = c.Int(), ReferenceDocLineId = c.Int(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), LockReason = c.String(), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.JobOrderInspectionLineId) .ForeignKey("Web.JobOrderInspectionHeaders", t => t.JobOrderInspectionHeaderId) .ForeignKey("Web.JobOrderInspectionRequestLines", t => t.JobOrderInspectionRequestLineId) .ForeignKey("Web.JobOrderLines", t => t.JobOrderLineId) .ForeignKey("Web.ProductUids", t => t.ProductUidId) .ForeignKey("Web.DocumentTypes", t => t.ReferenceDocTypeId) .Index(t => t.JobOrderInspectionHeaderId) .Index(t => t.ProductUidId) .Index(t => t.JobOrderInspectionRequestLineId) .Index(t => t.JobOrderLineId) .Index(t => t.ReferenceDocTypeId); CreateTable( "Web.JobOrderInspectionRequestLines", c => new { JobOrderInspectionRequestLineId = c.Int(nullable: false, identity: true), JobOrderInspectionRequestHeaderId = c.Int(nullable: false), Sr = c.Int(), ProductUidId = c.Int(), JobOrderLineId = c.Int(nullable: false), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), Remark = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), LockReason = c.String(), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.JobOrderInspectionRequestLineId) .ForeignKey("Web.JobOrderInspectionRequestHeaders", t => t.JobOrderInspectionRequestHeaderId) .ForeignKey("Web.JobOrderLines", t => t.JobOrderLineId) .ForeignKey("Web.ProductUids", t => t.ProductUidId) .Index(t => t.JobOrderInspectionRequestHeaderId) .Index(t => t.ProductUidId) .Index(t => t.JobOrderLineId); CreateTable( "Web.JobOrderInspectionRequestHeaders", c => new { JobOrderInspectionRequestHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(maxLength: 10), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), ProcessId = c.Int(nullable: false), JobWorkerId = c.Int(nullable: false), RequestBy = c.String(maxLength: 10), AcceptedYn = c.Boolean(nullable: false), Status = c.Int(nullable: false), Remark = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), LockReason = c.String(), OMSId = c.String(maxLength: 50), ReviewCount = c.Int(), ReviewBy = c.String(), }) .PrimaryKey(t => t.JobOrderInspectionRequestHeaderId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.JobWorkers", t => t.JobWorkerId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.DocTypeId) .Index(t => t.DivisionId) .Index(t => t.SiteId) .Index(t => t.ProcessId) .Index(t => t.JobWorkerId); CreateTable( "Web.JobOrderInspectionRequestCancelHeaders", c => new { JobOrderInspectionRequestCancelHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(maxLength: 10), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), ProcessId = c.Int(nullable: false), JobWorkerId = c.Int(nullable: false), ReasonId = c.Int(nullable: false), RequestBy = c.String(maxLength: 10), Status = c.Int(nullable: false), Remark = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), LockReason = c.String(), OMSId = c.String(maxLength: 50), ReviewCount = c.Int(), ReviewBy = c.String(), }) .PrimaryKey(t => t.JobOrderInspectionRequestCancelHeaderId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.JobWorkers", t => t.JobWorkerId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.Reasons", t => t.ReasonId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.DocTypeId) .Index(t => t.DivisionId) .Index(t => t.SiteId) .Index(t => t.ProcessId) .Index(t => t.JobWorkerId) .Index(t => t.ReasonId); CreateTable( "Web.JobOrderInspectionRequestCancelLines", c => new { JobOrderInspectionRequestCancelLineId = c.Int(nullable: false, identity: true), JobOrderInspectionRequestCancelHeaderId = c.Int(nullable: false), Sr = c.Int(), ProductUidId = c.Int(), JobOrderInspectionRequestLineId = c.Int(nullable: false), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), Remark = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), LockReason = c.String(), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.JobOrderInspectionRequestCancelLineId) .ForeignKey("Web.JobOrderInspectionRequestCancelHeaders", t => t.JobOrderInspectionRequestCancelHeaderId) .ForeignKey("Web.JobOrderInspectionRequestLines", t => t.JobOrderInspectionRequestLineId) .ForeignKey("Web.ProductUids", t => t.ProductUidId) .Index(t => t.JobOrderInspectionRequestCancelHeaderId) .Index(t => t.ProductUidId) .Index(t => t.JobOrderInspectionRequestLineId); CreateTable( "Web.JobOrderInspectionRequestSettings", c => new { JobOrderInspectionRequestSettingsId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), ImportMenuId = c.Int(), isVisibleProductUID = c.Boolean(), isMandatoryProductUID = c.Boolean(), isVisibleDimension1 = c.Boolean(), isVisibleDimension2 = c.Boolean(), filterContraDocTypes = c.String(), filterContraSites = c.String(), filterContraDivisions = c.String(), DocumentPrint = c.String(maxLength: 100), ProcessId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.JobOrderInspectionRequestSettingsId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Menus", t => t.ImportMenuId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.DocTypeId) .Index(t => t.ImportMenuId) .Index(t => t.ProcessId) .Index(t => t.SiteId) .Index(t => t.DivisionId); CreateTable( "Web.JobOrderInspectionSettings", c => new { JobOrderInspectionSettingsId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), ImportMenuId = c.Int(), isVisibleProductUID = c.Boolean(), isMandatoryProductUID = c.Boolean(), isVisibleDimension1 = c.Boolean(), isVisibleDimension2 = c.Boolean(), filterContraDocTypes = c.String(), filterContraSites = c.String(), filterContraDivisions = c.String(), ProcessId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), DocumentPrint = c.String(maxLength: 100), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.JobOrderInspectionSettingsId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Menus", t => t.ImportMenuId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.DocTypeId) .Index(t => t.ImportMenuId) .Index(t => t.ProcessId) .Index(t => t.SiteId) .Index(t => t.DivisionId); CreateTable( "Web.JobOrderJobOrders", c => new { JobOrderJobOrderId = c.Int(nullable: false, identity: true), JobOrderHeaderId = c.Int(nullable: false), GenJobOrderHeaderId = c.Int(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.JobOrderJobOrderId) .ForeignKey("Web.JobOrderHeaders", t => t.GenJobOrderHeaderId) .ForeignKey("Web.JobOrderHeaders", t => t.JobOrderHeaderId) .Index(t => t.JobOrderHeaderId) .Index(t => t.GenJobOrderHeaderId); CreateTable( "Web.JobOrderLineCharges", c => new { Id = c.Int(nullable: false, identity: true), LineTableId = c.Int(nullable: false), HeaderTableId = c.Int(nullable: false), Sr = c.Int(nullable: false), ChargeId = c.Int(nullable: false), AddDeduct = c.Int(), AffectCost = c.Boolean(nullable: false), ChargeTypeId = c.Int(), CalculateOnId = c.Int(), PersonID = c.Int(), LedgerAccountDrId = c.Int(), LedgerAccountCrId = c.Int(), ContraLedgerAccountId = c.Int(), CostCenterId = c.Int(), RateType = c.Byte(nullable: false), IncludedInBase = c.Boolean(nullable: false), ParentChargeId = c.Int(), Rate = c.Decimal(precision: 18, scale: 4), Amount = c.Decimal(precision: 18, scale: 4), DealQty = c.Decimal(precision: 18, scale: 4), IsVisible = c.Boolean(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.Id) .ForeignKey("Web.Charges", t => t.CalculateOnId) .ForeignKey("Web.Charges", t => t.ChargeId) .ForeignKey("Web.ChargeTypes", t => t.ChargeTypeId) .ForeignKey("Web.LedgerAccounts", t => t.ContraLedgerAccountId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.JobOrderLines", t => t.LineTableId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountCrId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountDrId) .ForeignKey("Web.Charges", t => t.ParentChargeId) .ForeignKey("Web.People", t => t.PersonID) .Index(t => t.LineTableId) .Index(t => t.ChargeId) .Index(t => t.ChargeTypeId) .Index(t => t.CalculateOnId) .Index(t => t.PersonID) .Index(t => t.LedgerAccountDrId) .Index(t => t.LedgerAccountCrId) .Index(t => t.ContraLedgerAccountId) .Index(t => t.CostCenterId) .Index(t => t.ParentChargeId); CreateTable( "Web.JobOrderLineExtendeds", c => new { JobOrderLineId = c.Int(nullable: false), OtherUnitId = c.String(maxLength: 3), OtherUnitConversionMultiplier = c.Decimal(nullable: false, precision: 18, scale: 4), OtherRate = c.Decimal(nullable: false, precision: 18, scale: 4), OtherAmount = c.Decimal(nullable: false, precision: 18, scale: 4), OtherQty = c.Decimal(nullable: false, precision: 18, scale: 4), }) .PrimaryKey(t => t.JobOrderLineId) .ForeignKey("Web.JobOrderLines", t => t.JobOrderLineId) .ForeignKey("Web.Units", t => t.OtherUnitId) .Index(t => t.JobOrderLineId) .Index(t => t.OtherUnitId); CreateTable( "Web.JobOrderLineStatus", c => new { JobOrderLineId = c.Int(nullable: false), CancelQty = c.Decimal(precision: 18, scale: 4), CancelDealQty = c.Decimal(precision: 18, scale: 4), CancelDate = c.DateTime(), AmendmentQty = c.Decimal(precision: 18, scale: 4), AmendmentDealQty = c.Decimal(precision: 18, scale: 4), AmendmentDate = c.DateTime(), ReceiveQty = c.Decimal(precision: 18, scale: 4), ReceiveDealQty = c.Decimal(precision: 18, scale: 4), ReceiveDate = c.DateTime(), InvoiceQty = c.Decimal(precision: 18, scale: 4), InvoiceDealQty = c.Decimal(precision: 18, scale: 4), InvoiceDate = c.DateTime(), PaymentQty = c.Decimal(precision: 18, scale: 4), PaymentDate = c.DateTime(), ReturnQty = c.Decimal(precision: 18, scale: 4), ReturnDealQty = c.Decimal(precision: 18, scale: 4), ReturnDate = c.DateTime(), RateAmendmentRate = c.Decimal(precision: 18, scale: 4), RateAmendmentDate = c.DateTime(), ExcessJobReceiveReviewBy = c.String(maxLength: 100), }) .PrimaryKey(t => t.JobOrderLineId) .ForeignKey("Web.JobOrderLines", t => t.JobOrderLineId) .Index(t => t.JobOrderLineId); CreateTable( "Web.JobOrderPerks", c => new { JobOrderPerkId = c.Int(nullable: false, identity: true), JobOrderHeaderId = c.Int(nullable: false), PerkId = c.Int(nullable: false), Base = c.Decimal(nullable: false, precision: 18, scale: 4), Worth = c.Decimal(nullable: false, precision: 18, scale: 4), CostConversionMultiplier = c.Decimal(nullable: false, precision: 18, scale: 4), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.JobOrderPerkId) .ForeignKey("Web.JobOrderHeaders", t => t.JobOrderHeaderId) .ForeignKey("Web.Perks", t => t.PerkId) .Index(t => t.JobOrderHeaderId) .Index(t => t.PerkId); CreateTable( "Web.Perks", c => new { PerkId = c.Int(nullable: false, identity: true), PerkName = c.String(nullable: false, maxLength: 50), BaseDescription = c.String(), Base = c.Decimal(nullable: false, precision: 18, scale: 4), WorthDescription = c.String(), Worth = c.Decimal(nullable: false, precision: 18, scale: 4), CostConversionMultiplier = c.Decimal(nullable: false, precision: 18, scale: 4), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.PerkId) .Index(t => t.PerkName, unique: true, name: "IX_Perk_Perk"); CreateTable( "Web.JobOrderQtyAmendmentLines", c => new { JobOrderQtyAmendmentLineId = c.Int(nullable: false, identity: true), JobOrderAmendmentHeaderId = c.Int(nullable: false), JobOrderLineId = c.Int(nullable: false), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), Sr = c.Int(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.JobOrderQtyAmendmentLineId) .ForeignKey("Web.JobOrderAmendmentHeaders", t => t.JobOrderAmendmentHeaderId) .ForeignKey("Web.JobOrderLines", t => t.JobOrderLineId) .Index(t => t.JobOrderAmendmentHeaderId) .Index(t => t.JobOrderLineId); CreateTable( "Web.JobOrderRateAmendmentLines", c => new { JobOrderRateAmendmentLineId = c.Int(nullable: false, identity: true), JobOrderAmendmentHeaderId = c.Int(nullable: false), JobOrderLineId = c.Int(nullable: false), JobWorkerId = c.Int(nullable: false), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), JobOrderRate = c.Decimal(nullable: false, precision: 18, scale: 4), AmendedRate = c.Decimal(nullable: false, precision: 18, scale: 4), Rate = c.Decimal(nullable: false, precision: 18, scale: 4), Amount = c.Decimal(nullable: false, precision: 18, scale: 4), Remark = c.String(), Sr = c.Int(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), LockReason = c.String(), }) .PrimaryKey(t => t.JobOrderRateAmendmentLineId) .ForeignKey("Web.JobOrderAmendmentHeaders", t => t.JobOrderAmendmentHeaderId) .ForeignKey("Web.JobOrderLines", t => t.JobOrderLineId) .ForeignKey("Web.JobWorkers", t => t.JobWorkerId) .Index(t => t.JobOrderAmendmentHeaderId) .Index(t => t.JobOrderLineId) .Index(t => t.JobWorkerId); CreateTable( "Web.JobOrderSettings", c => new { JobOrderSettingsId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), isVisibleMachine = c.Boolean(), isMandatoryMachine = c.Boolean(), isVisibleCostCenter = c.Boolean(), isMandatoryCostCenter = c.Boolean(), isVisibleProductUID = c.Boolean(), isMandatoryProductUID = c.Boolean(), isVisibleDimension1 = c.Boolean(), isVisibleDimension2 = c.Boolean(), isVisibleRate = c.Boolean(), isMandatoryRate = c.Boolean(), isVisibleGodown = c.Boolean(), isMandatoryGodown = c.Boolean(), isEditableRate = c.Boolean(), isVisibleLotNo = c.Boolean(), isVisibleLoss = c.Boolean(), isVisibleUncountableQty = c.Boolean(), isMandatoryProcessLine = c.Boolean(), isVisibleProcessLine = c.Boolean(), isVisibleJobWorkerLine = c.Boolean(), isUniqueCostCenter = c.Boolean(), PersonWiseCostCenter = c.Boolean(), isPostedInStock = c.Boolean(), isPostedInStockProcess = c.Boolean(), isPostedInStockVirtual = c.Boolean(), RetensionCostCenter = c.Int(), isVisibleFromProdOrder = c.Boolean(), SqlProcDocumentPrint = c.String(maxLength: 100), SqlProcDocumentPrint_AfterSubmit = c.String(maxLength: 100), SqlProcDocumentPrint_AfterApprove = c.String(maxLength: 100), SqlProcConsumption = c.String(maxLength: 100), SqlProcGenProductUID = c.String(maxLength: 100), DocumentPrint = c.String(maxLength: 100), SqlProcGatePass = c.String(maxLength: 100), filterLedgerAccountGroups = c.String(), filterLedgerAccounts = c.String(), filterProductTypes = c.String(), filterProductGroups = c.String(), filterProducts = c.String(), filterContraDocTypes = c.String(), filterContraSites = c.String(), filterContraDivisions = c.String(), UnitConversionForId = c.Byte(nullable: false), ProcessId = c.Int(nullable: false), CalculationId = c.Int(), Perks = c.String(), ImportMenuId = c.Int(), WizardMenuId = c.Int(), JobUnitId = c.String(maxLength: 3), OnSubmitMenuId = c.Int(), OnApproveMenuId = c.Int(), NonCountedQty = c.Decimal(nullable: false, precision: 18, scale: 4), LossQty = c.Decimal(precision: 18, scale: 4), DealUnitId = c.String(maxLength: 3), DueDays = c.Int(), AmountRoundOff = c.Int(), BarcodeStatusUpdate = c.String(maxLength: 20), FilterProductDivision = c.String(), Event_OnHeaderSave = c.String(), Event_OnHeaderDelete = c.String(), Event_OnHeaderSubmit = c.String(), Event_OnHeaderApprove = c.String(), Event_OnHeaderPrint = c.String(), Event_OnLineSave = c.String(), Event_OnLineDelete = c.String(), Event_AfterHeaderSave = c.String(), Event_AfterHeaderDelete = c.String(), Event_AfterHeaderSubmit = c.String(), Event_AfterHeaderApprove = c.String(), Event_AfterLineSave = c.String(), Event_AfterLineDelete = c.String(), MaxDays = c.Int(), ExcessQtyAllowedPer = c.Int(nullable: false), NoOfPrintCopies = c.Int(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.JobOrderSettingsId) .ForeignKey("Web.Calculations", t => t.CalculationId) .ForeignKey("Web.Units", t => t.DealUnitId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Menus", t => t.ImportMenuId) .ForeignKey("Web.Units", t => t.JobUnitId) .ForeignKey("Web.Menus", t => t.OnApproveMenuId) .ForeignKey("Web.Menus", t => t.OnSubmitMenuId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.Sites", t => t.SiteId) .ForeignKey("Web.UnitConversionFors", t => t.UnitConversionForId) .ForeignKey("Web.Menus", t => t.WizardMenuId) .Index(t => t.DocTypeId) .Index(t => t.SiteId) .Index(t => t.DivisionId) .Index(t => t.UnitConversionForId) .Index(t => t.ProcessId) .Index(t => t.CalculationId) .Index(t => t.ImportMenuId) .Index(t => t.WizardMenuId) .Index(t => t.JobUnitId) .Index(t => t.OnSubmitMenuId) .Index(t => t.OnApproveMenuId) .Index(t => t.DealUnitId); CreateTable( "Web.JobReceiveBoms", c => new { JobReceiveBomId = c.Int(nullable: false, identity: true), JobReceiveHeaderId = c.Int(nullable: false), JobReceiveLineId = c.Int(), ProductId = c.Int(nullable: false), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), Dimension1Id = c.Int(), Dimension2Id = c.Int(), CostCenterId = c.Int(), LotNo = c.String(maxLength: 50), StockProcessId = c.Int(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.JobReceiveBomId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.JobReceiveHeaders", t => t.JobReceiveHeaderId) .ForeignKey("Web.JobReceiveLines", t => t.JobReceiveLineId) .ForeignKey("Web.Products", t => t.ProductId) .ForeignKey("Web.StockProcesses", t => t.StockProcessId) .Index(t => t.JobReceiveHeaderId) .Index(t => t.JobReceiveLineId) .Index(t => t.ProductId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id) .Index(t => t.CostCenterId) .Index(t => t.StockProcessId); CreateTable( "Web.JobReceiveByProducts", c => new { JobReceiveByProductId = c.Int(nullable: false, identity: true), JobReceiveHeaderId = c.Int(nullable: false), ProductId = c.Int(nullable: false), Dimension1Id = c.Int(), Dimension2Id = c.Int(), LotNo = c.String(maxLength: 50), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.JobReceiveByProductId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.JobReceiveHeaders", t => t.JobReceiveHeaderId) .ForeignKey("Web.Products", t => t.ProductId) .Index(t => t.JobReceiveHeaderId) .Index(t => t.ProductId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id); CreateTable( "Web.JobReceiveLineStatus", c => new { JobReceiveLineId = c.Int(nullable: false), QaFailQty = c.Decimal(precision: 18, scale: 4), QaFailDealQty = c.Decimal(precision: 18, scale: 4), QaWeight = c.Decimal(precision: 18, scale: 4), QaPenalty = c.Decimal(precision: 18, scale: 4), QaDate = c.DateTime(), ReturnQty = c.Decimal(precision: 18, scale: 4), ReturnDealQty = c.Decimal(precision: 18, scale: 4), ReturnWeight = c.Decimal(precision: 18, scale: 4), ReturnDate = c.DateTime(), InvoiceQty = c.Decimal(precision: 18, scale: 4), InvoiceDealQty = c.Decimal(precision: 18, scale: 4), InvoiceWeight = c.Decimal(precision: 18, scale: 4), InvoiceDate = c.DateTime(), }) .PrimaryKey(t => t.JobReceiveLineId) .ForeignKey("Web.JobReceiveLines", t => t.JobReceiveLineId) .Index(t => t.JobReceiveLineId); CreateTable( "Web.JobReceiveQAHeaders", c => new { JobReceiveQAHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(nullable: false, maxLength: 20), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), ProcessId = c.Int(nullable: false), JobWorkerId = c.Int(nullable: false), QAById = c.Int(nullable: false), Remark = c.String(), ReferenceDocTypeId = c.Int(), ReferenceDocId = c.Int(), Status = c.Int(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), LockReason = c.String(), ReviewCount = c.Int(), ReviewBy = c.String(), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.JobReceiveQAHeaderId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.JobWorkers", t => t.JobWorkerId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.Employees", t => t.QAById) .ForeignKey("Web.DocumentTypes", t => t.ReferenceDocTypeId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => new { t.DocTypeId, t.DocNo, t.DivisionId, t.SiteId }, unique: true, name: "IX_JobReceiveQAHeader_DocID") .Index(t => t.ProcessId) .Index(t => t.JobWorkerId) .Index(t => t.QAById) .Index(t => t.ReferenceDocTypeId); CreateTable( "Web.JobReceiveQALines", c => new { JobReceiveQALineId = c.Int(nullable: false, identity: true), JobReceiveQAHeaderId = c.Int(nullable: false), Sr = c.Int(), ProductUidId = c.Int(), JobReceiveLineId = c.Int(nullable: false), QAQty = c.Decimal(nullable: false, precision: 18, scale: 4), InspectedQty = c.Decimal(nullable: false, precision: 18, scale: 4), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), FailQty = c.Decimal(nullable: false, precision: 18, scale: 4), UnitConversionMultiplier = c.Decimal(nullable: false, precision: 18, scale: 4), DealQty = c.Decimal(nullable: false, precision: 18, scale: 4), FailDealQty = c.Decimal(nullable: false, precision: 18, scale: 4), Weight = c.Decimal(nullable: false, precision: 18, scale: 4), PenaltyRate = c.Decimal(nullable: false, precision: 18, scale: 4), PenaltyAmt = c.Decimal(nullable: false, precision: 18, scale: 4), Marks = c.Decimal(nullable: false, precision: 18, scale: 4), Remark = c.String(), ImageFolderName = c.String(maxLength: 100), ImageFileName = c.String(maxLength: 100), ReferenceDocTypeId = c.Int(), ReferenceDocLineId = c.Int(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), LockReason = c.String(), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.JobReceiveQALineId) .ForeignKey("Web.JobReceiveLines", t => t.JobReceiveLineId) .ForeignKey("Web.JobReceiveQAHeaders", t => t.JobReceiveQAHeaderId) .ForeignKey("Web.ProductUids", t => t.ProductUidId) .ForeignKey("Web.DocumentTypes", t => t.ReferenceDocTypeId) .Index(t => t.JobReceiveQAHeaderId) .Index(t => t.ProductUidId) .Index(t => t.JobReceiveLineId) .Index(t => t.ReferenceDocTypeId); CreateTable( "Web.JobReceiveQASettings", c => new { JobReceiveQASettingsId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), ImportMenuId = c.Int(), WizardMenuId = c.Int(), isVisibleProductUID = c.Boolean(), isMandatoryProductUID = c.Boolean(), isVisibleDimension1 = c.Boolean(), isVisibleDimension2 = c.Boolean(), filterContraDocTypes = c.String(), filterContraSites = c.String(), filterContraDivisions = c.String(), ProcessId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), SqlProcDocumentPrint = c.String(maxLength: 100), SqlProcDocumentPrint_AfterSubmit = c.String(maxLength: 100), SqlProcDocumentPrint_AfterApprove = c.String(maxLength: 100), DocumentPrint = c.String(maxLength: 100), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.JobReceiveQASettingsId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Menus", t => t.ImportMenuId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.Sites", t => t.SiteId) .ForeignKey("Web.Menus", t => t.WizardMenuId) .Index(t => t.DocTypeId) .Index(t => t.ImportMenuId) .Index(t => t.WizardMenuId) .Index(t => t.ProcessId) .Index(t => t.SiteId) .Index(t => t.DivisionId); CreateTable( "Web.JobReceiveSettings", c => new { JobReceiveSettingsId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), isVisibleMachine = c.Boolean(), isMandatoryMachine = c.Boolean(), isVisibleProductUID = c.Boolean(), isVisibleDimension1 = c.Boolean(), isVisibleDimension2 = c.Boolean(), isVisibleLotNo = c.Boolean(), isVisibleLoss = c.Boolean(), IsVisibleWeight = c.Boolean(), IsMandatoryWeight = c.Boolean(), IsVisibleForOrderMultiple = c.Boolean(), isPostedInStock = c.Boolean(), isPostedInStockProcess = c.Boolean(), isPostedInStockVirtual = c.Boolean(), filterContraSites = c.String(), filterContraDivisions = c.String(), SqlProcGatePass = c.String(maxLength: 100), SqlProcDocumentPrint = c.String(maxLength: 100), SqlProcDocumentPrint_AfterSubmit = c.String(maxLength: 100), SqlProcDocumentPrint_AfterApprove = c.String(maxLength: 100), DocumentPrint = c.String(maxLength: 100), SqlProcConsumption = c.String(maxLength: 100), SqlProcGenProductUID = c.String(), filterLedgerAccountGroups = c.String(), filterLedgerAccounts = c.String(), filterProductTypes = c.String(), filterProductGroups = c.String(), filterProducts = c.String(), filterContraDocTypes = c.String(), ProcessId = c.Int(nullable: false), ImportMenuId = c.Int(), WizardMenuId = c.Int(), OnSubmitMenuId = c.Int(), OnApproveMenuId = c.Int(), CalculationId = c.Int(), BarcodeStatusUpdate = c.String(maxLength: 20), StockQty = c.String(maxLength: 20), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.JobReceiveSettingsId) .ForeignKey("Web.Calculations", t => t.CalculationId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Menus", t => t.ImportMenuId) .ForeignKey("Web.Menus", t => t.OnApproveMenuId) .ForeignKey("Web.Menus", t => t.OnSubmitMenuId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.Sites", t => t.SiteId) .ForeignKey("Web.Menus", t => t.WizardMenuId) .Index(t => t.DocTypeId) .Index(t => t.SiteId) .Index(t => t.DivisionId) .Index(t => t.ProcessId) .Index(t => t.ImportMenuId) .Index(t => t.WizardMenuId) .Index(t => t.OnSubmitMenuId) .Index(t => t.OnApproveMenuId) .Index(t => t.CalculationId); CreateTable( "Web.JobReturnBoms", c => new { JobReturnBomId = c.Int(nullable: false, identity: true), JobReturnHeaderId = c.Int(nullable: false), JobReturnLineId = c.Int(), ProductId = c.Int(nullable: false), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), Dimension1Id = c.Int(), Dimension2Id = c.Int(), CostCenterId = c.Int(), LotNo = c.String(maxLength: 50), StockProcessId = c.Int(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.JobReturnBomId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.JobReturnHeaders", t => t.JobReturnHeaderId) .ForeignKey("Web.JobReturnLines", t => t.JobReturnLineId) .ForeignKey("Web.Products", t => t.ProductId) .ForeignKey("Web.StockProcesses", t => t.StockProcessId) .Index(t => t.JobReturnHeaderId) .Index(t => t.JobReturnLineId) .Index(t => t.ProductId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id) .Index(t => t.CostCenterId) .Index(t => t.StockProcessId); CreateTable( "Web.LeaveTypes", c => new { LeaveTypeId = c.Int(nullable: false, identity: true), LeaveTypeName = c.String(nullable: false, maxLength: 50), SiteId = c.Int(nullable: false), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.LeaveTypeId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.LeaveTypeName, unique: true, name: "IX_LeaveType_LeaveTypeName") .Index(t => t.SiteId); CreateTable( "Web.Ledgers", c => new { LedgerId = c.Int(nullable: false, identity: true), LedgerHeaderId = c.Int(nullable: false), LedgerLineId = c.Int(), LedgerAccountId = c.Int(nullable: false), ContraLedgerAccountId = c.Int(), CostCenterId = c.Int(), AmtDr = c.Decimal(nullable: false, precision: 18, scale: 4), AmtCr = c.Decimal(nullable: false, precision: 18, scale: 4), Narration = c.String(maxLength: 250), ContraText = c.String(), ChqNo = c.String(maxLength: 10), DueDate = c.DateTime(), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.LedgerId) .ForeignKey("Web.LedgerAccounts", t => t.ContraLedgerAccountId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountId) .ForeignKey("Web.LedgerHeaders", t => t.LedgerHeaderId) .ForeignKey("Web.LedgerLines", t => t.LedgerLineId) .Index(t => t.LedgerHeaderId) .Index(t => t.LedgerLineId) .Index(t => t.LedgerAccountId) .Index(t => t.ContraLedgerAccountId) .Index(t => t.CostCenterId); CreateTable( "Web.LedgerLines", c => new { LedgerLineId = c.Int(nullable: false, identity: true), LedgerHeaderId = c.Int(nullable: false), LedgerAccountId = c.Int(nullable: false), ReferenceId = c.Int(), ChqNo = c.String(maxLength: 10), ChqDate = c.DateTime(), CostCenterId = c.Int(), BaseValue = c.Decimal(nullable: false, precision: 18, scale: 4), BaseRate = c.Decimal(nullable: false, precision: 18, scale: 4), ReferenceDocTypeId = c.Int(), ReferenceDocId = c.Int(), ReferenceDocLineId = c.Int(), Amount = c.Decimal(nullable: false, precision: 18, scale: 4), Remark = c.String(), LockReason = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.LedgerLineId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountId) .ForeignKey("Web.LedgerHeaders", t => t.LedgerHeaderId) .Index(t => t.LedgerHeaderId) .Index(t => t.LedgerAccountId) .Index(t => t.CostCenterId); CreateTable( "Web.LedgerAdjs", c => new { LedgerAdjId = c.Int(nullable: false, identity: true), LedgerId = c.Int(nullable: false), DrLedgerId = c.Int(), CrLedgerId = c.Int(), SiteId = c.Int(nullable: false), Adj_Type = c.String(maxLength: 20), Amount = c.Decimal(nullable: false, precision: 18, scale: 4), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.LedgerAdjId) .ForeignKey("Web.Ledgers", t => t.CrLedgerId) .ForeignKey("Web.Ledgers", t => t.DrLedgerId) .ForeignKey("Web.Ledgers", t => t.LedgerId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.LedgerId) .Index(t => t.DrLedgerId) .Index(t => t.CrLedgerId) .Index(t => t.SiteId); CreateTable( "Web.LedgerLineRefValues", c => new { LedgerLineRefValueId = c.Int(nullable: false, identity: true), LedgerLineId = c.Int(nullable: false), Head = c.String(maxLength: 50), Value = c.String(maxLength: 50), OMSId = c.String(), }) .PrimaryKey(t => t.LedgerLineRefValueId) .ForeignKey("Web.LedgerLines", t => t.LedgerLineId) .Index(t => t.LedgerLineId); CreateTable( "Web.LedgerSettings", c => new { LedgerSettingId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), isVisibleLineCostCenter = c.Boolean(), isMandatoryLineCostCenter = c.Boolean(), isVisibleHeaderCostCenter = c.Boolean(), isMandatoryHeaderCostCenter = c.Boolean(), isVisibleChqNo = c.Boolean(), isMandatoryChqNo = c.Boolean(), isVisibleRefNo = c.Boolean(), isMandatoryRefNo = c.Boolean(), isVisibleProcess = c.Boolean(), isMandatoryProcess = c.Boolean(), isVisibleGodown = c.Boolean(), isMandatoryGodown = c.Boolean(), filterLedgerAccountGroupHeaders = c.String(), filterPersonProcessHeaders = c.String(), filterPersonProcessLines = c.String(), filterLedgerAccountGroupLines = c.String(), filterDocTypeCostCenter = c.String(), filterContraDocTypes = c.String(), filterContraSites = c.String(), filterContraDivisions = c.String(), SqlProcReferenceNo = c.String(), ProcessId = c.Int(), SqlProcDocumentPrint = c.String(maxLength: 100), SqlProcDocumentPrint_AfterSubmit = c.String(maxLength: 100), SqlProcDocumentPrint_AfterApprove = c.String(maxLength: 100), BaseValueText = c.String(maxLength: 50), BaseRateText = c.String(maxLength: 50), WizardMenuId = c.Int(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.LedgerSettingId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.Sites", t => t.SiteId) .ForeignKey("Web.Menus", t => t.WizardMenuId) .Index(t => t.DocTypeId) .Index(t => t.SiteId) .Index(t => t.DivisionId) .Index(t => t.ProcessId) .Index(t => t.WizardMenuId); CreateTable( "Web.Manufacturers", c => new { PersonID = c.Int(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PersonID) .ForeignKey("Web.People", t => t.PersonID) .Index(t => t.PersonID); CreateTable( "Web.StockHeaderSettings", c => new { StockHeaderSettingsId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), isVisibleMachine = c.Boolean(), isMandatoryMachine = c.Boolean(), isVisibleHeaderCostCenter = c.Boolean(), isMandatoryHeaderCostCenter = c.Boolean(), isVisibleLineCostCenter = c.Boolean(), isMandatoryLineCostCenter = c.Boolean(), isVisibleProductUID = c.Boolean(), isVisibleDimension1 = c.Boolean(), isVisibleDimension2 = c.Boolean(), isVisibleRate = c.Boolean(), isVisibleSpecification = c.Boolean(), isMandatoryRate = c.Boolean(), isEditableRate = c.Boolean(), isVisibleLotNo = c.Boolean(), isMandatoryProcessLine = c.Boolean(), isVisibleProcessLine = c.Boolean(), isPostedInStockProcess = c.Boolean(), isPostedInLedger = c.Boolean(), isProductHelpFromStockProcess = c.Boolean(), AdjLedgerAccountId = c.Int(), isVisibleMaterialRequest = c.Boolean(), PersonFieldHeading = c.String(maxLength: 50), SqlProcDocumentPrint = c.String(maxLength: 100), SqlFuncCurrentStock = c.String(maxLength: 100), SqlProcDocumentPrint_AfterApprove = c.String(maxLength: 100), SqlProcDocumentPrint_AfterSubmit = c.String(maxLength: 100), SqlProcGatePass = c.String(maxLength: 100), SqlProcStockProcessPost = c.String(maxLength: 100), SqlProcStockProcessBalance = c.String(maxLength: 100), filterProductTypes = c.String(), filterContraSites = c.String(), filterContraDivisions = c.String(), filterProductGroups = c.String(), filterProducts = c.String(), filterContraProductDivisions = c.String(), filterContraDocTypes = c.String(), isVisibleWeight = c.Boolean(), WeightCaption = c.String(), LineRoundOff = c.Int(), ProcessId = c.Int(), OnSubmitMenuId = c.Int(), ImportMenuId = c.Int(), BarcodeStatusUpdate = c.String(maxLength: 20), NoOfPrintCopies = c.Int(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.StockHeaderSettingsId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Menus", t => t.ImportMenuId) .ForeignKey("Web.Menus", t => t.OnSubmitMenuId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.DocTypeId) .Index(t => t.SiteId) .Index(t => t.DivisionId) .Index(t => t.ProcessId) .Index(t => t.OnSubmitMenuId) .Index(t => t.ImportMenuId); CreateTable( "Web.MaterialPlanForJobOrders", c => new { MaterialPlanForJobOrderId = c.Int(nullable: false, identity: true), MaterialPlanHeaderId = c.Int(nullable: false), JobOrderLineId = c.Int(nullable: false), MaterialPlanLineId = c.Int(nullable: false), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), OMSId = c.String(maxLength: 50), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.MaterialPlanForJobOrderId) .ForeignKey("Web.JobOrderLines", t => t.JobOrderLineId) .ForeignKey("Web.MaterialPlanHeaders", t => t.MaterialPlanHeaderId) .ForeignKey("Web.MaterialPlanLines", t => t.MaterialPlanLineId) .Index(t => t.MaterialPlanHeaderId) .Index(t => t.JobOrderLineId) .Index(t => t.MaterialPlanLineId); CreateTable( "Web.MaterialPlanForJobOrderLines", c => new { MaterialPlanForJobOrderLineId = c.Int(nullable: false, identity: true), MaterialPlanForJobOrderId = c.Int(nullable: false), ProductId = c.Int(nullable: false), Dimension1Id = c.Int(), Dimension2Id = c.Int(), Specification = c.String(maxLength: 50), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), Remark = c.String(), MaterialPlanLineId = c.Int(), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.MaterialPlanForJobOrderLineId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.MaterialPlanForJobOrders", t => t.MaterialPlanForJobOrderId) .ForeignKey("Web.MaterialPlanLines", t => t.MaterialPlanLineId) .ForeignKey("Web.Products", t => t.ProductId) .Index(t => t.MaterialPlanForJobOrderId) .Index(t => t.ProductId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id) .Index(t => t.MaterialPlanLineId); CreateTable( "Web.MaterialPlanForProdOrders", c => new { MaterialPlanForProdOrderId = c.Int(nullable: false, identity: true), MaterialPlanHeaderId = c.Int(nullable: false), ProdOrderLineId = c.Int(nullable: false), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), OMSId = c.String(maxLength: 50), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), Sr = c.Int(), }) .PrimaryKey(t => t.MaterialPlanForProdOrderId) .ForeignKey("Web.MaterialPlanHeaders", t => t.MaterialPlanHeaderId) .ForeignKey("Web.ProdOrderLines", t => t.ProdOrderLineId) .Index(t => t.MaterialPlanHeaderId) .Index(t => t.ProdOrderLineId); CreateTable( "Web.MaterialPlanForProdOrderLines", c => new { MaterialPlanForProdOrderLineId = c.Int(nullable: false, identity: true), MaterialPlanForProdOrderId = c.Int(nullable: false), ProductId = c.Int(nullable: false), Dimension1Id = c.Int(), Dimension2Id = c.Int(), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), Remark = c.String(), ProcessId = c.Int(), MaterialPlanLineId = c.Int(), OMSId = c.String(maxLength: 50), Sr = c.Int(), }) .PrimaryKey(t => t.MaterialPlanForProdOrderLineId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.MaterialPlanForProdOrders", t => t.MaterialPlanForProdOrderId) .ForeignKey("Web.MaterialPlanLines", t => t.MaterialPlanLineId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.Products", t => t.ProductId) .Index(t => t.MaterialPlanForProdOrderId) .Index(t => t.ProductId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id) .Index(t => t.ProcessId) .Index(t => t.MaterialPlanLineId); CreateTable( "Web.MaterialPlanForSaleOrders", c => new { MaterialPlanForSaleOrderId = c.Int(nullable: false, identity: true), MaterialPlanHeaderId = c.Int(nullable: false), SaleOrderLineId = c.Int(nullable: false), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), MaterialPlanLineId = c.Int(), OMSId = c.String(maxLength: 50), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), Sr = c.Int(), }) .PrimaryKey(t => t.MaterialPlanForSaleOrderId) .ForeignKey("Web.MaterialPlanHeaders", t => t.MaterialPlanHeaderId) .ForeignKey("Web.MaterialPlanLines", t => t.MaterialPlanLineId) .ForeignKey("Web.SaleOrderLines", t => t.SaleOrderLineId) .Index(t => t.MaterialPlanHeaderId) .Index(t => t.SaleOrderLineId) .Index(t => t.MaterialPlanLineId); CreateTable( "Web.MaterialPlanForSaleOrderLines", c => new { MaterialPlanForSaleOrderLineId = c.Int(nullable: false, identity: true), MaterialPlanForSaleOrderId = c.Int(nullable: false), ProductId = c.Int(nullable: false), Dimension1Id = c.Int(), Dimension2Id = c.Int(), Specification = c.String(maxLength: 50), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), Remark = c.String(), MaterialPlanLineId = c.Int(), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.MaterialPlanForSaleOrderLineId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.MaterialPlanForSaleOrders", t => t.MaterialPlanForSaleOrderId) .ForeignKey("Web.MaterialPlanLines", t => t.MaterialPlanLineId) .ForeignKey("Web.Products", t => t.ProductId) .Index(t => t.MaterialPlanForSaleOrderId) .Index(t => t.ProductId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id) .Index(t => t.MaterialPlanLineId); CreateTable( "Web.MaterialPlanSettings", c => new { MaterialPlanSettingsId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), isVisibleDimension1 = c.Boolean(), isVisibleDimension2 = c.Boolean(), isMandatoryProcessLine = c.Boolean(), SqlProcConsumption = c.String(), SqlProcConsumptionSummary = c.String(), PendingProdOrderList = c.String(), filterProcesses = c.String(), filterProductTypes = c.String(), filterProductGroups = c.String(), filterProducts = c.String(), filterContraDocTypes = c.String(), filterProductTypesConsumption = c.String(), SqlProcDocumentPrint = c.String(maxLength: 100), DocTypePurchaseIndentId = c.Int(nullable: false), DocTypeProductionOrderId = c.Int(nullable: false), GodownId = c.Int(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.MaterialPlanSettingsId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeProductionOrderId) .ForeignKey("Web.DocumentTypes", t => t.DocTypePurchaseIndentId) .ForeignKey("Web.Godowns", t => t.GodownId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.DocTypeId) .Index(t => t.SiteId) .Index(t => t.DivisionId) .Index(t => t.DocTypePurchaseIndentId) .Index(t => t.DocTypeProductionOrderId) .Index(t => t.GodownId); CreateTable( "Web.MaterialReceiveSettings", c => new { MaterialReceiveSettingsId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), isVisibleMachine = c.Boolean(), isMandatoryMachine = c.Boolean(), isVisibleCostCenter = c.Boolean(), isMandatoryCostCenter = c.Boolean(), isVisibleProductUID = c.Boolean(), isVisibleDimension1 = c.Boolean(), isVisibleDimension2 = c.Boolean(), isVisibleRate = c.Boolean(), isMandatoryRate = c.Boolean(), isEditableRate = c.Boolean(), isVisibleLotNo = c.Boolean(), isMandatoryProcessLine = c.Boolean(), isVisibleProcessLine = c.Boolean(), isPostedInStockProcess = c.Boolean(), PersonFieldHeading = c.String(maxLength: 50), SqlProcDocumentPrint = c.String(maxLength: 100), filterProductTypes = c.String(), filterProductGroups = c.String(), filterProducts = c.String(), filterContraDocTypes = c.String(), ProcessId = c.Int(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.MaterialReceiveSettingsId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.DocTypeId) .Index(t => t.SiteId) .Index(t => t.DivisionId) .Index(t => t.ProcessId); CreateTable( "Web.MaterialRequestSettings", c => new { MaterialRequestSettingsId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), isVisibleCostCenter = c.Boolean(), isMandatoryCostCenter = c.Boolean(), isVisibleDimension1 = c.Boolean(), isVisibleDimension2 = c.Boolean(), isVisibleLotNo = c.Boolean(), isMandatoryProcessLine = c.Boolean(), SqlProcDocumentPrint = c.String(maxLength: 100), filterProductTypes = c.String(), filterProductGroups = c.String(), filterProducts = c.String(), filterContraDocTypes = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.MaterialRequestSettingsId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.DocTypeId) .Index(t => t.SiteId) .Index(t => t.DivisionId); CreateTable( "Web.Narrations", c => new { NarrationId = c.Int(nullable: false, identity: true), NarrationName = c.String(nullable: false, maxLength: 50), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.NarrationId) .Index(t => t.NarrationName, unique: true, name: "IX_Narration_NarrationName"); CreateTable( "Web.PackingSettings", c => new { PackingSettingId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), isVisibleCostCenter = c.Boolean(), isMandatoryCostCenter = c.Boolean(), isVisibleDimension1 = c.Boolean(), isVisibleDimension2 = c.Boolean(), filterProductTypes = c.String(), filterProductGroups = c.String(), filterProducts = c.String(), filterContraDocTypes = c.String(), filterContraSites = c.String(), filterContraDivisions = c.String(), SqlProcDocumentPrint = c.String(maxLength: 100), SqlProcDocumentPrint_AfterSubmit = c.String(maxLength: 100), SqlProcDocumentPrint_AfterApprove = c.String(maxLength: 100), ExtraSaleOrderNo = c.String(maxLength: 20), ImportMenuId = c.Int(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.PackingSettingId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Menus", t => t.ImportMenuId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.DocTypeId) .Index(t => t.SiteId) .Index(t => t.DivisionId) .Index(t => t.ImportMenuId); CreateTable( "Web.PerkDocumentTypes", c => new { PerkDocumentTypeId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), PerkId = c.Int(nullable: false), RateDocTypeId = c.Int(), RateDocId = c.Int(), Base = c.Decimal(nullable: false, precision: 18, scale: 4), Worth = c.Decimal(nullable: false, precision: 18, scale: 4), CostConversionMultiplier = c.Decimal(nullable: false, precision: 18, scale: 4), IsEditableRate = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PerkDocumentTypeId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Perks", t => t.PerkId) .ForeignKey("Web.DocumentTypes", t => t.RateDocTypeId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.DocTypeId) .Index(t => t.DivisionId) .Index(t => t.SiteId) .Index(t => t.PerkId) .Index(t => t.RateDocTypeId); CreateTable( "Web.PersonBankAccounts", c => new { PersonBankAccountID = c.Int(nullable: false, identity: true), PersonId = c.Int(nullable: false), BankName = c.String(maxLength: 200), BankBranch = c.String(maxLength: 500), BankCode = c.String(maxLength: 50), AccountNo = c.String(maxLength: 20), Remark = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PersonBankAccountID) .ForeignKey("Web.People", t => t.PersonId) .Index(t => t.PersonId); CreateTable( "Web.PersonCustomGroupHeaders", c => new { PersonCustomGroupId = c.Int(nullable: false, identity: true), PersonCustomGroupName = c.String(nullable: false, maxLength: 100), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PersonCustomGroupId) .Index(t => t.PersonCustomGroupName, unique: true, name: "IX_PersonCustomGroup_PersonCustomGroupName"); CreateTable( "Web.PersonCustomGroupLines", c => new { PersonCustomGroupLineId = c.Int(nullable: false, identity: true), PersonCustomGroupHeaderId = c.Int(nullable: false), PersonId = c.Int(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PersonCustomGroupLineId) .ForeignKey("Web.People", t => t.PersonId) .ForeignKey("Web.PersonCustomGroupHeaders", t => t.PersonCustomGroupHeaderId) .Index(t => t.PersonCustomGroupHeaderId) .Index(t => t.PersonId); CreateTable( "Web.PersonDocuments", c => new { PersonDocumentID = c.Int(nullable: false, identity: true), PersonId = c.Int(nullable: false), Name = c.String(maxLength: 50), Description = c.String(maxLength: 500), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), ImageFolderName = c.String(maxLength: 100), ImageFileName = c.String(maxLength: 100), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PersonDocumentID) .ForeignKey("Web.People", t => t.PersonId) .Index(t => t.PersonId); CreateTable( "Web.PersonProcesses", c => new { PersonProcessId = c.Int(nullable: false, identity: true), PersonId = c.Int(nullable: false), ProcessId = c.Int(nullable: false), PersonRateGroupId = c.Int(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PersonProcessId) .ForeignKey("Web.People", t => t.PersonId) .ForeignKey("Web.PersonRateGroups", t => t.PersonRateGroupId) .ForeignKey("Web.Processes", t => t.ProcessId) .Index(t => t.PersonId) .Index(t => t.ProcessId) .Index(t => t.PersonRateGroupId); CreateTable( "Web.PersonRegistrations", c => new { PersonRegistrationID = c.Int(nullable: false, identity: true), PersonId = c.Int(nullable: false), RegistrationType = c.String(maxLength: 30), RegistrationNo = c.String(maxLength: 50), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PersonRegistrationID) .ForeignKey("Web.People", t => t.PersonId) .Index(t => t.PersonId); CreateTable( "Web.ProcessSequenceLines", c => new { ProcessSequenceLineId = c.Int(nullable: false, identity: true), ProcessSequenceHeaderId = c.Int(nullable: false), ProcessId = c.Int(nullable: false), Sequence = c.Int(nullable: false), Days = c.Int(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), ProductRateGroupId = c.Int(), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ProcessSequenceLineId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.ProcessSequenceHeaders", t => t.ProcessSequenceHeaderId) .ForeignKey("Web.ProductRateGroups", t => t.ProductRateGroupId) .Index(t => t.ProcessSequenceHeaderId) .Index(t => t.ProcessId) .Index(t => t.ProductRateGroupId); CreateTable( "Web.ProductRateGroups", c => new { ProductRateGroupId = c.Int(nullable: false, identity: true), ProductRateGroupName = c.String(nullable: false, maxLength: 50), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), Processes = c.String(), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ProductRateGroupId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => new { t.ProductRateGroupName, t.DivisionId, t.SiteId }, unique: true, name: "IX_ProductRateGroup_ProductRateGroupName"); CreateTable( "Web.ProcessSettings", c => new { ProcessSettingsId = c.Int(nullable: false, identity: true), ProcessId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), isApplicable = c.Boolean(), RateListMenuId = c.Int(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.ProcessSettingsId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.Menus", t => t.RateListMenuId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => new { t.ProcessId, t.SiteId, t.DivisionId }, unique: true, name: "IX_ProcessSetting_UniqueKey") .Index(t => t.RateListMenuId); CreateTable( "Web.ProdOrderCancelHeaders", c => new { ProdOrderCancelHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(nullable: false, maxLength: 20), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), ReferenceDocTypeId = c.Int(), ReferenceDocId = c.Int(), Remark = c.String(), LockReason = c.String(), ReviewCount = c.Int(), ReviewBy = c.String(), Status = c.Int(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ProdOrderCancelHeaderId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.DocumentTypes", t => t.ReferenceDocTypeId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => new { t.DocTypeId, t.DocNo, t.DivisionId, t.SiteId }, unique: true, name: "IX_ProdOrderCancelHeader_DocID") .Index(t => t.ReferenceDocTypeId); CreateTable( "Web.ProdOrderCancelLines", c => new { ProdOrderCancelLineId = c.Int(nullable: false, identity: true), ProdOrderCancelHeaderId = c.Int(nullable: false), ProdOrderLineId = c.Int(nullable: false), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), ReferenceDocTypeId = c.Int(), ReferenceDocLineId = c.Int(), LockReason = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ProdOrderCancelLineId) .ForeignKey("Web.ProdOrderCancelHeaders", t => t.ProdOrderCancelHeaderId) .ForeignKey("Web.ProdOrderLines", t => t.ProdOrderLineId) .ForeignKey("Web.DocumentTypes", t => t.ReferenceDocTypeId) .Index(t => t.ProdOrderCancelHeaderId) .Index(t => t.ProdOrderLineId) .Index(t => t.ReferenceDocTypeId); CreateTable( "Web.ProdOrderHeaderStatus", c => new { ProdOrderHeaderId = c.Int(nullable: false), }) .PrimaryKey(t => t.ProdOrderHeaderId) .ForeignKey("Web.ProdOrderHeaders", t => t.ProdOrderHeaderId) .Index(t => t.ProdOrderHeaderId); CreateTable( "Web.ProdOrderLineStatus", c => new { ProdOrderLineId = c.Int(nullable: false), CancelQty = c.Decimal(precision: 18, scale: 4), CancelDate = c.DateTime(), AmendmentQty = c.Decimal(precision: 18, scale: 4), AmendmentDate = c.DateTime(), JobOrderQty = c.Decimal(precision: 18, scale: 4), JobOrderDate = c.DateTime(), ExcessJobOrderReviewBy = c.String(), }) .PrimaryKey(t => t.ProdOrderLineId) .ForeignKey("Web.ProdOrderLines", t => t.ProdOrderLineId) .Index(t => t.ProdOrderLineId); CreateTable( "Web.ProdOrderSettings", c => new { ProdOrderSettingsId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), isVisibleDimension1 = c.Boolean(), isVisibleDimension2 = c.Boolean(), isMandatoryProcessLine = c.Boolean(), filterProcesses = c.String(), filterProductTypes = c.String(), filterProductGroups = c.String(), filterProducts = c.String(), filterContraSites = c.String(), filterContraDivisions = c.String(), filterContraDocTypes = c.String(), SqlProcDocumentPrint = c.String(maxLength: 100), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.ProdOrderSettingsId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.DocTypeId) .Index(t => t.SiteId) .Index(t => t.DivisionId); CreateTable( "Web.ProductAlias", c => new { ProductAliasId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), ProductAliasName = c.String(nullable: false, maxLength: 50), ProductId = c.Int(nullable: false), Status = c.Int(nullable: false), LockReason = c.String(), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ProductAliasId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Products", t => t.ProductId) .Index(t => new { t.DocTypeId, t.ProductAliasName }, unique: true, name: "IX_ProductAlias_ProductAliasName") .Index(t => t.ProductId); CreateTable( "Web.ProductCustomGroupHeaders", c => new { ProductCustomGroupId = c.Int(nullable: false, identity: true), ProductCustomGroupName = c.String(nullable: false, maxLength: 100), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ProductCustomGroupId) .Index(t => t.ProductCustomGroupName, unique: true, name: "IX_ProductCustomGroup_ProductCustomGroupName"); CreateTable( "Web.ProductCustomGroupLines", c => new { ProductCustomGroupLineId = c.Int(nullable: false, identity: true), ProductCustomGroupHeaderId = c.Int(nullable: false), ProductId = c.Int(nullable: false), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ProductCustomGroupLineId) .ForeignKey("Web.Products", t => t.ProductId) .ForeignKey("Web.ProductCustomGroupHeaders", t => t.ProductCustomGroupHeaderId) .Index(t => t.ProductCustomGroupHeaderId) .Index(t => t.ProductId); CreateTable( "Web.ProductionOrderSettings", c => new { ProductionOrderSettingsId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), isVisibleDimension1 = c.Boolean(), isVisibleDimension2 = c.Boolean(), isMandatoryProcessLine = c.Boolean(), filterProcesses = c.String(), filterProductTypes = c.String(), filterProductGroups = c.String(), filterProducts = c.String(), filterContraDocTypes = c.String(), SqlProcDocumentPrint = c.String(maxLength: 100), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.ProductionOrderSettingsId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.DocTypeId) .Index(t => t.SiteId) .Index(t => t.DivisionId); CreateTable( "Web.ProductProcesses", c => new { ProductProcessId = c.Int(nullable: false, identity: true), ProductId = c.Int(nullable: false), ProcessId = c.Int(), Dimension1Id = c.Int(), Dimension2Id = c.Int(), PurchProd = c.String(maxLength: 20), Sr = c.Int(), ProductRateGroupId = c.Int(), Instructions = c.String(maxLength: 250), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ProductProcessId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.Products", t => t.ProductId) .ForeignKey("Web.ProductRateGroups", t => t.ProductRateGroupId) .Index(t => t.ProductId) .Index(t => t.ProcessId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id) .Index(t => t.ProductRateGroupId); CreateTable( "Web.ProductShapes", c => new { ProductShapeId = c.Int(nullable: false, identity: true), ProductShapeName = c.String(nullable: false, maxLength: 50), ProductShapeShortName = c.String(), IsActive = c.Boolean(nullable: false), IsSystemDefine = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ProductShapeId) .Index(t => t.ProductShapeName, unique: true, name: "IX_ProductShape_ProductShapeName"); CreateTable( "Web.ProductSiteDetails", c => new { ProductSiteDetailId = c.Int(nullable: false, identity: true), ProductId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), MinimumOrderQty = c.Decimal(precision: 18, scale: 4), ReOrderLevel = c.Decimal(precision: 18, scale: 4), GodownId = c.Int(), BinLocation = c.String(maxLength: 20), IsActive = c.Boolean(nullable: false), LotManagement = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ProductSiteDetailId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.Godowns", t => t.GodownId) .ForeignKey("Web.Products", t => t.ProductId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.ProductId) .Index(t => t.DivisionId) .Index(t => t.SiteId) .Index(t => t.GodownId); CreateTable( "Web.ProductTags", c => new { ProductTagId = c.Int(nullable: false, identity: true), ProductId = c.Int(nullable: false), TagId = c.Int(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ProductTagId) .ForeignKey("Web.Products", t => t.ProductId) .ForeignKey("Web.Tags", t => t.TagId) .Index(t => t.ProductId) .Index(t => t.TagId); CreateTable( "Web.Tags", c => new { TagId = c.Int(nullable: false, identity: true), TagName = c.String(nullable: false, maxLength: 50), TagType = c.String(maxLength: 50), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.TagId) .Index(t => t.TagName, unique: true, name: "IX_Tag_TagName"); CreateTable( "Web.ProductUidSiteDetails", c => new { ProductUIDId = c.Int(nullable: false, identity: true), ProductUidName = c.String(), ProductUidHeaderId = c.Int(), ProductId = c.Int(nullable: false), Dimension1Id = c.Int(), Dimension2Id = c.Int(), LotNo = c.String(maxLength: 50), GenDocId = c.Int(), GenLineId = c.Int(), GenDocNo = c.String(), GenDocTypeId = c.Int(), GenDocDate = c.DateTime(), GenPersonId = c.Int(), LastTransactionDocId = c.Int(), LastTransactionLineId = c.Int(), LastTransactionDocNo = c.String(), LastTransactionDocTypeId = c.Int(), LastTransactionDocDate = c.DateTime(), LastTransactionPersonId = c.Int(), CurrenctGodownId = c.Int(), CurrenctProcessId = c.Int(), Status = c.String(maxLength: 10), ProcessesDone = c.String(), IsActive = c.Boolean(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.ProductUIDId) .ForeignKey("Web.Godowns", t => t.CurrenctGodownId) .ForeignKey("Web.Processes", t => t.CurrenctProcessId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.DocumentTypes", t => t.GenDocTypeId) .ForeignKey("Web.Buyers", t => t.GenPersonId) .ForeignKey("Web.DocumentTypes", t => t.LastTransactionDocTypeId) .ForeignKey("Web.People", t => t.LastTransactionPersonId) .ForeignKey("Web.Products", t => t.ProductId) .ForeignKey("Web.ProductUidHeaders", t => t.ProductUidHeaderId) .Index(t => t.ProductUidHeaderId) .Index(t => t.ProductId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id) .Index(t => t.GenDocTypeId) .Index(t => t.GenPersonId) .Index(t => t.LastTransactionDocTypeId) .Index(t => t.LastTransactionPersonId) .Index(t => t.CurrenctGodownId) .Index(t => t.CurrenctProcessId); CreateTable( "Web.PurchaseGoodsReceiptSettings", c => new { PurchaseGoodsReceiptSettingId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), isVisibleProductUID = c.Boolean(), isVisibleCostCenter = c.Boolean(), isMandatoryCostCenter = c.Boolean(), isVisibleDimension1 = c.Boolean(), isVisibleDimension2 = c.Boolean(), isVisibleLotNo = c.Boolean(), isPostedInStockVirtual = c.Boolean(), filterLedgerAccountGroups = c.String(), filterLedgerAccounts = c.String(), filterProductTypes = c.String(), filterProductGroups = c.String(), filterProducts = c.String(), filterContraDocTypes = c.String(), filterContraSites = c.String(), filterContraDivisions = c.String(), SqlProcDocumentPrint = c.String(maxLength: 100), SqlProcDocumentPrint_AfterSubmit = c.String(maxLength: 100), SqlProcDocumentPrint_AfterApprove = c.String(maxLength: 100), SqlProcGenProductUID = c.String(maxLength: 100), SqlProcGatePass = c.String(maxLength: 100), UnitConversionForId = c.Byte(), ImportMenuId = c.Int(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.PurchaseGoodsReceiptSettingId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Menus", t => t.ImportMenuId) .ForeignKey("Web.Sites", t => t.SiteId) .ForeignKey("Web.UnitConversionFors", t => t.UnitConversionForId) .Index(t => t.DocTypeId) .Index(t => t.SiteId) .Index(t => t.DivisionId) .Index(t => t.UnitConversionForId) .Index(t => t.ImportMenuId); CreateTable( "Web.PurchaseGoodsReturnHeaders", c => new { PurchaseGoodsReturnHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(nullable: false, maxLength: 20), ReasonId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), SupplierId = c.Int(nullable: false), Remark = c.String(nullable: false), Status = c.Int(nullable: false), GatePassHeaderId = c.Int(), StockHeaderId = c.Int(), ReviewCount = c.Int(), ReviewBy = c.String(), CreatedBy = c.String(), GodownId = c.Int(nullable: false), LockReason = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PurchaseGoodsReturnHeaderId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.GatePassHeaders", t => t.GatePassHeaderId) .ForeignKey("Web.Godowns", t => t.GodownId) .ForeignKey("Web.Reasons", t => t.ReasonId) .ForeignKey("Web.Sites", t => t.SiteId) .ForeignKey("Web.StockHeaders", t => t.StockHeaderId) .ForeignKey("Web.Suppliers", t => t.SupplierId) .Index(t => new { t.DocTypeId, t.DocNo, t.DivisionId, t.SiteId }, unique: true, name: "IX_PurchaseGoodsReturnHeader_DocID") .Index(t => t.ReasonId) .Index(t => t.SupplierId) .Index(t => t.GatePassHeaderId) .Index(t => t.StockHeaderId) .Index(t => t.GodownId); CreateTable( "Web.PurchaseGoodsReturnLines", c => new { PurchaseGoodsReturnLineId = c.Int(nullable: false, identity: true), PurchaseGoodsReturnHeaderId = c.Int(nullable: false), PurchaseGoodsReceiptLineId = c.Int(nullable: false), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), UnitConversionMultiplier = c.Decimal(nullable: false, precision: 18, scale: 4), DealUnitId = c.String(nullable: false, maxLength: 3), DealQty = c.Decimal(nullable: false, precision: 18, scale: 4), Weight = c.Decimal(precision: 18, scale: 4), Remark = c.String(), StockId = c.Int(), Sr = c.Int(), LockReason = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), ProductUidLastTransactionDocId = c.Int(), ProductUidLastTransactionDocNo = c.String(), ProductUidLastTransactionDocTypeId = c.Int(), ProductUidLastTransactionDocDate = c.DateTime(), ProductUidLastTransactionPersonId = c.Int(), ProductUidCurrentGodownId = c.Int(), ProductUidCurrentProcessId = c.Int(), ProductUidStatus = c.String(maxLength: 10), }) .PrimaryKey(t => t.PurchaseGoodsReturnLineId) .ForeignKey("Web.Units", t => t.DealUnitId) .ForeignKey("Web.Godowns", t => t.ProductUidCurrentGodownId) .ForeignKey("Web.Processes", t => t.ProductUidCurrentProcessId) .ForeignKey("Web.DocumentTypes", t => t.ProductUidLastTransactionDocTypeId) .ForeignKey("Web.People", t => t.ProductUidLastTransactionPersonId) .ForeignKey("Web.PurchaseGoodsReceiptLines", t => t.PurchaseGoodsReceiptLineId) .ForeignKey("Web.PurchaseGoodsReturnHeaders", t => t.PurchaseGoodsReturnHeaderId) .ForeignKey("Web.Stocks", t => t.StockId) .Index(t => t.PurchaseGoodsReturnHeaderId) .Index(t => t.PurchaseGoodsReceiptLineId) .Index(t => t.DealUnitId) .Index(t => t.StockId) .Index(t => t.ProductUidLastTransactionDocTypeId) .Index(t => t.ProductUidLastTransactionPersonId) .Index(t => t.ProductUidCurrentGodownId) .Index(t => t.ProductUidCurrentProcessId); CreateTable( "Web.PurchaseIndentLineStatus", c => new { PurchaseIndentLineId = c.Int(nullable: false), CancelQty = c.Decimal(precision: 18, scale: 4), CancelDealQty = c.Decimal(precision: 18, scale: 4), CancelDate = c.DateTime(), AmendmentQty = c.Decimal(precision: 18, scale: 4), AmendmentDealQty = c.Decimal(precision: 18, scale: 4), AmendmentDate = c.DateTime(), OrderQty = c.Decimal(precision: 18, scale: 4), OrderDate = c.DateTime(), ExcessPurchaseOrderReviewBy = c.String(maxLength: 100), }) .PrimaryKey(t => t.PurchaseIndentLineId) .ForeignKey("Web.PurchaseIndentLines", t => t.PurchaseIndentLineId) .Index(t => t.PurchaseIndentLineId); CreateTable( "Web.PurchaseIndentSettings", c => new { PurchaseIndentSettingId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), isVisibleCostCenter = c.Boolean(), isMandatoryCostCenter = c.Boolean(), isVisibleDimension1 = c.Boolean(), isVisibleDimension2 = c.Boolean(), filterProductTypes = c.String(), filterProductGroups = c.String(), filterProducts = c.String(), filterContraDocTypes = c.String(), filterContraSites = c.String(), filterContraDivisions = c.String(), SqlProcDocumentPrint = c.String(maxLength: 100), SqlProcDocumentPrint_AfterSubmit = c.String(maxLength: 100), SqlProcDocumentPrint_AfterApprove = c.String(maxLength: 100), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.PurchaseIndentSettingId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.DocTypeId) .Index(t => t.SiteId) .Index(t => t.DivisionId); CreateTable( "Web.PurchaseInvoiceAmendmentHeaders", c => new { PurchaseInvoiceAmendmentHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(maxLength: 10), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), SupplierId = c.Int(nullable: false), Remark = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PurchaseInvoiceAmendmentHeaderId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Sites", t => t.SiteId) .ForeignKey("Web.Suppliers", t => t.SupplierId) .Index(t => t.DocTypeId) .Index(t => t.DivisionId) .Index(t => t.SiteId) .Index(t => t.SupplierId); CreateTable( "Web.PurchaseInvoiceHeaders", c => new { PurchaseInvoiceHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(nullable: false, maxLength: 20), DivisionId = c.Int(nullable: false), LedgerHeaderId = c.Int(), ExchangeRate = c.Decimal(precision: 18, scale: 4), CurrencyId = c.Int(nullable: false), SupplierDocNo = c.String(maxLength: 20), SupplierDocDate = c.DateTime(nullable: false), CreditDays = c.Int(nullable: false), SiteId = c.Int(nullable: false), SupplierId = c.Int(nullable: false), BillingAccountId = c.Int(nullable: false), SalesTaxGroupId = c.Int(), SalesTaxGroupPartyId = c.Int(), TermsAndConditions = c.String(), UnitConversionForId = c.Byte(), PurchaseGoodsReceiptHeaderId = c.Int(), DeliveryTermsId = c.Int(), ShipMethodId = c.Int(), CalculateDiscountOnRate = c.Boolean(nullable: false), Remark = c.String(), Status = c.Int(nullable: false), ReviewCount = c.Int(), ReviewBy = c.String(), LockReason = c.String(), ReferenceDocTypeId = c.Int(), ReferenceDocId = c.Int(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PurchaseInvoiceHeaderId) .ForeignKey("Web.Suppliers", t => t.BillingAccountId) .ForeignKey("Web.Currencies", t => t.CurrencyId) .ForeignKey("Web.DeliveryTerms", t => t.DeliveryTermsId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.LedgerHeaders", t => t.LedgerHeaderId) .ForeignKey("Web.PurchaseGoodsReceiptHeaders", t => t.PurchaseGoodsReceiptHeaderId) .ForeignKey("Web.DocumentTypes", t => t.ReferenceDocTypeId) .ForeignKey("Web.ChargeGroupPersons", t => t.SalesTaxGroupId) .ForeignKey("Web.SalesTaxGroupParties", t => t.SalesTaxGroupPartyId) .ForeignKey("Web.ShipMethods", t => t.ShipMethodId) .ForeignKey("Web.Sites", t => t.SiteId) .ForeignKey("Web.Suppliers", t => t.SupplierId) .ForeignKey("Web.UnitConversionFors", t => t.UnitConversionForId) .Index(t => new { t.DocTypeId, t.DocNo, t.DivisionId, t.SiteId }, unique: true, name: "IX_PurchaseInvoiceHeader_DocID") .Index(t => t.LedgerHeaderId) .Index(t => t.CurrencyId) .Index(t => t.SupplierId) .Index(t => t.BillingAccountId) .Index(t => t.SalesTaxGroupId) .Index(t => t.SalesTaxGroupPartyId) .Index(t => t.UnitConversionForId) .Index(t => t.PurchaseGoodsReceiptHeaderId) .Index(t => t.DeliveryTermsId) .Index(t => t.ShipMethodId) .Index(t => t.ReferenceDocTypeId); CreateTable( "Web.PurchaseInvoiceLines", c => new { PurchaseInvoiceLineId = c.Int(nullable: false, identity: true), PurchaseInvoiceHeaderId = c.Int(nullable: false), PurchaseGoodsReceiptLineId = c.Int(nullable: false), SalesTaxGroupId = c.Int(), UnitConversionMultiplier = c.Decimal(nullable: false, precision: 18, scale: 4), DealUnitId = c.String(nullable: false, maxLength: 3), DealQty = c.Decimal(nullable: false, precision: 18, scale: 4), DocQty = c.Decimal(nullable: false, precision: 18, scale: 4), DiscountPer = c.Decimal(precision: 18, scale: 4), Rate = c.Decimal(nullable: false, precision: 18, scale: 4), Amount = c.Decimal(nullable: false, precision: 18, scale: 4), Remark = c.String(), LockReason = c.String(), ReferenceDocTypeId = c.Int(), ReferenceDocLineId = c.Int(), Sr = c.Int(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PurchaseInvoiceLineId) .ForeignKey("Web.Units", t => t.DealUnitId) .ForeignKey("Web.PurchaseGoodsReceiptLines", t => t.PurchaseGoodsReceiptLineId) .ForeignKey("Web.PurchaseInvoiceHeaders", t => t.PurchaseInvoiceHeaderId) .ForeignKey("Web.DocumentTypes", t => t.ReferenceDocTypeId) .ForeignKey("Web.SalesTaxGroups", t => t.SalesTaxGroupId) .Index(t => t.PurchaseInvoiceHeaderId) .Index(t => t.PurchaseGoodsReceiptLineId) .Index(t => t.SalesTaxGroupId) .Index(t => t.DealUnitId) .Index(t => t.ReferenceDocTypeId); CreateTable( "Web.PurchaseInvoiceHeaderCharges", c => new { Id = c.Int(nullable: false, identity: true), HeaderTableId = c.Int(nullable: false), Sr = c.Int(nullable: false), ChargeId = c.Int(nullable: false), AddDeduct = c.Int(), AffectCost = c.Boolean(nullable: false), ChargeTypeId = c.Int(), ProductChargeId = c.Int(), CalculateOnId = c.Int(), PersonID = c.Int(), LedgerAccountDrId = c.Int(), LedgerAccountCrId = c.Int(), ContraLedgerAccountId = c.Int(), CostCenterId = c.Int(), RateType = c.Byte(nullable: false), IncludedInBase = c.Boolean(nullable: false), ParentChargeId = c.Int(), Rate = c.Decimal(precision: 18, scale: 4), Amount = c.Decimal(precision: 18, scale: 4), IsVisible = c.Boolean(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.Id) .ForeignKey("Web.Charges", t => t.CalculateOnId) .ForeignKey("Web.Charges", t => t.ChargeId) .ForeignKey("Web.ChargeTypes", t => t.ChargeTypeId) .ForeignKey("Web.LedgerAccounts", t => t.ContraLedgerAccountId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountCrId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountDrId) .ForeignKey("Web.Charges", t => t.ParentChargeId) .ForeignKey("Web.People", t => t.PersonID) .ForeignKey("Web.Charges", t => t.ProductChargeId) .ForeignKey("Web.PurchaseInvoiceHeaders", t => t.HeaderTableId) .Index(t => t.HeaderTableId) .Index(t => t.ChargeId) .Index(t => t.ChargeTypeId) .Index(t => t.ProductChargeId) .Index(t => t.CalculateOnId) .Index(t => t.PersonID) .Index(t => t.LedgerAccountDrId) .Index(t => t.LedgerAccountCrId) .Index(t => t.ContraLedgerAccountId) .Index(t => t.CostCenterId) .Index(t => t.ParentChargeId); CreateTable( "Web.PurchaseInvoiceLineCharges", c => new { Id = c.Int(nullable: false, identity: true), LineTableId = c.Int(nullable: false), HeaderTableId = c.Int(nullable: false), Sr = c.Int(nullable: false), ChargeId = c.Int(nullable: false), AddDeduct = c.Int(), AffectCost = c.Boolean(nullable: false), ChargeTypeId = c.Int(), CalculateOnId = c.Int(), PersonID = c.Int(), LedgerAccountDrId = c.Int(), LedgerAccountCrId = c.Int(), ContraLedgerAccountId = c.Int(), CostCenterId = c.Int(), RateType = c.Byte(nullable: false), IncludedInBase = c.Boolean(nullable: false), ParentChargeId = c.Int(), Rate = c.Decimal(precision: 18, scale: 4), Amount = c.Decimal(precision: 18, scale: 4), DealQty = c.Decimal(precision: 18, scale: 4), IsVisible = c.Boolean(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.Id) .ForeignKey("Web.Charges", t => t.CalculateOnId) .ForeignKey("Web.Charges", t => t.ChargeId) .ForeignKey("Web.ChargeTypes", t => t.ChargeTypeId) .ForeignKey("Web.LedgerAccounts", t => t.ContraLedgerAccountId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountCrId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountDrId) .ForeignKey("Web.Charges", t => t.ParentChargeId) .ForeignKey("Web.People", t => t.PersonID) .ForeignKey("Web.PurchaseInvoiceLines", t => t.LineTableId) .Index(t => t.LineTableId) .Index(t => t.ChargeId) .Index(t => t.ChargeTypeId) .Index(t => t.CalculateOnId) .Index(t => t.PersonID) .Index(t => t.LedgerAccountDrId) .Index(t => t.LedgerAccountCrId) .Index(t => t.ContraLedgerAccountId) .Index(t => t.CostCenterId) .Index(t => t.ParentChargeId); CreateTable( "Web.PurchaseInvoiceRateAmendmentLines", c => new { PurchaseInvoiceRateAmendmentLineId = c.Int(nullable: false, identity: true), PurchaseInvoiceAmendmentHeaderId = c.Int(nullable: false), PurchaseInvoiceLineId = c.Int(nullable: false), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), Rate = c.Decimal(nullable: false, precision: 18, scale: 4), Amount = c.Decimal(nullable: false, precision: 18, scale: 4), Remark = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PurchaseInvoiceRateAmendmentLineId) .ForeignKey("Web.PurchaseInvoiceAmendmentHeaders", t => t.PurchaseInvoiceAmendmentHeaderId) .ForeignKey("Web.PurchaseInvoiceLines", t => t.PurchaseInvoiceLineId) .Index(t => t.PurchaseInvoiceAmendmentHeaderId) .Index(t => t.PurchaseInvoiceLineId); CreateTable( "Web.PurchaseInvoiceReturnHeaders", c => new { PurchaseInvoiceReturnHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(nullable: false, maxLength: 20), ReasonId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), LedgerHeaderId = c.Int(), ExchangeRate = c.Decimal(precision: 18, scale: 4), SupplierId = c.Int(nullable: false), CalculateDiscountOnRate = c.Boolean(nullable: false), SalesTaxGroupId = c.Int(), SalesTaxGroupPartyId = c.Int(), CurrencyId = c.Int(nullable: false), PurchaseGoodsReturnHeaderId = c.Int(), Remark = c.String(nullable: false), Status = c.Int(nullable: false), ReviewCount = c.Int(), ReviewBy = c.String(), LockReason = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PurchaseInvoiceReturnHeaderId) .ForeignKey("Web.Currencies", t => t.CurrencyId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.LedgerHeaders", t => t.LedgerHeaderId) .ForeignKey("Web.PurchaseGoodsReturnHeaders", t => t.PurchaseGoodsReturnHeaderId) .ForeignKey("Web.Reasons", t => t.ReasonId) .ForeignKey("Web.ChargeGroupPersons", t => t.SalesTaxGroupId) .ForeignKey("Web.SalesTaxGroupParties", t => t.SalesTaxGroupPartyId) .ForeignKey("Web.Sites", t => t.SiteId) .ForeignKey("Web.Suppliers", t => t.SupplierId) .Index(t => new { t.DocTypeId, t.DocNo, t.DivisionId, t.SiteId }, unique: true, name: "IX_PurchaseInvoiceReturnHeader_DocID") .Index(t => t.ReasonId) .Index(t => t.LedgerHeaderId) .Index(t => t.SupplierId) .Index(t => t.SalesTaxGroupId) .Index(t => t.SalesTaxGroupPartyId) .Index(t => t.CurrencyId) .Index(t => t.PurchaseGoodsReturnHeaderId); CreateTable( "Web.PurchaseInvoiceReturnHeaderCharges", c => new { Id = c.Int(nullable: false, identity: true), HeaderTableId = c.Int(nullable: false), Sr = c.Int(nullable: false), ChargeId = c.Int(nullable: false), AddDeduct = c.Int(), AffectCost = c.Boolean(nullable: false), ChargeTypeId = c.Int(), ProductChargeId = c.Int(), CalculateOnId = c.Int(), PersonID = c.Int(), LedgerAccountDrId = c.Int(), LedgerAccountCrId = c.Int(), ContraLedgerAccountId = c.Int(), CostCenterId = c.Int(), RateType = c.Byte(nullable: false), IncludedInBase = c.Boolean(nullable: false), ParentChargeId = c.Int(), Rate = c.Decimal(precision: 18, scale: 4), Amount = c.Decimal(precision: 18, scale: 4), IsVisible = c.Boolean(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.Id) .ForeignKey("Web.Charges", t => t.CalculateOnId) .ForeignKey("Web.Charges", t => t.ChargeId) .ForeignKey("Web.ChargeTypes", t => t.ChargeTypeId) .ForeignKey("Web.LedgerAccounts", t => t.ContraLedgerAccountId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountCrId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountDrId) .ForeignKey("Web.Charges", t => t.ParentChargeId) .ForeignKey("Web.People", t => t.PersonID) .ForeignKey("Web.Charges", t => t.ProductChargeId) .ForeignKey("Web.PurchaseInvoiceReturnHeaders", t => t.HeaderTableId) .Index(t => t.HeaderTableId) .Index(t => t.ChargeId) .Index(t => t.ChargeTypeId) .Index(t => t.ProductChargeId) .Index(t => t.CalculateOnId) .Index(t => t.PersonID) .Index(t => t.LedgerAccountDrId) .Index(t => t.LedgerAccountCrId) .Index(t => t.ContraLedgerAccountId) .Index(t => t.CostCenterId) .Index(t => t.ParentChargeId); CreateTable( "Web.PurchaseInvoiceReturnLines", c => new { PurchaseInvoiceReturnLineId = c.Int(nullable: false, identity: true), PurchaseInvoiceReturnHeaderId = c.Int(nullable: false), PurchaseInvoiceLineId = c.Int(nullable: false), PurchaseGoodsReturnLineId = c.Int(), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), UnitConversionMultiplier = c.Decimal(nullable: false, precision: 18, scale: 4), DealUnitId = c.String(nullable: false, maxLength: 3), DealQty = c.Decimal(nullable: false, precision: 18, scale: 4), Rate = c.Decimal(nullable: false, precision: 18, scale: 4), DiscountPer = c.Decimal(precision: 18, scale: 4), Amount = c.Decimal(nullable: false, precision: 18, scale: 4), Remark = c.String(), Sr = c.Int(), LockReason = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PurchaseInvoiceReturnLineId) .ForeignKey("Web.Units", t => t.DealUnitId) .ForeignKey("Web.PurchaseGoodsReturnLines", t => t.PurchaseGoodsReturnLineId) .ForeignKey("Web.PurchaseInvoiceLines", t => t.PurchaseInvoiceLineId) .ForeignKey("Web.PurchaseInvoiceReturnHeaders", t => t.PurchaseInvoiceReturnHeaderId) .Index(t => t.PurchaseInvoiceReturnHeaderId) .Index(t => t.PurchaseInvoiceLineId) .Index(t => t.PurchaseGoodsReturnLineId) .Index(t => t.DealUnitId); CreateTable( "Web.PurchaseInvoiceReturnLineCharges", c => new { Id = c.Int(nullable: false, identity: true), LineTableId = c.Int(nullable: false), HeaderTableId = c.Int(nullable: false), Sr = c.Int(nullable: false), ChargeId = c.Int(nullable: false), AddDeduct = c.Int(), AffectCost = c.Boolean(nullable: false), ChargeTypeId = c.Int(), CalculateOnId = c.Int(), PersonID = c.Int(), LedgerAccountDrId = c.Int(), LedgerAccountCrId = c.Int(), ContraLedgerAccountId = c.Int(), CostCenterId = c.Int(), RateType = c.Byte(nullable: false), IncludedInBase = c.Boolean(nullable: false), ParentChargeId = c.Int(), Rate = c.Decimal(precision: 18, scale: 4), Amount = c.Decimal(precision: 18, scale: 4), DealQty = c.Decimal(precision: 18, scale: 4), IsVisible = c.Boolean(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.Id) .ForeignKey("Web.Charges", t => t.CalculateOnId) .ForeignKey("Web.Charges", t => t.ChargeId) .ForeignKey("Web.ChargeTypes", t => t.ChargeTypeId) .ForeignKey("Web.LedgerAccounts", t => t.ContraLedgerAccountId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountCrId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountDrId) .ForeignKey("Web.Charges", t => t.ParentChargeId) .ForeignKey("Web.People", t => t.PersonID) .ForeignKey("Web.PurchaseInvoiceReturnLines", t => t.LineTableId) .Index(t => t.LineTableId) .Index(t => t.ChargeId) .Index(t => t.ChargeTypeId) .Index(t => t.CalculateOnId) .Index(t => t.PersonID) .Index(t => t.LedgerAccountDrId) .Index(t => t.LedgerAccountCrId) .Index(t => t.ContraLedgerAccountId) .Index(t => t.CostCenterId) .Index(t => t.ParentChargeId); CreateTable( "Web.PurchaseInvoiceSettings", c => new { PurchaseInvoiceSettingId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), isVisibleCostCenter = c.Boolean(), isMandatoryCostCenter = c.Boolean(), isVisibleDimension1 = c.Boolean(), isVisibleDimension2 = c.Boolean(), isMandatoryRate = c.Boolean(), isEditableRate = c.Boolean(), isVisibleLotNo = c.Boolean(), CalculateDiscountOnRate = c.Boolean(nullable: false), filterLedgerAccountGroups = c.String(), filterLedgerAccounts = c.String(), filterProductTypes = c.String(), filterProductGroups = c.String(), filterProducts = c.String(), filterContraDocTypes = c.String(), filterContraSites = c.String(), filterContraDivisions = c.String(), DocTypeGoodsReturnId = c.Int(), PurchaseGoodsReceiptDocTypeId = c.Int(), CalculationId = c.Int(nullable: false), SqlProcDocumentPrint = c.String(maxLength: 100), SqlProcDocumentPrint_AfterSubmit = c.String(maxLength: 100), SqlProcDocumentPrint_AfterApprove = c.String(maxLength: 100), SqlProcGatePass = c.String(maxLength: 100), UnitConversionForId = c.Byte(), ImportMenuId = c.Int(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.PurchaseInvoiceSettingId) .ForeignKey("Web.Calculations", t => t.CalculationId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeGoodsReturnId) .ForeignKey("Web.Menus", t => t.ImportMenuId) .ForeignKey("Web.DocumentTypes", t => t.PurchaseGoodsReceiptDocTypeId) .ForeignKey("Web.Sites", t => t.SiteId) .ForeignKey("Web.UnitConversionFors", t => t.UnitConversionForId) .Index(t => t.DocTypeId) .Index(t => t.SiteId) .Index(t => t.DivisionId) .Index(t => t.DocTypeGoodsReturnId) .Index(t => t.PurchaseGoodsReceiptDocTypeId) .Index(t => t.CalculationId) .Index(t => t.UnitConversionForId) .Index(t => t.ImportMenuId); CreateTable( "Web.PurchaseOrderAmendmentHeaders", c => new { PurchaseOrderAmendmentHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(maxLength: 10), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), SupplierId = c.Int(nullable: false), Remark = c.String(), Status = c.Int(nullable: false), ReviewCount = c.Int(), ReviewBy = c.String(), LockReason = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PurchaseOrderAmendmentHeaderId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Sites", t => t.SiteId) .ForeignKey("Web.Suppliers", t => t.SupplierId) .Index(t => t.DocTypeId) .Index(t => t.DivisionId) .Index(t => t.SiteId) .Index(t => t.SupplierId); CreateTable( "Web.PurchaseOrderAmendmentHeaderCharges", c => new { Id = c.Int(nullable: false, identity: true), HeaderTableId = c.Int(nullable: false), Sr = c.Int(nullable: false), ChargeId = c.Int(nullable: false), AddDeduct = c.Int(), AffectCost = c.Boolean(nullable: false), ChargeTypeId = c.Int(), ProductChargeId = c.Int(), CalculateOnId = c.Int(), PersonID = c.Int(), LedgerAccountDrId = c.Int(), LedgerAccountCrId = c.Int(), ContraLedgerAccountId = c.Int(), CostCenterId = c.Int(), RateType = c.Byte(nullable: false), IncludedInBase = c.Boolean(nullable: false), ParentChargeId = c.Int(), Rate = c.Decimal(precision: 18, scale: 4), Amount = c.Decimal(precision: 18, scale: 4), IsVisible = c.Boolean(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.Id) .ForeignKey("Web.Charges", t => t.CalculateOnId) .ForeignKey("Web.Charges", t => t.ChargeId) .ForeignKey("Web.ChargeTypes", t => t.ChargeTypeId) .ForeignKey("Web.LedgerAccounts", t => t.ContraLedgerAccountId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountCrId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountDrId) .ForeignKey("Web.Charges", t => t.ParentChargeId) .ForeignKey("Web.People", t => t.PersonID) .ForeignKey("Web.Charges", t => t.ProductChargeId) .ForeignKey("Web.PurchaseOrderAmendmentHeaders", t => t.HeaderTableId) .Index(t => t.HeaderTableId) .Index(t => t.ChargeId) .Index(t => t.ChargeTypeId) .Index(t => t.ProductChargeId) .Index(t => t.CalculateOnId) .Index(t => t.PersonID) .Index(t => t.LedgerAccountDrId) .Index(t => t.LedgerAccountCrId) .Index(t => t.ContraLedgerAccountId) .Index(t => t.CostCenterId) .Index(t => t.ParentChargeId); CreateTable( "Web.PurchaseOrderHeaderCharges", c => new { Id = c.Int(nullable: false, identity: true), HeaderTableId = c.Int(nullable: false), Sr = c.Int(nullable: false), ChargeId = c.Int(nullable: false), AddDeduct = c.Int(), AffectCost = c.Boolean(nullable: false), ChargeTypeId = c.Int(), ProductChargeId = c.Int(), CalculateOnId = c.Int(), PersonID = c.Int(), LedgerAccountDrId = c.Int(), LedgerAccountCrId = c.Int(), ContraLedgerAccountId = c.Int(), CostCenterId = c.Int(), RateType = c.Byte(nullable: false), IncludedInBase = c.Boolean(nullable: false), ParentChargeId = c.Int(), Rate = c.Decimal(precision: 18, scale: 4), Amount = c.Decimal(precision: 18, scale: 4), IsVisible = c.Boolean(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.Id) .ForeignKey("Web.Charges", t => t.CalculateOnId) .ForeignKey("Web.Charges", t => t.ChargeId) .ForeignKey("Web.ChargeTypes", t => t.ChargeTypeId) .ForeignKey("Web.LedgerAccounts", t => t.ContraLedgerAccountId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountCrId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountDrId) .ForeignKey("Web.Charges", t => t.ParentChargeId) .ForeignKey("Web.People", t => t.PersonID) .ForeignKey("Web.Charges", t => t.ProductChargeId) .ForeignKey("Web.PurchaseOrderHeaders", t => t.HeaderTableId) .Index(t => t.HeaderTableId) .Index(t => t.ChargeId) .Index(t => t.ChargeTypeId) .Index(t => t.ProductChargeId) .Index(t => t.CalculateOnId) .Index(t => t.PersonID) .Index(t => t.LedgerAccountDrId) .Index(t => t.LedgerAccountCrId) .Index(t => t.ContraLedgerAccountId) .Index(t => t.CostCenterId) .Index(t => t.ParentChargeId); CreateTable( "Web.PurchaseOrderHeaderStatus", c => new { PurchaseOrderHeaderId = c.Int(nullable: false), BOMQty = c.Decimal(precision: 18, scale: 4), IsTimeIncentiveProcessed = c.Boolean(nullable: false), }) .PrimaryKey(t => t.PurchaseOrderHeaderId) .ForeignKey("Web.PurchaseOrderHeaders", t => t.PurchaseOrderHeaderId) .Index(t => t.PurchaseOrderHeaderId); CreateTable( "Web.PurchaseOrderInspectionHeaders", c => new { PurchaseOrderInspectionHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(nullable: false, maxLength: 20), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), ProcessId = c.Int(nullable: false), SupplierId = c.Int(nullable: false), InspectionById = c.Int(nullable: false), Remark = c.String(), ReferenceDocTypeId = c.Int(), ReferenceDocId = c.Int(), Status = c.Int(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), LockReason = c.String(), ReviewCount = c.Int(), ReviewBy = c.String(), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PurchaseOrderInspectionHeaderId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Employees", t => t.InspectionById) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.DocumentTypes", t => t.ReferenceDocTypeId) .ForeignKey("Web.Sites", t => t.SiteId) .ForeignKey("Web.Suppliers", t => t.SupplierId) .Index(t => new { t.DocTypeId, t.DocNo, t.DivisionId, t.SiteId }, unique: true, name: "IX_PurchaseOrderInspectionHeader_DocID") .Index(t => t.ProcessId) .Index(t => t.SupplierId) .Index(t => t.InspectionById) .Index(t => t.ReferenceDocTypeId); CreateTable( "Web.PurchaseOrderInspectionLines", c => new { PurchaseOrderInspectionLineId = c.Int(nullable: false, identity: true), PurchaseOrderInspectionHeaderId = c.Int(nullable: false), ProductUidId = c.Int(), PurchaseOrderInspectionRequestLineId = c.Int(), PurchaseOrderLineId = c.Int(nullable: false), InspectedQty = c.Decimal(nullable: false, precision: 18, scale: 4), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), Marks = c.Decimal(nullable: false, precision: 18, scale: 4), Remark = c.String(), ImageFolderName = c.String(maxLength: 100), ImageFileName = c.String(maxLength: 100), ReferenceDocTypeId = c.Int(), ReferenceDocLineId = c.Int(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), LockReason = c.String(), Sr = c.Int(), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PurchaseOrderInspectionLineId) .ForeignKey("Web.ProductUids", t => t.ProductUidId) .ForeignKey("Web.PurchaseOrderInspectionHeaders", t => t.PurchaseOrderInspectionHeaderId) .ForeignKey("Web.PurchaseOrderInspectionRequestLines", t => t.PurchaseOrderInspectionRequestLineId) .ForeignKey("Web.PurchaseOrderLines", t => t.PurchaseOrderLineId) .ForeignKey("Web.DocumentTypes", t => t.ReferenceDocTypeId) .Index(t => t.PurchaseOrderInspectionHeaderId) .Index(t => t.ProductUidId) .Index(t => t.PurchaseOrderInspectionRequestLineId) .Index(t => t.PurchaseOrderLineId) .Index(t => t.ReferenceDocTypeId); CreateTable( "Web.PurchaseOrderInspectionRequestLines", c => new { PurchaseOrderInspectionRequestLineId = c.Int(nullable: false, identity: true), PurchaseOrderInspectionRequestHeaderId = c.Int(nullable: false), ProductUidId = c.Int(), PurchaseOrderLineId = c.Int(nullable: false), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), Remark = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), LockReason = c.String(), Sr = c.Int(), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PurchaseOrderInspectionRequestLineId) .ForeignKey("Web.ProductUids", t => t.ProductUidId) .ForeignKey("Web.PurchaseOrderInspectionRequestHeaders", t => t.PurchaseOrderInspectionRequestHeaderId) .ForeignKey("Web.PurchaseOrderLines", t => t.PurchaseOrderLineId) .Index(t => t.PurchaseOrderInspectionRequestHeaderId) .Index(t => t.ProductUidId) .Index(t => t.PurchaseOrderLineId); CreateTable( "Web.PurchaseOrderInspectionRequestHeaders", c => new { PurchaseOrderInspectionRequestHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(maxLength: 10), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), ProcessId = c.Int(nullable: false), SupplierId = c.Int(nullable: false), RequestBy = c.String(maxLength: 10), AcceptedYn = c.Boolean(nullable: false), Status = c.Int(nullable: false), Remark = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), LockReason = c.String(), OMSId = c.String(maxLength: 50), ReviewCount = c.Int(), ReviewBy = c.String(), }) .PrimaryKey(t => t.PurchaseOrderInspectionRequestHeaderId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.Sites", t => t.SiteId) .ForeignKey("Web.Suppliers", t => t.SupplierId) .Index(t => t.DocTypeId) .Index(t => t.DivisionId) .Index(t => t.SiteId) .Index(t => t.ProcessId) .Index(t => t.SupplierId); CreateTable( "Web.PurchaseOrderInspectionRequestCancelHeaders", c => new { PurchaseOrderInspectionRequestCancelHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(maxLength: 10), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), ProcessId = c.Int(nullable: false), SupplierId = c.Int(nullable: false), ReasonId = c.Int(nullable: false), RequestBy = c.String(maxLength: 10), Status = c.Int(nullable: false), Remark = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), LockReason = c.String(), OMSId = c.String(maxLength: 50), ReviewCount = c.Int(), ReviewBy = c.String(), }) .PrimaryKey(t => t.PurchaseOrderInspectionRequestCancelHeaderId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.Reasons", t => t.ReasonId) .ForeignKey("Web.Sites", t => t.SiteId) .ForeignKey("Web.Suppliers", t => t.SupplierId) .Index(t => t.DocTypeId) .Index(t => t.DivisionId) .Index(t => t.SiteId) .Index(t => t.ProcessId) .Index(t => t.SupplierId) .Index(t => t.ReasonId); CreateTable( "Web.PurchaseOrderInspectionRequestCancelLines", c => new { PurchaseOrderInspectionRequestCancelLineId = c.Int(nullable: false, identity: true), PurchaseOrderInspectionRequestCancelHeaderId = c.Int(nullable: false), Sr = c.Int(), ProductUidId = c.Int(), PurchaseOrderInspectionRequestLineId = c.Int(nullable: false), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), Remark = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), LockReason = c.String(), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PurchaseOrderInspectionRequestCancelLineId) .ForeignKey("Web.ProductUids", t => t.ProductUidId) .ForeignKey("Web.PurchaseOrderInspectionRequestCancelHeaders", t => t.PurchaseOrderInspectionRequestCancelHeaderId) .ForeignKey("Web.PurchaseOrderInspectionRequestLines", t => t.PurchaseOrderInspectionRequestLineId) .Index(t => t.PurchaseOrderInspectionRequestCancelHeaderId) .Index(t => t.ProductUidId) .Index(t => t.PurchaseOrderInspectionRequestLineId); CreateTable( "Web.PurchaseOrderInspectionRequestSettings", c => new { PurchaseOrderInspectionRequestSettingsId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), ImportMenuId = c.Int(), isVisibleProductUID = c.Boolean(), isMandatoryProductUID = c.Boolean(), isVisibleDimension1 = c.Boolean(), isVisibleDimension2 = c.Boolean(), filterContraDocTypes = c.String(), filterContraSites = c.String(), filterContraDivisions = c.String(), ProcessId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PurchaseOrderInspectionRequestSettingsId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Menus", t => t.ImportMenuId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.DocTypeId) .Index(t => t.ImportMenuId) .Index(t => t.ProcessId) .Index(t => t.SiteId) .Index(t => t.DivisionId); CreateTable( "Web.PurchaseOrderInspectionSettings", c => new { PurchaseOrderInspectionSettingsId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), ImportMenuId = c.Int(), isVisibleProductUID = c.Boolean(), isMandatoryProductUID = c.Boolean(), isVisibleDimension1 = c.Boolean(), isVisibleDimension2 = c.Boolean(), filterContraDocTypes = c.String(), filterContraSites = c.String(), filterContraDivisions = c.String(), ProcessId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PurchaseOrderInspectionSettingsId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Menus", t => t.ImportMenuId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.DocTypeId) .Index(t => t.ImportMenuId) .Index(t => t.ProcessId) .Index(t => t.SiteId) .Index(t => t.DivisionId); CreateTable( "Web.PurchaseOrderLineCharges", c => new { Id = c.Int(nullable: false, identity: true), LineTableId = c.Int(nullable: false), HeaderTableId = c.Int(nullable: false), Sr = c.Int(nullable: false), ChargeId = c.Int(nullable: false), AddDeduct = c.Int(), AffectCost = c.Boolean(nullable: false), ChargeTypeId = c.Int(), CalculateOnId = c.Int(), PersonID = c.Int(), LedgerAccountDrId = c.Int(), LedgerAccountCrId = c.Int(), ContraLedgerAccountId = c.Int(), CostCenterId = c.Int(), RateType = c.Byte(nullable: false), IncludedInBase = c.Boolean(nullable: false), ParentChargeId = c.Int(), Rate = c.Decimal(precision: 18, scale: 4), Amount = c.Decimal(precision: 18, scale: 4), DealQty = c.Decimal(precision: 18, scale: 4), IsVisible = c.Boolean(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.Id) .ForeignKey("Web.Charges", t => t.CalculateOnId) .ForeignKey("Web.Charges", t => t.ChargeId) .ForeignKey("Web.ChargeTypes", t => t.ChargeTypeId) .ForeignKey("Web.LedgerAccounts", t => t.ContraLedgerAccountId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountCrId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountDrId) .ForeignKey("Web.Charges", t => t.ParentChargeId) .ForeignKey("Web.People", t => t.PersonID) .ForeignKey("Web.PurchaseOrderLines", t => t.LineTableId) .Index(t => t.LineTableId) .Index(t => t.ChargeId) .Index(t => t.ChargeTypeId) .Index(t => t.CalculateOnId) .Index(t => t.PersonID) .Index(t => t.LedgerAccountDrId) .Index(t => t.LedgerAccountCrId) .Index(t => t.ContraLedgerAccountId) .Index(t => t.CostCenterId) .Index(t => t.ParentChargeId); CreateTable( "Web.PurchaseOrderLineStatus", c => new { PurchaseOrderLineId = c.Int(nullable: false), CancelQty = c.Decimal(precision: 18, scale: 4), CancelDate = c.DateTime(), AmendmentQty = c.Decimal(precision: 18, scale: 4), AmendmentDate = c.DateTime(), ReceiveQty = c.Decimal(precision: 18, scale: 4), ReceiveDate = c.DateTime(), InvoiceQty = c.Decimal(precision: 18, scale: 4), InvoiceDate = c.DateTime(), PaymentQty = c.Decimal(precision: 18, scale: 4), PaymentDate = c.DateTime(), ReturnQty = c.Decimal(precision: 18, scale: 4), ReturnDate = c.DateTime(), RateAmendmentRate = c.Decimal(precision: 18, scale: 4), RateAmendmentDate = c.DateTime(), ExcessGoodsReceiptReviewBy = c.String(maxLength: 100), }) .PrimaryKey(t => t.PurchaseOrderLineId) .ForeignKey("Web.PurchaseOrderLines", t => t.PurchaseOrderLineId) .Index(t => t.PurchaseOrderLineId); CreateTable( "Web.PurchaseOrderQtyAmendmentLines", c => new { PurchaseOrderQtyAmendmentLineId = c.Int(nullable: false, identity: true), PurchaseOrderAmendmentHeaderId = c.Int(nullable: false), PurchaseOrderLineId = c.Int(nullable: false), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), Remark = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PurchaseOrderQtyAmendmentLineId) .ForeignKey("Web.PurchaseOrderAmendmentHeaders", t => t.PurchaseOrderAmendmentHeaderId) .ForeignKey("Web.PurchaseOrderLines", t => t.PurchaseOrderLineId) .Index(t => t.PurchaseOrderAmendmentHeaderId) .Index(t => t.PurchaseOrderLineId); CreateTable( "Web.PurchaseOrderRateAmendmentLines", c => new { PurchaseOrderRateAmendmentLineId = c.Int(nullable: false, identity: true), PurchaseOrderAmendmentHeaderId = c.Int(nullable: false), PurchaseOrderLineId = c.Int(nullable: false), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), PurchaseOrderRate = c.Decimal(nullable: false, precision: 18, scale: 4), AmendedRate = c.Decimal(nullable: false, precision: 18, scale: 4), Rate = c.Decimal(nullable: false, precision: 18, scale: 4), Amount = c.Decimal(nullable: false, precision: 18, scale: 4), Remark = c.String(), LockReason = c.String(), Sr = c.Int(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PurchaseOrderRateAmendmentLineId) .ForeignKey("Web.PurchaseOrderAmendmentHeaders", t => t.PurchaseOrderAmendmentHeaderId) .ForeignKey("Web.PurchaseOrderLines", t => t.PurchaseOrderLineId) .Index(t => t.PurchaseOrderAmendmentHeaderId) .Index(t => t.PurchaseOrderLineId); CreateTable( "Web.PurchaseOrderRateAmendmentLineCharges", c => new { Id = c.Int(nullable: false, identity: true), LineTableId = c.Int(nullable: false), HeaderTableId = c.Int(nullable: false), Sr = c.Int(nullable: false), ChargeId = c.Int(nullable: false), AddDeduct = c.Int(), AffectCost = c.Boolean(nullable: false), ChargeTypeId = c.Int(), CalculateOnId = c.Int(), PersonID = c.Int(), LedgerAccountDrId = c.Int(), LedgerAccountCrId = c.Int(), ContraLedgerAccountId = c.Int(), CostCenterId = c.Int(), RateType = c.Byte(nullable: false), IncludedInBase = c.Boolean(nullable: false), ParentChargeId = c.Int(), Rate = c.Decimal(precision: 18, scale: 4), Amount = c.Decimal(precision: 18, scale: 4), DealQty = c.Decimal(precision: 18, scale: 4), IsVisible = c.Boolean(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.Id) .ForeignKey("Web.Charges", t => t.CalculateOnId) .ForeignKey("Web.Charges", t => t.ChargeId) .ForeignKey("Web.ChargeTypes", t => t.ChargeTypeId) .ForeignKey("Web.LedgerAccounts", t => t.ContraLedgerAccountId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountCrId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountDrId) .ForeignKey("Web.Charges", t => t.ParentChargeId) .ForeignKey("Web.People", t => t.PersonID) .ForeignKey("Web.PurchaseOrderRateAmendmentLines", t => t.LineTableId) .Index(t => t.LineTableId) .Index(t => t.ChargeId) .Index(t => t.ChargeTypeId) .Index(t => t.CalculateOnId) .Index(t => t.PersonID) .Index(t => t.LedgerAccountDrId) .Index(t => t.LedgerAccountCrId) .Index(t => t.ContraLedgerAccountId) .Index(t => t.CostCenterId) .Index(t => t.ParentChargeId); CreateTable( "Web.PurchaseOrderSettings", c => new { PurchaseOrderSettingId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), isVisibleCostCenter = c.Boolean(), isMandatoryCostCenter = c.Boolean(), isVisibleDimension1 = c.Boolean(), isVisibleDimension2 = c.Boolean(), isMandatoryRate = c.Boolean(), isAllowedWithoutQuotation = c.Boolean(), isEditableRate = c.Boolean(), isVisibleLotNo = c.Boolean(), CalculateDiscountOnRate = c.Boolean(nullable: false), isPostedInStockVirtual = c.Boolean(), filterLedgerAccountGroups = c.String(), filterLedgerAccounts = c.String(), filterProductTypes = c.String(), filterProductGroups = c.String(), filterProducts = c.String(), filterContraDocTypes = c.String(), filterContraSites = c.String(), filterContraDivisions = c.String(), CalculationId = c.Int(), SqlProcDocumentPrint = c.String(maxLength: 100), SqlProcDocumentPrint_AfterSubmit = c.String(maxLength: 100), SqlProcDocumentPrint_AfterApprove = c.String(maxLength: 100), SqlProcGenProductUID = c.String(maxLength: 100), UnitConversionForId = c.Byte(), TermsAndConditions = c.String(), OnSubmitMenuId = c.Int(), OnApproveMenuId = c.Int(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.PurchaseOrderSettingId) .ForeignKey("Web.Calculations", t => t.CalculationId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Menus", t => t.OnApproveMenuId) .ForeignKey("Web.Menus", t => t.OnSubmitMenuId) .ForeignKey("Web.Sites", t => t.SiteId) .ForeignKey("Web.UnitConversionFors", t => t.UnitConversionForId) .Index(t => t.DocTypeId) .Index(t => t.SiteId) .Index(t => t.DivisionId) .Index(t => t.CalculationId) .Index(t => t.UnitConversionForId) .Index(t => t.OnSubmitMenuId) .Index(t => t.OnApproveMenuId); CreateTable( "Web.PurchaseQuotationHeaders", c => new { PurchaseQuotationHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(nullable: false, maxLength: 20), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), SupplierId = c.Int(nullable: false), BillingAccountId = c.Int(nullable: false), CurrencyId = c.Int(), VendorQuotationNo = c.String(nullable: false, maxLength: 20), VendorQuotationDate = c.DateTime(nullable: false), TermsAndConditions = c.String(), ExchangeRate = c.Decimal(precision: 18, scale: 4), CreditDays = c.Int(nullable: false), SalesTaxGroupId = c.Int(), UnitConversionForId = c.Byte(), DeliveryTermsId = c.Int(), ShipMethodId = c.Int(), CalculateDiscountOnRate = c.Boolean(nullable: false), Remark = c.String(), Status = c.Int(nullable: false), LockReason = c.String(), CreatedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedBy = c.String(), ModifiedDate = c.DateTime(nullable: false), ReviewCount = c.Int(), ReviewBy = c.String(), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PurchaseQuotationHeaderId) .ForeignKey("Web.Suppliers", t => t.BillingAccountId) .ForeignKey("Web.Currencies", t => t.CurrencyId) .ForeignKey("Web.DeliveryTerms", t => t.DeliveryTermsId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.ChargeGroupPersons", t => t.SalesTaxGroupId) .ForeignKey("Web.ShipMethods", t => t.ShipMethodId) .ForeignKey("Web.Sites", t => t.SiteId) .ForeignKey("Web.Suppliers", t => t.SupplierId) .ForeignKey("Web.UnitConversionFors", t => t.UnitConversionForId) .Index(t => new { t.DocTypeId, t.DocNo, t.DivisionId, t.SiteId }, unique: true, name: "IX_PurchaseQuotationHeader_DocID") .Index(t => t.SupplierId) .Index(t => t.BillingAccountId) .Index(t => t.CurrencyId) .Index(t => t.SalesTaxGroupId) .Index(t => t.UnitConversionForId) .Index(t => t.DeliveryTermsId) .Index(t => t.ShipMethodId); CreateTable( "Web.PurchaseQuotationLines", c => new { PurchaseQuotationLineId = c.Int(nullable: false, identity: true), PurchaseQuotationHeaderId = c.Int(nullable: false), ProductId = c.Int(nullable: false), PurchaseIndentLineId = c.Int(), Dimension1Id = c.Int(), Dimension2Id = c.Int(), Specification = c.String(maxLength: 50), LotNo = c.String(maxLength: 20), SalesTaxGroupId = c.Int(), UnitConversionMultiplier = c.Decimal(nullable: false, precision: 18, scale: 4), DealUnitId = c.String(nullable: false, maxLength: 3), DealQty = c.Decimal(nullable: false, precision: 18, scale: 4), DiscountPer = c.Decimal(precision: 18, scale: 4), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), Rate = c.Decimal(nullable: false, precision: 18, scale: 4), Amount = c.Decimal(nullable: false, precision: 18, scale: 4), LockReason = c.String(), Sr = c.Int(), Remark = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.PurchaseQuotationLineId) .ForeignKey("Web.Units", t => t.DealUnitId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.Products", t => t.ProductId) .ForeignKey("Web.PurchaseIndentLines", t => t.PurchaseIndentLineId) .ForeignKey("Web.PurchaseQuotationHeaders", t => t.PurchaseQuotationHeaderId) .ForeignKey("Web.SalesTaxGroups", t => t.SalesTaxGroupId) .Index(t => t.PurchaseQuotationHeaderId) .Index(t => t.ProductId) .Index(t => t.PurchaseIndentLineId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id) .Index(t => t.SalesTaxGroupId) .Index(t => t.DealUnitId); CreateTable( "Web.PurchaseQuotationHeaderCharges", c => new { Id = c.Int(nullable: false, identity: true), HeaderTableId = c.Int(nullable: false), Sr = c.Int(nullable: false), ChargeId = c.Int(nullable: false), AddDeduct = c.Int(), AffectCost = c.Boolean(nullable: false), ChargeTypeId = c.Int(), ProductChargeId = c.Int(), CalculateOnId = c.Int(), PersonID = c.Int(), LedgerAccountDrId = c.Int(), LedgerAccountCrId = c.Int(), ContraLedgerAccountId = c.Int(), CostCenterId = c.Int(), RateType = c.Byte(nullable: false), IncludedInBase = c.Boolean(nullable: false), ParentChargeId = c.Int(), Rate = c.Decimal(precision: 18, scale: 4), Amount = c.Decimal(precision: 18, scale: 4), IsVisible = c.Boolean(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.Id) .ForeignKey("Web.Charges", t => t.CalculateOnId) .ForeignKey("Web.Charges", t => t.ChargeId) .ForeignKey("Web.ChargeTypes", t => t.ChargeTypeId) .ForeignKey("Web.LedgerAccounts", t => t.ContraLedgerAccountId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountCrId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountDrId) .ForeignKey("Web.Charges", t => t.ParentChargeId) .ForeignKey("Web.People", t => t.PersonID) .ForeignKey("Web.Charges", t => t.ProductChargeId) .ForeignKey("Web.PurchaseQuotationHeaders", t => t.HeaderTableId) .Index(t => t.HeaderTableId) .Index(t => t.ChargeId) .Index(t => t.ChargeTypeId) .Index(t => t.ProductChargeId) .Index(t => t.CalculateOnId) .Index(t => t.PersonID) .Index(t => t.LedgerAccountDrId) .Index(t => t.LedgerAccountCrId) .Index(t => t.ContraLedgerAccountId) .Index(t => t.CostCenterId) .Index(t => t.ParentChargeId); CreateTable( "Web.PurchaseQuotationLineCharges", c => new { Id = c.Int(nullable: false, identity: true), LineTableId = c.Int(nullable: false), HeaderTableId = c.Int(nullable: false), Sr = c.Int(nullable: false), ChargeId = c.Int(nullable: false), AddDeduct = c.Int(), AffectCost = c.Boolean(nullable: false), ChargeTypeId = c.Int(), CalculateOnId = c.Int(), PersonID = c.Int(), LedgerAccountDrId = c.Int(), LedgerAccountCrId = c.Int(), ContraLedgerAccountId = c.Int(), CostCenterId = c.Int(), RateType = c.Byte(nullable: false), IncludedInBase = c.Boolean(nullable: false), ParentChargeId = c.Int(), Rate = c.Decimal(precision: 18, scale: 4), Amount = c.Decimal(precision: 18, scale: 4), DealQty = c.Decimal(precision: 18, scale: 4), IsVisible = c.Boolean(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.Id) .ForeignKey("Web.Charges", t => t.CalculateOnId) .ForeignKey("Web.Charges", t => t.ChargeId) .ForeignKey("Web.ChargeTypes", t => t.ChargeTypeId) .ForeignKey("Web.LedgerAccounts", t => t.ContraLedgerAccountId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountCrId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountDrId) .ForeignKey("Web.Charges", t => t.ParentChargeId) .ForeignKey("Web.People", t => t.PersonID) .ForeignKey("Web.PurchaseQuotationLines", t => t.LineTableId) .Index(t => t.LineTableId) .Index(t => t.ChargeId) .Index(t => t.ChargeTypeId) .Index(t => t.CalculateOnId) .Index(t => t.PersonID) .Index(t => t.LedgerAccountDrId) .Index(t => t.LedgerAccountCrId) .Index(t => t.ContraLedgerAccountId) .Index(t => t.CostCenterId) .Index(t => t.ParentChargeId); CreateTable( "Web.PurchaseQuotationSettings", c => new { PurchaseQuotationSettingId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), isVisibleCostCenter = c.Boolean(), isMandatoryCostCenter = c.Boolean(), isVisibleDimension1 = c.Boolean(), isVisibleDimension2 = c.Boolean(), isMandatoryRate = c.Boolean(), isAllowedWithoutQuotation = c.Boolean(), isEditableRate = c.Boolean(), isVisibleLotNo = c.Boolean(), CalculateDiscountOnRate = c.Boolean(nullable: false), isPostedInStockVirtual = c.Boolean(), filterLedgerAccountGroups = c.String(), filterLedgerAccounts = c.String(), filterProductTypes = c.String(), filterProductGroups = c.String(), filterProducts = c.String(), filterContraDocTypes = c.String(), filterContraSites = c.String(), filterContraDivisions = c.String(), isVisibleForIndent = c.Boolean(), isVisibleSalesTaxGroup = c.Boolean(), isVisibleCurrency = c.Boolean(), isVisibleDeliveryTerms = c.Boolean(), isVisibleShipMethod = c.Boolean(), CalculationId = c.Int(nullable: false), SqlProcDocumentPrint = c.String(maxLength: 100), SqlProcDocumentPrint_AfterSubmit = c.String(maxLength: 100), SqlProcDocumentPrint_AfterApprove = c.String(maxLength: 100), SqlProcGenProductUID = c.String(maxLength: 100), UnitConversionForId = c.Byte(), TermsAndConditions = c.String(), OnSubmitMenuId = c.Int(), OnApproveMenuId = c.Int(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.PurchaseQuotationSettingId) .ForeignKey("Web.Calculations", t => t.CalculationId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Menus", t => t.OnApproveMenuId) .ForeignKey("Web.Menus", t => t.OnSubmitMenuId) .ForeignKey("Web.Sites", t => t.SiteId) .ForeignKey("Web.UnitConversionFors", t => t.UnitConversionForId) .Index(t => t.DocTypeId) .Index(t => t.SiteId) .Index(t => t.DivisionId) .Index(t => t.CalculationId) .Index(t => t.UnitConversionForId) .Index(t => t.OnSubmitMenuId) .Index(t => t.OnApproveMenuId); CreateTable( "Web.RateConversionSettings", c => new { RateConversionSettingsId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), isVisibleMachine = c.Boolean(), isMandatoryMachine = c.Boolean(), isVisibleCostCenter = c.Boolean(), isMandatoryCostCenter = c.Boolean(), isVisibleProductUID = c.Boolean(), isVisibleDimension1 = c.Boolean(), isVisibleDimension2 = c.Boolean(), isVisibleLotNo = c.Boolean(), isMandatoryProcessLine = c.Boolean(), isPostedInStockProcess = c.Boolean(), SqlProcDocumentPrint = c.String(maxLength: 100), filterProductTypes = c.String(), filterProductGroups = c.String(), filterProducts = c.String(), filterContraDocTypes = c.String(), ProcessId = c.Int(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.RateConversionSettingsId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.DocTypeId) .Index(t => t.SiteId) .Index(t => t.DivisionId) .Index(t => t.ProcessId); CreateTable( "Web.RateLists", c => new { RateListId = c.Int(nullable: false, identity: true), WEF = c.DateTime(nullable: false), ProcessId = c.Int(), PersonRateGroupId = c.Int(), DocTypeId = c.Int(), DocId = c.Int(), ProductId = c.Int(), WeightageGreaterOrEqual = c.Decimal(nullable: false, precision: 18, scale: 4), Rate = c.Decimal(nullable: false, precision: 18, scale: 4), DealUnitId = c.String(maxLength: 3), Loss = c.Decimal(nullable: false, precision: 18, scale: 4), UnCountedQty = c.Decimal(nullable: false, precision: 18, scale: 4), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.RateListId) .ForeignKey("Web.Units", t => t.DealUnitId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.PersonRateGroups", t => t.PersonRateGroupId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.Products", t => t.ProductId) .Index(t => t.ProcessId) .Index(t => t.PersonRateGroupId) .Index(t => t.DocTypeId) .Index(t => t.ProductId) .Index(t => t.DealUnitId); CreateTable( "Web.RateListHeaders", c => new { RateListHeaderId = c.Int(nullable: false, identity: true), EffectiveDate = c.DateTime(nullable: false), ProcessId = c.Int(nullable: false), RateListName = c.String(nullable: false, maxLength: 50), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), CalculateWeightageOn = c.String(nullable: false, maxLength: 20), WeightageGreaterOrEqual = c.Decimal(nullable: false, precision: 18, scale: 4), DealUnitId = c.String(maxLength: 3), CloseDate = c.DateTime(), Description = c.String(), MinRate = c.Decimal(nullable: false, precision: 18, scale: 4), MaxRate = c.Decimal(nullable: false, precision: 18, scale: 4), Status = c.Int(nullable: false), CreatedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedBy = c.String(), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.RateListHeaderId) .ForeignKey("Web.Units", t => t.DealUnitId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => new { t.EffectiveDate, t.ProcessId, t.DivisionId, t.SiteId, t.WeightageGreaterOrEqual }, unique: true, name: "IX_RateListHeader_DocID") .Index(t => new { t.RateListName, t.DivisionId, t.SiteId }, unique: true, name: "IX_RateListHeader_Name") .Index(t => t.DealUnitId); CreateTable( "Web.RateListHistories", c => new { RateListId = c.Int(nullable: false, identity: true), WEF = c.DateTime(nullable: false), ProcessId = c.Int(), PersonRateGroupId = c.Int(), DocTypeId = c.Int(), DocId = c.Int(), ProductId = c.Int(), WeightageGreaterOrEqual = c.Decimal(nullable: false, precision: 18, scale: 4), Rate = c.Decimal(nullable: false, precision: 18, scale: 4), DealUnitId = c.String(maxLength: 3), Loss = c.Decimal(nullable: false, precision: 18, scale: 4), UnCountedQty = c.Decimal(nullable: false, precision: 18, scale: 4), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.RateListId) .ForeignKey("Web.Units", t => t.DealUnitId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.PersonRateGroups", t => t.PersonRateGroupId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.Products", t => t.ProductId) .Index(t => t.ProcessId) .Index(t => t.PersonRateGroupId) .Index(t => t.DocTypeId) .Index(t => t.ProductId) .Index(t => t.DealUnitId); CreateTable( "Web.RateListLines", c => new { RateListLineId = c.Int(nullable: false, identity: true), RateListHeaderId = c.Int(nullable: false), PersonRateGroupId = c.Int(), ProductRateGroupId = c.Int(), ProductId = c.Int(), Dimension1Id = c.Int(), Dimension2Id = c.Int(), Rate = c.Decimal(nullable: false, precision: 18, scale: 4), Discount = c.Decimal(nullable: false, precision: 18, scale: 4), Incentive = c.Decimal(nullable: false, precision: 18, scale: 4), Loss = c.Decimal(nullable: false, precision: 18, scale: 4), UnCountedQty = c.Decimal(nullable: false, precision: 18, scale: 4), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.RateListLineId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.PersonRateGroups", t => t.PersonRateGroupId) .ForeignKey("Web.Products", t => t.ProductId) .ForeignKey("Web.ProductRateGroups", t => t.ProductRateGroupId) .ForeignKey("Web.RateListHeaders", t => t.RateListHeaderId) .Index(t => t.RateListHeaderId) .Index(t => t.PersonRateGroupId) .Index(t => t.ProductRateGroupId) .Index(t => t.ProductId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id); CreateTable( "Web.RateListLineHistories", c => new { RateListLineId = c.Int(nullable: false, identity: true), RateListHeaderId = c.Int(nullable: false), PersonRateGroupId = c.Int(), ProductRateGroupId = c.Int(), ProductId = c.Int(), Dimension1Id = c.Int(), Dimension2Id = c.Int(), Rate = c.Decimal(nullable: false, precision: 18, scale: 4), Discount = c.Decimal(nullable: false, precision: 18, scale: 4), Incentive = c.Decimal(nullable: false, precision: 18, scale: 4), Loss = c.Decimal(nullable: false, precision: 18, scale: 4), UnCountedQty = c.Decimal(nullable: false, precision: 18, scale: 4), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.RateListLineId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.PersonRateGroups", t => t.PersonRateGroupId) .ForeignKey("Web.Products", t => t.ProductId) .ForeignKey("Web.ProductRateGroups", t => t.ProductRateGroupId) .ForeignKey("Web.RateListHeaders", t => t.RateListHeaderId) .Index(t => t.RateListHeaderId) .Index(t => t.PersonRateGroupId) .Index(t => t.ProductRateGroupId) .Index(t => t.ProductId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id); CreateTable( "Web.RateListPersonRateGroups", c => new { RateListPersonRateGroupId = c.Int(nullable: false, identity: true), RateListHeaderId = c.Int(nullable: false), PersonRateGroupId = c.Int(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.RateListPersonRateGroupId) .ForeignKey("Web.PersonRateGroups", t => t.PersonRateGroupId) .ForeignKey("Web.RateListHeaders", t => t.RateListHeaderId) .Index(t => t.RateListHeaderId) .Index(t => t.PersonRateGroupId); CreateTable( "Web.RateListProductRateGroups", c => new { RateListProductRateGroupId = c.Int(nullable: false, identity: true), RateListHeaderId = c.Int(nullable: false), ProductRateGroupId = c.Int(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.RateListProductRateGroupId) .ForeignKey("Web.ProductRateGroups", t => t.ProductRateGroupId) .ForeignKey("Web.RateListHeaders", t => t.RateListHeaderId) .Index(t => t.RateListHeaderId) .Index(t => t.ProductRateGroupId); CreateTable( "Web.ReportColumns", c => new { ReportColumnId = c.Int(nullable: false, identity: true), ReportHeaderId = c.Int(nullable: false), SubReportId = c.Int(nullable: false), SubReportHeaderId = c.Int(), DisplayName = c.String(nullable: false), FieldName = c.String(nullable: false), IsVisible = c.Boolean(nullable: false), width = c.String(), minWidth = c.String(), AggregateFunc = c.String(), TestAlignment = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.ReportColumnId) .ForeignKey("Web.ReportHeaders", t => t.ReportHeaderId) .ForeignKey("Web.SubReports", t => t.SubReportId) .ForeignKey("Web.ReportHeaders", t => t.SubReportHeaderId) .Index(t => t.ReportHeaderId) .Index(t => t.SubReportId) .Index(t => t.SubReportHeaderId); CreateTable( "Web.ReportHeaders", c => new { ReportHeaderId = c.Int(nullable: false, identity: true), ReportName = c.String(), Controller = c.String(), Action = c.String(), SqlProc = c.String(), Notes = c.String(), ParentReportHeaderId = c.Int(), ReportSQL = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.ReportHeaderId); CreateTable( "Web.ReportLines", c => new { ReportLineId = c.Int(nullable: false, identity: true), ReportHeaderId = c.Int(nullable: false), DisplayName = c.String(nullable: false), FieldName = c.String(nullable: false), DataType = c.String(nullable: false), Type = c.String(nullable: false), ListItem = c.String(), DefaultValue = c.String(), IsVisible = c.Boolean(nullable: false), ServiceFuncGet = c.String(), ServiceFuncSet = c.String(), SqlProcGetSet = c.String(maxLength: 100), SqlProcGet = c.String(), SqlProcSet = c.String(), CacheKey = c.String(), Serial = c.Int(nullable: false), NoOfCharToEnter = c.Int(), SqlParameter = c.String(), IsCollapse = c.Boolean(nullable: false), IsMandatory = c.Boolean(nullable: false), PlaceHolder = c.String(), ToolTip = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.ReportLineId) .ForeignKey("Web.ReportHeaders", t => t.ReportHeaderId) .Index(t => t.ReportHeaderId); CreateTable( "Web.SubReports", c => new { SubReportId = c.Int(nullable: false, identity: true), SubReportName = c.String(), SqlProc = c.String(), ReportHeaderId = c.Int(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.SubReportId) .ForeignKey("Web.ReportHeaders", t => t.ReportHeaderId) .Index(t => t.ReportHeaderId); CreateTable( "Web.ReportUIDValues", c => new { Id = c.Int(nullable: false, identity: true), UID = c.Guid(nullable: false), Type = c.String(), Value = c.String(), }) .PrimaryKey(t => t.Id); CreateTable( "Web.RequisitionCancelHeaders", c => new { RequisitionCancelHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(nullable: false, maxLength: 20), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), PersonId = c.Int(nullable: false), ReasonId = c.Int(nullable: false), ReferenceDocTypeId = c.Int(), ReferenceDocId = c.Int(), Remark = c.String(), Status = c.Int(nullable: false), ReviewCount = c.Int(), ReviewBy = c.String(), CreatedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedBy = c.String(), ModifiedDate = c.DateTime(nullable: false), LockReason = c.String(), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.RequisitionCancelHeaderId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.People", t => t.PersonId) .ForeignKey("Web.Reasons", t => t.ReasonId) .ForeignKey("Web.DocumentTypes", t => t.ReferenceDocTypeId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => new { t.DocTypeId, t.DocNo, t.DivisionId, t.SiteId }, unique: true, name: "IX_RequisitionCancelHeader_DocID") .Index(t => t.PersonId) .Index(t => t.ReasonId) .Index(t => t.ReferenceDocTypeId); CreateTable( "Web.RequisitionCancelLines", c => new { RequisitionCancelLineId = c.Int(nullable: false, identity: true), RequisitionCancelHeaderId = c.Int(nullable: false), RequisitionLineId = c.Int(nullable: false), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), Remark = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), LockReason = c.String(), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.RequisitionCancelLineId) .ForeignKey("Web.RequisitionCancelHeaders", t => t.RequisitionCancelHeaderId) .ForeignKey("Web.RequisitionLines", t => t.RequisitionLineId) .Index(t => t.RequisitionCancelHeaderId) .Index(t => t.RequisitionLineId); CreateTable( "Web.RequisitionLineStatus", c => new { RequisitionLineId = c.Int(nullable: false), CancelQty = c.Decimal(precision: 18, scale: 4), CancelDate = c.DateTime(), AmendmentQty = c.Decimal(precision: 18, scale: 4), AmendmentDate = c.DateTime(), IssueQty = c.Decimal(precision: 18, scale: 4), ReceiveQty = c.Decimal(precision: 18, scale: 4), IssueDate = c.DateTime(), ReceiveDate = c.DateTime(), }) .PrimaryKey(t => t.RequisitionLineId) .ForeignKey("Web.RequisitionLines", t => t.RequisitionLineId) .Index(t => t.RequisitionLineId); CreateTable( "Web.RequisitionSettings", c => new { RequisitionSettingId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), isVisibleCostCenter = c.Boolean(), isMandatoryCostCenter = c.Boolean(), isVisibleDimension1 = c.Boolean(), isVisibleDimension2 = c.Boolean(), filterLedgerAccountGroups = c.String(), filterLedgerAccounts = c.String(), filterProductTypes = c.String(), filterProductGroups = c.String(), filterProducts = c.String(), filterContraDocTypes = c.String(), filterContraSites = c.String(), filterContraDivisions = c.String(), SqlProcDocumentPrint = c.String(maxLength: 100), SqlProcDocumentPrint_AfterSubmit = c.String(maxLength: 100), SqlProcDocumentPrint_AfterApprove = c.String(maxLength: 100), OnSubmitMenuId = c.Int(), OnApproveMenuId = c.Int(), DefaultReasonId = c.Int(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.RequisitionSettingId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Menus", t => t.OnApproveMenuId) .ForeignKey("Web.Menus", t => t.OnSubmitMenuId) .ForeignKey("Web.Reasons", t => t.DefaultReasonId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.DocTypeId) .Index(t => t.SiteId) .Index(t => t.DivisionId) .Index(t => t.OnSubmitMenuId) .Index(t => t.OnApproveMenuId) .Index(t => t.DefaultReasonId); CreateTable( "Web.AspNetRoles", c => new { Id = c.String(nullable: false, maxLength: 128), Name = c.String(nullable: false, maxLength: 256), }) .PrimaryKey(t => t.Id) .Index(t => t.Name, unique: true, name: "RoleNameIndex"); CreateTable( "Web.RolesControllerActions", c => new { RolesControllerActionId = c.Int(nullable: false, identity: true), RoleId = c.String(maxLength: 128), ControllerActionId = c.Int(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.RolesControllerActionId) .ForeignKey("Web.ControllerActions", t => t.ControllerActionId) .ForeignKey("Web.AspNetRoles", t => t.RoleId) .Index(t => t.RoleId) .Index(t => t.ControllerActionId); CreateTable( "Web.RolesDivisions", c => new { RolesDivisionId = c.Int(nullable: false, identity: true), RoleId = c.String(maxLength: 128), DivisionId = c.Int(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.RolesDivisionId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.AspNetRoles", t => t.RoleId) .Index(t => t.RoleId) .Index(t => t.DivisionId); CreateTable( "Web.RolesMenus", c => new { RolesMenuId = c.Int(nullable: false, identity: true), RoleId = c.String(maxLength: 128), MenuId = c.Int(nullable: false), FullHeaderPermission = c.Boolean(nullable: false), FullLinePermission = c.Boolean(nullable: false), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.RolesMenuId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.Menus", t => t.MenuId) .ForeignKey("Web.AspNetRoles", t => t.RoleId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.RoleId) .Index(t => t.MenuId) .Index(t => new { t.DivisionId, t.SiteId }, unique: true, name: "IX_PurchaseOrderHeader_DocID"); CreateTable( "Web.RolesSites", c => new { RolesSiteId = c.Int(nullable: false, identity: true), RoleId = c.String(maxLength: 128), SiteId = c.Int(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.RolesSiteId) .ForeignKey("Web.AspNetRoles", t => t.RoleId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.RoleId) .Index(t => t.SiteId); CreateTable( "Web.RouteLines", c => new { RouteLineId = c.Int(nullable: false, identity: true), RouteId = c.Int(nullable: false), CityId = c.Int(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.RouteLineId) .ForeignKey("Web.Cities", t => t.CityId) .ForeignKey("Web.Routes", t => t.RouteId) .Index(t => t.RouteId) .Index(t => t.CityId); CreateTable( "Web.Rug_RetentionPercentage", c => new { Rug_RetentionPercentageId = c.Int(nullable: false, identity: true), ProductCategoryId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), RetentionPer = c.Decimal(nullable: false, precision: 18, scale: 4), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.Rug_RetentionPercentageId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.Stocks", t => t.ProductCategoryId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.ProductCategoryId) .Index(t => new { t.DivisionId, t.SiteId }, unique: true, name: "IX_Stock_DocID"); CreateTable( "Web.RugStencils", c => new { StencilId = c.Int(nullable: false), ProductDesignId = c.Int(nullable: false), ProductSizeId = c.Int(nullable: false), FullHalf = c.String(maxLength: 10), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.StencilId) .ForeignKey("Web.Products", t => t.StencilId) .ForeignKey("Web.ProductDesigns", t => t.ProductDesignId) .ForeignKey("Web.ProductSizes", t => t.ProductSizeId) .Index(t => t.StencilId) .Index(t => t.ProductDesignId) .Index(t => t.ProductSizeId); CreateTable( "Web.SaleDeliveryOrderCancelHeaders", c => new { SaleDeliveryOrderCancelHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(maxLength: 10), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), ReasonId = c.Int(nullable: false), BuyerId = c.Int(nullable: false), OrderById = c.Int(nullable: false), Status = c.Int(nullable: false), Remark = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), LockReason = c.String(), OMSId = c.String(maxLength: 50), ReviewCount = c.Int(), ReviewBy = c.String(), }) .PrimaryKey(t => t.SaleDeliveryOrderCancelHeaderId) .ForeignKey("Web.Buyers", t => t.BuyerId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Employees", t => t.OrderById) .ForeignKey("Web.Reasons", t => t.ReasonId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => new { t.DocTypeId, t.DocNo, t.DivisionId, t.SiteId }, unique: true, name: "IX_DeliveryOrderHeader_Unique") .Index(t => t.ReasonId) .Index(t => t.BuyerId) .Index(t => t.OrderById); CreateTable( "Web.SaleDeliveryOrderCancelLines", c => new { SaleDeliveryOrderCancelLineId = c.Int(nullable: false, identity: true), SaleDeliveryOrderCancelHeaderId = c.Int(nullable: false), Sr = c.Int(), ProductUidId = c.Int(), SaleDeliveryOrderLineId = c.Int(nullable: false), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), Remark = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), LockReason = c.String(), OMSId = c.String(maxLength: 50), ProductUidLastTransactionDocId = c.Int(), ProductUidLastTransactionDocNo = c.String(), ProductUidLastTransactionDocTypeId = c.Int(), ProductUidLastTransactionDocDate = c.DateTime(), ProductUidLastTransactionPersonId = c.Int(), ProductUidCurrentGodownId = c.Int(), ProductUidCurrentProcessId = c.Int(), ProductUidStatus = c.String(maxLength: 10), }) .PrimaryKey(t => t.SaleDeliveryOrderCancelLineId) .ForeignKey("Web.ProductUids", t => t.ProductUidId) .ForeignKey("Web.SaleDeliveryOrderCancelHeaders", t => t.SaleDeliveryOrderCancelHeaderId) .ForeignKey("Web.SaleDeliveryOrderLines", t => t.SaleDeliveryOrderLineId) .Index(t => t.SaleDeliveryOrderCancelHeaderId) .Index(t => t.ProductUidId) .Index(t => t.SaleDeliveryOrderLineId); CreateTable( "Web.SaleDeliveryOrderSettings", c => new { SaleDeliveryOrderSettingsId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), ImportMenuId = c.Int(), isVisibleProductUID = c.Boolean(), isMandatoryProductUID = c.Boolean(), isVisibleDimension1 = c.Boolean(), isVisibleDimension2 = c.Boolean(), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.SaleDeliveryOrderSettingsId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Menus", t => t.ImportMenuId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.DocTypeId) .Index(t => t.ImportMenuId) .Index(t => t.SiteId) .Index(t => t.DivisionId); CreateTable( "Web.SaleDispatchReturnHeaders", c => new { SaleDispatchReturnHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(nullable: false, maxLength: 20), ReasonId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), BuyerId = c.Int(nullable: false), Remark = c.String(nullable: false), Status = c.Int(nullable: false), StockHeaderId = c.Int(), LockReason = c.String(), LockReasonDelete = c.String(), ReviewCount = c.Int(), ReviewBy = c.String(), CreatedBy = c.String(), GodownId = c.Int(nullable: false), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.SaleDispatchReturnHeaderId) .ForeignKey("Web.Buyers", t => t.BuyerId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Godowns", t => t.GodownId) .ForeignKey("Web.Reasons", t => t.ReasonId) .ForeignKey("Web.Sites", t => t.SiteId) .ForeignKey("Web.StockHeaders", t => t.StockHeaderId) .Index(t => new { t.DocTypeId, t.DocNo, t.DivisionId, t.SiteId }, unique: true, name: "IX_SaleDispatchReturnHeader_DocID") .Index(t => t.ReasonId) .Index(t => t.BuyerId) .Index(t => t.StockHeaderId) .Index(t => t.GodownId); CreateTable( "Web.SaleDispatchReturnLines", c => new { SaleDispatchReturnLineId = c.Int(nullable: false, identity: true), SaleDispatchReturnHeaderId = c.Int(nullable: false), SaleDispatchLineId = c.Int(nullable: false), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), UnitConversionMultiplier = c.Decimal(nullable: false, precision: 18, scale: 4), DealUnitId = c.String(nullable: false, maxLength: 3), DealQty = c.Decimal(nullable: false, precision: 18, scale: 4), Weight = c.Decimal(precision: 18, scale: 4), Remark = c.String(), StockId = c.Int(), Sr = c.Int(), LockReason = c.String(), LockReasonDelete = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.SaleDispatchReturnLineId) .ForeignKey("Web.Units", t => t.DealUnitId) .ForeignKey("Web.SaleDispatchLines", t => t.SaleDispatchLineId) .ForeignKey("Web.SaleDispatchReturnHeaders", t => t.SaleDispatchReturnHeaderId) .ForeignKey("Web.Stocks", t => t.StockId) .Index(t => t.SaleDispatchReturnHeaderId) .Index(t => t.SaleDispatchLineId) .Index(t => t.DealUnitId) .Index(t => t.StockId); CreateTable( "Web.SaleDispatchSettings", c => new { SaleDispatchSettingId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), isVisibleDimension1 = c.Boolean(), isVisibleDimension2 = c.Boolean(), isVisibleLotNo = c.Boolean(), filterLedgerAccountGroups = c.String(), filterLedgerAccounts = c.String(), filterProductTypes = c.String(), filterProductGroups = c.String(), filterProducts = c.String(), filterContraDocTypes = c.String(), filterContraSites = c.String(), filterContraDivisions = c.String(), DocTypePackingHeaderId = c.Int(), SqlProcDocumentPrint = c.String(maxLength: 100), SqlProcDocumentPrint_AfterSubmit = c.String(maxLength: 100), SqlProcDocumentPrint_AfterApprove = c.String(maxLength: 100), SqlProcGatePass = c.String(maxLength: 100), UnitConversionForId = c.Byte(), DocTypeDispatchReturnId = c.Int(), ImportMenuId = c.Int(), isVisibleDeliveryTerms = c.Boolean(), isVisibleDealUnit = c.Boolean(), isVisibleShipMethod = c.Boolean(), isVisibleSpecification = c.Boolean(), isVisibleProductUid = c.Boolean(), isVisibleProductCode = c.Boolean(), isVisibleBaleNo = c.Boolean(), isVisibleForSaleOrder = c.Boolean(), isVisibleWeight = c.Boolean(), ProcessId = c.Int(), DeliveryTermsId = c.Int(nullable: false), ShipMethodId = c.Int(nullable: false), GodownId = c.Int(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.SaleDispatchSettingId) .ForeignKey("Web.DeliveryTerms", t => t.DeliveryTermsId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeDispatchReturnId) .ForeignKey("Web.DocumentTypes", t => t.DocTypePackingHeaderId) .ForeignKey("Web.Godowns", t => t.GodownId) .ForeignKey("Web.Menus", t => t.ImportMenuId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.ShipMethods", t => t.ShipMethodId) .ForeignKey("Web.Sites", t => t.SiteId) .ForeignKey("Web.UnitConversionFors", t => t.UnitConversionForId) .Index(t => t.DocTypeId) .Index(t => t.SiteId) .Index(t => t.DivisionId) .Index(t => t.DocTypePackingHeaderId) .Index(t => t.UnitConversionForId) .Index(t => t.DocTypeDispatchReturnId) .Index(t => t.ImportMenuId) .Index(t => t.ProcessId) .Index(t => t.DeliveryTermsId) .Index(t => t.ShipMethodId) .Index(t => t.GodownId); CreateTable( "Web.SaleInvoiceHeaderCharges", c => new { Id = c.Int(nullable: false, identity: true), HeaderTableId = c.Int(nullable: false), Sr = c.Int(nullable: false), ChargeId = c.Int(nullable: false), AddDeduct = c.Int(), AffectCost = c.Boolean(nullable: false), ChargeTypeId = c.Int(), ProductChargeId = c.Int(), CalculateOnId = c.Int(), PersonID = c.Int(), LedgerAccountDrId = c.Int(), LedgerAccountCrId = c.Int(), ContraLedgerAccountId = c.Int(), CostCenterId = c.Int(), RateType = c.Byte(nullable: false), IncludedInBase = c.Boolean(nullable: false), ParentChargeId = c.Int(), Rate = c.Decimal(precision: 18, scale: 4), Amount = c.Decimal(precision: 18, scale: 4), IsVisible = c.Boolean(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.Id) .ForeignKey("Web.Charges", t => t.CalculateOnId) .ForeignKey("Web.Charges", t => t.ChargeId) .ForeignKey("Web.ChargeTypes", t => t.ChargeTypeId) .ForeignKey("Web.LedgerAccounts", t => t.ContraLedgerAccountId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountCrId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountDrId) .ForeignKey("Web.Charges", t => t.ParentChargeId) .ForeignKey("Web.People", t => t.PersonID) .ForeignKey("Web.Charges", t => t.ProductChargeId) .ForeignKey("Web.SaleInvoiceHeaders", t => t.HeaderTableId) .Index(t => t.HeaderTableId) .Index(t => t.ChargeId) .Index(t => t.ChargeTypeId) .Index(t => t.ProductChargeId) .Index(t => t.CalculateOnId) .Index(t => t.PersonID) .Index(t => t.LedgerAccountDrId) .Index(t => t.LedgerAccountCrId) .Index(t => t.ContraLedgerAccountId) .Index(t => t.CostCenterId) .Index(t => t.ParentChargeId); CreateTable( "Web.SaleInvoiceLineCharges", c => new { Id = c.Int(nullable: false, identity: true), LineTableId = c.Int(nullable: false), HeaderTableId = c.Int(nullable: false), Sr = c.Int(nullable: false), ChargeId = c.Int(nullable: false), AddDeduct = c.Int(), AffectCost = c.Boolean(nullable: false), ChargeTypeId = c.Int(), CalculateOnId = c.Int(), PersonID = c.Int(), LedgerAccountDrId = c.Int(), LedgerAccountCrId = c.Int(), ContraLedgerAccountId = c.Int(), CostCenterId = c.Int(), RateType = c.Byte(nullable: false), IncludedInBase = c.Boolean(nullable: false), ParentChargeId = c.Int(), Rate = c.Decimal(precision: 18, scale: 4), Amount = c.Decimal(precision: 18, scale: 4), DealQty = c.Decimal(precision: 18, scale: 4), IsVisible = c.Boolean(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.Id) .ForeignKey("Web.Charges", t => t.CalculateOnId) .ForeignKey("Web.Charges", t => t.ChargeId) .ForeignKey("Web.ChargeTypes", t => t.ChargeTypeId) .ForeignKey("Web.LedgerAccounts", t => t.ContraLedgerAccountId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountCrId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountDrId) .ForeignKey("Web.Charges", t => t.ParentChargeId) .ForeignKey("Web.People", t => t.PersonID) .ForeignKey("Web.SaleInvoiceLines", t => t.LineTableId) .Index(t => t.LineTableId) .Index(t => t.ChargeId) .Index(t => t.ChargeTypeId) .Index(t => t.CalculateOnId) .Index(t => t.PersonID) .Index(t => t.LedgerAccountDrId) .Index(t => t.LedgerAccountCrId) .Index(t => t.ContraLedgerAccountId) .Index(t => t.CostCenterId) .Index(t => t.ParentChargeId); CreateTable( "Web.SaleInvoiceReturnHeaders", c => new { SaleInvoiceReturnHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(nullable: false, maxLength: 20), ReasonId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), LedgerHeaderId = c.Int(), ExchangeRate = c.Decimal(precision: 18, scale: 4), BuyerId = c.Int(nullable: false), CalculateDiscountOnRate = c.Boolean(nullable: false), SalesTaxGroupId = c.Int(), SalesTaxGroupPartyId = c.Int(), CurrencyId = c.Int(nullable: false), SaleDispatchReturnHeaderId = c.Int(), Remark = c.String(nullable: false), Status = c.Int(nullable: false), LockReason = c.String(), LockReasonDelete = c.String(), ReviewCount = c.Int(), ReviewBy = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.SaleInvoiceReturnHeaderId) .ForeignKey("Web.Buyers", t => t.BuyerId) .ForeignKey("Web.Currencies", t => t.CurrencyId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.LedgerHeaders", t => t.LedgerHeaderId) .ForeignKey("Web.Reasons", t => t.ReasonId) .ForeignKey("Web.SaleDispatchReturnHeaders", t => t.SaleDispatchReturnHeaderId) .ForeignKey("Web.ChargeGroupPersons", t => t.SalesTaxGroupId) .ForeignKey("Web.SalesTaxGroupParties", t => t.SalesTaxGroupPartyId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => new { t.DocTypeId, t.DocNo, t.DivisionId, t.SiteId }, unique: true, name: "IX_SaleInvoiceReturnHeader_DocID") .Index(t => t.ReasonId) .Index(t => t.LedgerHeaderId) .Index(t => t.BuyerId) .Index(t => t.SalesTaxGroupId) .Index(t => t.SalesTaxGroupPartyId) .Index(t => t.CurrencyId) .Index(t => t.SaleDispatchReturnHeaderId); CreateTable( "Web.SaleInvoiceReturnHeaderCharges", c => new { Id = c.Int(nullable: false, identity: true), HeaderTableId = c.Int(nullable: false), Sr = c.Int(nullable: false), ChargeId = c.Int(nullable: false), AddDeduct = c.Int(), AffectCost = c.Boolean(nullable: false), ChargeTypeId = c.Int(), ProductChargeId = c.Int(), CalculateOnId = c.Int(), PersonID = c.Int(), LedgerAccountDrId = c.Int(), LedgerAccountCrId = c.Int(), ContraLedgerAccountId = c.Int(), CostCenterId = c.Int(), RateType = c.Byte(nullable: false), IncludedInBase = c.Boolean(nullable: false), ParentChargeId = c.Int(), Rate = c.Decimal(precision: 18, scale: 4), Amount = c.Decimal(precision: 18, scale: 4), IsVisible = c.Boolean(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.Id) .ForeignKey("Web.Charges", t => t.CalculateOnId) .ForeignKey("Web.Charges", t => t.ChargeId) .ForeignKey("Web.ChargeTypes", t => t.ChargeTypeId) .ForeignKey("Web.LedgerAccounts", t => t.ContraLedgerAccountId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountCrId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountDrId) .ForeignKey("Web.Charges", t => t.ParentChargeId) .ForeignKey("Web.People", t => t.PersonID) .ForeignKey("Web.Charges", t => t.ProductChargeId) .ForeignKey("Web.SaleInvoiceReturnHeaders", t => t.HeaderTableId) .Index(t => t.HeaderTableId) .Index(t => t.ChargeId) .Index(t => t.ChargeTypeId) .Index(t => t.ProductChargeId) .Index(t => t.CalculateOnId) .Index(t => t.PersonID) .Index(t => t.LedgerAccountDrId) .Index(t => t.LedgerAccountCrId) .Index(t => t.ContraLedgerAccountId) .Index(t => t.CostCenterId) .Index(t => t.ParentChargeId); CreateTable( "Web.SaleInvoiceReturnLines", c => new { SaleInvoiceReturnLineId = c.Int(nullable: false, identity: true), SaleInvoiceReturnHeaderId = c.Int(nullable: false), SaleInvoiceLineId = c.Int(nullable: false), SaleDispatchReturnLineId = c.Int(), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), UnitConversionMultiplier = c.Decimal(nullable: false, precision: 18, scale: 4), DealUnitId = c.String(nullable: false, maxLength: 3), DealQty = c.Decimal(nullable: false, precision: 18, scale: 4), Weight = c.Decimal(precision: 18, scale: 4), Rate = c.Decimal(nullable: false, precision: 18, scale: 4), DiscountPer = c.Decimal(precision: 18, scale: 4), Amount = c.Decimal(nullable: false, precision: 18, scale: 4), Remark = c.String(), Sr = c.Int(), LockReason = c.String(), LockReasonDelete = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.SaleInvoiceReturnLineId) .ForeignKey("Web.Units", t => t.DealUnitId) .ForeignKey("Web.SaleDispatchReturnLines", t => t.SaleDispatchReturnLineId) .ForeignKey("Web.SaleInvoiceLines", t => t.SaleInvoiceLineId) .ForeignKey("Web.SaleInvoiceReturnHeaders", t => t.SaleInvoiceReturnHeaderId) .Index(t => t.SaleInvoiceReturnHeaderId) .Index(t => t.SaleInvoiceLineId) .Index(t => t.SaleDispatchReturnLineId) .Index(t => t.DealUnitId); CreateTable( "Web.SaleInvoiceReturnLineCharges", c => new { Id = c.Int(nullable: false, identity: true), LineTableId = c.Int(nullable: false), HeaderTableId = c.Int(nullable: false), Sr = c.Int(nullable: false), ChargeId = c.Int(nullable: false), AddDeduct = c.Int(), AffectCost = c.Boolean(nullable: false), ChargeTypeId = c.Int(), CalculateOnId = c.Int(), PersonID = c.Int(), LedgerAccountDrId = c.Int(), LedgerAccountCrId = c.Int(), ContraLedgerAccountId = c.Int(), CostCenterId = c.Int(), RateType = c.Byte(nullable: false), IncludedInBase = c.Boolean(nullable: false), ParentChargeId = c.Int(), Rate = c.Decimal(precision: 18, scale: 4), Amount = c.Decimal(precision: 18, scale: 4), DealQty = c.Decimal(precision: 18, scale: 4), IsVisible = c.Boolean(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.Id) .ForeignKey("Web.Charges", t => t.CalculateOnId) .ForeignKey("Web.Charges", t => t.ChargeId) .ForeignKey("Web.ChargeTypes", t => t.ChargeTypeId) .ForeignKey("Web.LedgerAccounts", t => t.ContraLedgerAccountId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountCrId) .ForeignKey("Web.LedgerAccounts", t => t.LedgerAccountDrId) .ForeignKey("Web.Charges", t => t.ParentChargeId) .ForeignKey("Web.People", t => t.PersonID) .ForeignKey("Web.SaleInvoiceReturnLines", t => t.LineTableId) .Index(t => t.LineTableId) .Index(t => t.ChargeId) .Index(t => t.ChargeTypeId) .Index(t => t.CalculateOnId) .Index(t => t.PersonID) .Index(t => t.LedgerAccountDrId) .Index(t => t.LedgerAccountCrId) .Index(t => t.ContraLedgerAccountId) .Index(t => t.CostCenterId) .Index(t => t.ParentChargeId); CreateTable( "Web.SaleInvoiceSettings", c => new { SaleInvoiceSettingId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), isVisibleDimension1 = c.Boolean(), isVisibleDimension2 = c.Boolean(), isVisiblePromoCode = c.Boolean(), isVisibleLotNo = c.Boolean(), CalculateDiscountOnRate = c.Boolean(nullable: false), filterLedgerAccountGroups = c.String(), filterLedgerAccounts = c.String(), filterProductTypes = c.String(), filterProductGroups = c.String(), filterProducts = c.String(), filterContraDocTypes = c.String(), filterContraSites = c.String(), filterContraDivisions = c.String(), DocTypePackingHeaderId = c.Int(), SaleDispatchDocTypeId = c.Int(), CalculationId = c.Int(nullable: false), SqlProcDocumentPrint = c.String(maxLength: 100), SqlProcDocumentPrint_AfterSubmit = c.String(maxLength: 100), SqlProcDocumentPrint_AfterApprove = c.String(maxLength: 100), SqlProcGatePass = c.String(maxLength: 100), UnitConversionForId = c.Byte(), DocTypeDispatchReturnId = c.Int(), ImportMenuId = c.Int(), isVisibleAgent = c.Boolean(), isVisibleCurrency = c.Boolean(), isVisibleDeliveryTerms = c.Boolean(), isVisibleDealUnit = c.Boolean(), isVisibleShipMethod = c.Boolean(), isVisibleSpecification = c.Boolean(), isVisibleSalesTaxGroup = c.Boolean(), isVisibleProductUid = c.Boolean(), isVisibleProductCode = c.Boolean(), isVisibleBaleNo = c.Boolean(), isVisibleDiscountPer = c.Boolean(), isVisibleForSaleOrder = c.Boolean(), isVisibleWeight = c.Boolean(), CurrencyId = c.Int(nullable: false), ProcessId = c.Int(), DeliveryTermsId = c.Int(nullable: false), ShipMethodId = c.Int(nullable: false), SalesTaxGroupId = c.Int(nullable: false), GodownId = c.Int(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.SaleInvoiceSettingId) .ForeignKey("Web.Calculations", t => t.CalculationId) .ForeignKey("Web.Currencies", t => t.CurrencyId) .ForeignKey("Web.DeliveryTerms", t => t.DeliveryTermsId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeDispatchReturnId) .ForeignKey("Web.DocumentTypes", t => t.DocTypePackingHeaderId) .ForeignKey("Web.Godowns", t => t.GodownId) .ForeignKey("Web.Menus", t => t.ImportMenuId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.DocumentTypes", t => t.SaleDispatchDocTypeId) .ForeignKey("Web.SalesTaxGroups", t => t.SalesTaxGroupId) .ForeignKey("Web.ShipMethods", t => t.ShipMethodId) .ForeignKey("Web.Sites", t => t.SiteId) .ForeignKey("Web.UnitConversionFors", t => t.UnitConversionForId) .Index(t => t.DocTypeId) .Index(t => t.SiteId) .Index(t => t.DivisionId) .Index(t => t.DocTypePackingHeaderId) .Index(t => t.SaleDispatchDocTypeId) .Index(t => t.CalculationId) .Index(t => t.UnitConversionForId) .Index(t => t.DocTypeDispatchReturnId) .Index(t => t.ImportMenuId) .Index(t => t.CurrencyId) .Index(t => t.ProcessId) .Index(t => t.DeliveryTermsId) .Index(t => t.ShipMethodId) .Index(t => t.SalesTaxGroupId) .Index(t => t.GodownId); CreateTable( "Web.SaleOrderAmendmentHeaders", c => new { SaleOrderAmendmentHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(maxLength: 10), DivisionId = c.Int(), SiteId = c.Int(nullable: false), ReasonId = c.Int(nullable: false), BuyerId = c.Int(nullable: false), Status = c.Int(nullable: false), Remark = c.String(), LockReason = c.String(), ReviewCount = c.Int(), ReviewBy = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.SaleOrderAmendmentHeaderId) .ForeignKey("Web.Buyers", t => t.BuyerId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Reasons", t => t.ReasonId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.DocTypeId) .Index(t => t.DivisionId) .Index(t => t.SiteId) .Index(t => t.ReasonId) .Index(t => t.BuyerId); CreateTable( "Web.SaleOrderCancelHeaders", c => new { SaleOrderCancelHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), ReasonId = c.Int(nullable: false), DocNo = c.String(maxLength: 20), DivisionId = c.Int(), BuyerId = c.Int(nullable: false), SiteId = c.Int(nullable: false), Status = c.Int(nullable: false), Remark = c.String(nullable: false), LockReason = c.String(), ReviewCount = c.Int(), ReviewBy = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.SaleOrderCancelHeaderId) .ForeignKey("Web.Buyers", t => t.BuyerId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Reasons", t => t.ReasonId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.DocTypeId) .Index(t => t.ReasonId) .Index(t => t.DivisionId) .Index(t => t.BuyerId) .Index(t => t.SiteId); CreateTable( "Web.SaleOrderCancelLines", c => new { SaleOrderCancelLineId = c.Int(nullable: false, identity: true), SaleOrderLineId = c.Int(nullable: false), SaleOrderCancelHeaderId = c.Int(nullable: false), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), Remark = c.String(), LockReason = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.SaleOrderCancelLineId) .ForeignKey("Web.SaleOrderLines", t => t.SaleOrderLineId) .ForeignKey("Web.SaleOrderCancelHeaders", t => t.SaleOrderCancelHeaderId) .Index(t => t.SaleOrderLineId) .Index(t => t.SaleOrderCancelHeaderId); CreateTable( "Web.SaleOrderLineStatus", c => new { SaleOrderLineId = c.Int(nullable: false), CancelQty = c.Decimal(precision: 18, scale: 4), CancelDate = c.DateTime(), AmendmentQty = c.Decimal(precision: 18, scale: 4), AmendmentDate = c.DateTime(), ShipQty = c.Decimal(precision: 18, scale: 4), ShipDate = c.DateTime(), ReturnQty = c.Decimal(precision: 18, scale: 4), ReturnDate = c.DateTime(), InvoiceQty = c.Decimal(precision: 18, scale: 4), InvoiceDate = c.DateTime(), PaymentQty = c.Decimal(precision: 18, scale: 4), PaymentDate = c.DateTime(), ExcessSaleDispatchReviewBy = c.String(maxLength: 100), }) .PrimaryKey(t => t.SaleOrderLineId) .ForeignKey("Web.SaleOrderLines", t => t.SaleOrderLineId) .Index(t => t.SaleOrderLineId); CreateTable( "Web.SaleOrderQtyAmendmentLines", c => new { SaleOrderQtyAmendmentLineId = c.Int(nullable: false, identity: true), SaleOrderAmendmentHeaderId = c.Int(nullable: false), SaleOrderLineId = c.Int(nullable: false), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), Remark = c.String(), LockReason = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.SaleOrderQtyAmendmentLineId) .ForeignKey("Web.SaleOrderAmendmentHeaders", t => t.SaleOrderAmendmentHeaderId) .ForeignKey("Web.SaleOrderLines", t => t.SaleOrderLineId) .Index(t => t.SaleOrderAmendmentHeaderId) .Index(t => t.SaleOrderLineId); CreateTable( "Web.SaleOrderRateAmendmentLines", c => new { SaleOrderRateAmendmentLineId = c.Int(nullable: false, identity: true), SaleOrderAmendmentHeaderId = c.Int(nullable: false), SaleOrderLineId = c.Int(nullable: false), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), Rate = c.Decimal(nullable: false, precision: 18, scale: 4), Amount = c.Decimal(nullable: false, precision: 18, scale: 4), Remark = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.SaleOrderRateAmendmentLineId) .ForeignKey("Web.SaleOrderAmendmentHeaders", t => t.SaleOrderAmendmentHeaderId) .ForeignKey("Web.SaleOrderLines", t => t.SaleOrderLineId) .Index(t => t.SaleOrderAmendmentHeaderId) .Index(t => t.SaleOrderLineId); CreateTable( "Web.SaleOrderSettings", c => new { SaleOrderSettingsId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), Priority = c.Int(nullable: false), ShipMethodId = c.Int(nullable: false), CurrencyId = c.Int(nullable: false), DeliveryTermsId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), UnitConversionForId = c.Byte(nullable: false), isVisibleCurrency = c.Boolean(), isVisibleShipMethod = c.Boolean(), isVisibleDeliveryTerms = c.Boolean(), isVisiblePriority = c.Boolean(), isVisibleDimension1 = c.Boolean(), isVisibleDimension2 = c.Boolean(), isVisibleDealUnit = c.Boolean(), isVisibleSpecification = c.Boolean(), isVisibleProductCode = c.Boolean(), isVisibleUnitConversionFor = c.Boolean(), isVisibleAdvance = c.Boolean(), filterLedgerAccountGroups = c.String(), filterLedgerAccounts = c.String(), filterProductTypes = c.String(), filterProductGroups = c.String(), filterProducts = c.String(), SqlProcDocumentPrint = c.String(maxLength: 100), SqlProcDocumentPrint_AfterSubmit = c.String(maxLength: 100), SqlProcDocumentPrint_AfterApprove = c.String(maxLength: 100), ImportMenuId = c.Int(), CalculationId = c.Int(), ProcessId = c.Int(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.SaleOrderSettingsId) .ForeignKey("Web.Calculations", t => t.CalculationId) .ForeignKey("Web.Currencies", t => t.CurrencyId) .ForeignKey("Web.DeliveryTerms", t => t.DeliveryTermsId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Menus", t => t.ImportMenuId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.ShipMethods", t => t.ShipMethodId) .ForeignKey("Web.Sites", t => t.SiteId) .ForeignKey("Web.UnitConversionFors", t => t.UnitConversionForId) .Index(t => t.DocTypeId) .Index(t => t.ShipMethodId) .Index(t => t.CurrencyId) .Index(t => t.DeliveryTermsId) .Index(t => t.SiteId) .Index(t => t.DivisionId) .Index(t => t.UnitConversionForId) .Index(t => t.ImportMenuId) .Index(t => t.CalculationId) .Index(t => t.ProcessId); CreateTable( "Web.SchemeDateDetails", c => new { SchemeDateDetailId = c.Int(nullable: false, identity: true), SchemeId = c.Int(nullable: false), ReceiveFromDate = c.DateTime(nullable: false), ReceiveToDate = c.DateTime(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.SchemeDateDetailId) .ForeignKey("Web.SchemeHeaders", t => t.SchemeId) .Index(t => t.SchemeId); CreateTable( "Web.SchemeHeaders", c => new { SchemeId = c.Int(nullable: false, identity: true), SchemeName = c.String(nullable: false, maxLength: 100), ProcessId = c.Int(nullable: false), OrderFromDate = c.DateTime(nullable: false), OrderToDate = c.DateTime(nullable: false), ApplicableOn = c.String(nullable: false, maxLength: 100), ApplicableValues = c.String(), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.SchemeId) .ForeignKey("Web.Processes", t => t.ProcessId) .Index(t => t.SchemeName, unique: true, name: "IX_Scheme_SchemeName") .Index(t => t.ProcessId); CreateTable( "Web.SchemeRateDetails", c => new { SchemeRateDetailId = c.Int(nullable: false, identity: true), SchemeId = c.Int(nullable: false), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), UnitId = c.String(nullable: false, maxLength: 3), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.SchemeRateDetailId) .ForeignKey("Web.SchemeHeaders", t => t.SchemeId) .ForeignKey("Web.Units", t => t.UnitId) .Index(t => t.SchemeId) .Index(t => t.UnitId); CreateTable( "Web.StockAdjs", c => new { StockAdjId = c.Int(nullable: false, identity: true), StockInId = c.Int(nullable: false), StockOutId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), AdjustedQty = c.Decimal(nullable: false, precision: 18, scale: 4), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.StockAdjId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.Sites", t => t.SiteId) .ForeignKey("Web.Stocks", t => t.StockInId) .ForeignKey("Web.Stocks", t => t.StockOutId) .Index(t => t.StockInId) .Index(t => t.StockOutId) .Index(t => new { t.DivisionId, t.SiteId }, unique: true, name: "IX_Stock_DocID"); CreateTable( "Web.StockBalances", c => new { StockBalanceId = c.Int(nullable: false, identity: true), ProductId = c.Int(nullable: false), Dimension1Id = c.Int(), Dimension2Id = c.Int(), ProcessId = c.Int(), GodownId = c.Int(nullable: false), CostCenterId = c.Int(), LotNo = c.String(maxLength: 50), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.StockBalanceId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.Godowns", t => t.GodownId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.Products", t => t.ProductId) .Index(t => t.ProductId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id) .Index(t => t.ProcessId) .Index(t => t.GodownId) .Index(t => t.CostCenterId); CreateTable( "Web.StockInHandSettings", c => new { StockInHandSettingId = c.Int(nullable: false, identity: true), UserName = c.String(), FromDate = c.DateTime(), ToDate = c.DateTime(), DivisionIds = c.String(), SiteIds = c.String(), GroupOn = c.String(), ShowBalance = c.String(), }) .PrimaryKey(t => t.StockInHandSettingId); CreateTable( "Web.StockInOuts", c => new { StockInOutId = c.Int(nullable: false, identity: true), StockOutId = c.Int(nullable: false), StockInId = c.Int(nullable: false), Qty_Adj = c.Decimal(nullable: false, precision: 18, scale: 4), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.StockInOutId) .ForeignKey("Web.Stocks", t => t.StockInId) .ForeignKey("Web.Stocks", t => t.StockOutId) .Index(t => t.StockOutId) .Index(t => t.StockInId); CreateTable( "Web.StockProcessBalances", c => new { StockProcessBalanceId = c.Int(nullable: false, identity: true), ProductId = c.Int(nullable: false), Dimension1Id = c.Int(), Dimension2Id = c.Int(), ProcessId = c.Int(), GodownId = c.Int(), CostCenterId = c.Int(), LotNo = c.String(maxLength: 10), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.StockProcessBalanceId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.Godowns", t => t.GodownId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.Products", t => t.ProductId) .Index(t => t.ProductId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id) .Index(t => t.ProcessId) .Index(t => t.GodownId) .Index(t => t.CostCenterId); CreateTable( "Web.StockUid", c => new { StockUidId = c.Int(nullable: false, identity: true), DocHeaderId = c.Int(nullable: false), DocLineId = c.Int(nullable: false), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), GodownId = c.Int(), ProcessId = c.Int(), ProductUidId = c.Int(nullable: false), Qty_Iss = c.Int(nullable: false), Qty_Rec = c.Int(nullable: false), Remark = c.String(), CreatedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedBy = c.String(), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.StockUidId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Godowns", t => t.GodownId) .ForeignKey("Web.Processes", t => t.ProcessId) .ForeignKey("Web.ProductUids", t => t.ProductUidId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.DocTypeId) .Index(t => t.DivisionId) .Index(t => t.SiteId) .Index(t => t.GodownId) .Index(t => t.ProcessId) .Index(t => t.ProductUidId); CreateTable( "Web.StockVirtual", c => new { DocHeaderId = c.Int(nullable: false, identity: true), DocLineId = c.Int(nullable: false), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), ProductId = c.Int(nullable: false), Qty_Iss = c.Decimal(nullable: false, precision: 18, scale: 4), Qty_Rec = c.Decimal(nullable: false, precision: 18, scale: 4), }) .PrimaryKey(t => t.DocHeaderId); CreateTable( "Web.TdsRates", c => new { TdsRateId = c.Int(nullable: false, identity: true), TdsCategoryId = c.Int(nullable: false), TdsGroupId = c.Int(nullable: false), Percentage = c.Decimal(nullable: false, precision: 18, scale: 4), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.TdsRateId) .ForeignKey("Web.TdsCategories", t => t.TdsCategoryId) .ForeignKey("Web.TdsGroups", t => t.TdsGroupId) .Index(t => t.TdsCategoryId) .Index(t => t.TdsGroupId); CreateTable( "Web.TempUserStores", c => new { TempUserStoreId = c.Int(nullable: false, identity: true), UserId = c.String(nullable: false), UserName = c.String(nullable: false), Password = c.String(nullable: false), Email = c.String(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.TempUserStoreId); CreateTable( "Web.TrialBalanceSettings", c => new { TrialBalanceSettingId = c.Int(nullable: false, identity: true), UserName = c.String(), FromDate = c.DateTime(), ToDate = c.DateTime(), DivisionIds = c.String(), ShowZeroBalance = c.Boolean(nullable: false), SiteIds = c.String(), CostCenter = c.String(), DisplayType = c.String(), DrCr = c.String(), }) .PrimaryKey(t => t.TrialBalanceSettingId); CreateTable( "Web.UnitConversions", c => new { UnitConversionId = c.Int(nullable: false, identity: true), ProductId = c.Int(), UnitConversionForId = c.Byte(nullable: false), FromQty = c.Decimal(nullable: false, precision: 18, scale: 4), FromUnitId = c.String(maxLength: 3), ToQty = c.Decimal(nullable: false, precision: 18, scale: 4), ToUnitId = c.String(maxLength: 3), Description = c.String(maxLength: 100), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.UnitConversionId) .ForeignKey("Web.Units", t => t.FromUnitId) .ForeignKey("Web.Products", t => t.ProductId) .ForeignKey("Web.Units", t => t.ToUnitId) .ForeignKey("Web.UnitConversionFors", t => t.UnitConversionForId) .Index(t => new { t.ProductId, t.UnitConversionForId, t.FromUnitId, t.ToUnitId }, unique: true, name: "IX_UnitConversion_UniqueKey"); CreateTable( "Web.UrgentLists", c => new { Id = c.Int(nullable: false, identity: true), ProductId = c.Int(nullable: false), Qty = c.Decimal(precision: 18, scale: 4), UnplannedQty = c.Decimal(precision: 18, scale: 4), PlannedQty = c.Decimal(precision: 18, scale: 4), InProcessQty = c.Decimal(precision: 18, scale: 4), StockQty = c.Decimal(precision: 18, scale: 4), PackedQty = c.Decimal(precision: 18, scale: 4), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.Id); CreateTable( "Web.UserBookMarks", c => new { UserBookMarkId = c.Int(nullable: false, identity: true), ApplicationUserName = c.String(maxLength: 128), MenuId = c.Int(nullable: false), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.UserBookMarkId) .ForeignKey("Web.Menus", t => t.MenuId) .Index(t => t.MenuId); CreateTable( "Web.UserInfoes", c => new { Id = c.Int(nullable: false, identity: true), FirstName = c.String(), LastName = c.String(), }) .PrimaryKey(t => t.Id); CreateTable( "Web.UserPersons", c => new { UserPersonId = c.Int(nullable: false, identity: true), UserName = c.String(), PersonId = c.Int(nullable: false), CreatedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedBy = c.String(), ModifiedDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.UserPersonId) .ForeignKey("Web.People", t => t.PersonId) .Index(t => t.PersonId); CreateTable( "Web.UserRoles", c => new { UserRoleId = c.Int(nullable: false, identity: true), UserId = c.String(maxLength: 128), RoleId = c.String(maxLength: 128), ExpiryDate = c.DateTime(), }) .PrimaryKey(t => t.UserRoleId) .ForeignKey("Web.Users", t => t.UserId) .Index(t => t.UserId); CreateTable( "Web.ViewJobInvoiceBalance", c => new { JobInvoiceLineId = c.Int(nullable: false, identity: true), JobReceiveHeaderId = c.Int(nullable: false), JobReceiveLineId = c.Int(nullable: false), BalanceQty = c.Decimal(nullable: false, precision: 18, scale: 4), JobInvoiceHeaderId = c.Int(nullable: false), JobInvoiceNo = c.String(), ProductId = c.Int(nullable: false), JobWorkerId = c.Int(nullable: false), InvoiceDate = c.DateTime(nullable: false), JobInvoiceDocTypeId = c.Int(nullable: false), JobReceiveNo = c.String(), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), }) .PrimaryKey(t => t.JobInvoiceLineId); CreateTable( "Web.ViewJobInvoiceBalanceForRateAmendment", c => new { JobInvoiceLineId = c.Int(nullable: false, identity: true), BalanceQty = c.Decimal(nullable: false, precision: 18, scale: 4), Rate = c.Decimal(nullable: false, precision: 18, scale: 4), BalanceAmount = c.Decimal(nullable: false, precision: 18, scale: 4), JobInvoiceHeaderId = c.Int(nullable: false), JobInvoiceNo = c.String(), ProductId = c.Int(nullable: false), JobWorkerId = c.Int(nullable: false), InvoiceDate = c.DateTime(nullable: false), ProductUidId = c.Int(), ProductUidName = c.String(), Dimension1Id = c.Int(), Dimension2Id = c.Int(), ProcessId = c.Int(nullable: false), ProcessName = c.String(), }) .PrimaryKey(t => t.JobInvoiceLineId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.JobWorkers", t => t.JobWorkerId) .ForeignKey("Web.Products", t => t.ProductId) .Index(t => t.ProductId) .Index(t => t.JobWorkerId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id); CreateTable( "Web.ViewJobOrderBalance", c => new { JobOrderLineId = c.Int(nullable: false, identity: true), BalanceQty = c.Decimal(nullable: false, precision: 18, scale: 4), Rate = c.Decimal(nullable: false, precision: 18, scale: 4), BalanceAmount = c.Decimal(nullable: false, precision: 18, scale: 4), JobOrderHeaderId = c.Int(nullable: false), JobOrderNo = c.String(), ProductId = c.Int(nullable: false), JobWorkerId = c.Int(nullable: false), OrderDate = c.DateTime(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), Dimension1Id = c.Int(), Dimension2Id = c.Int(), ProductUidId = c.Int(), }) .PrimaryKey(t => t.JobOrderLineId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.Products", t => t.ProductId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.ProductId) .Index(t => t.SiteId) .Index(t => t.DivisionId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id); CreateTable( "Web.ViewJobOrderBalanceForInspection", c => new { JobOrderLineId = c.Int(nullable: false, identity: true), BalanceQty = c.Decimal(nullable: false, precision: 18, scale: 4), JobOrderHeaderId = c.Int(nullable: false), JobOrderNo = c.String(), ProductId = c.Int(nullable: false), JobWorkerId = c.Int(nullable: false), OrderDate = c.DateTime(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), Dimension1Id = c.Int(), Dimension2Id = c.Int(), ProductUidId = c.Int(), }) .PrimaryKey(t => t.JobOrderLineId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.Products", t => t.ProductId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.ProductId) .Index(t => t.SiteId) .Index(t => t.DivisionId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id); CreateTable( "Web.ViewJobOrderBalanceForInspectionRequest", c => new { JobOrderLineId = c.Int(nullable: false, identity: true), BalanceQty = c.Decimal(nullable: false, precision: 18, scale: 4), JobOrderHeaderId = c.Int(nullable: false), JobOrderNo = c.String(), ProductId = c.Int(nullable: false), JobWorkerId = c.Int(nullable: false), OrderDate = c.DateTime(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), Dimension1Id = c.Int(), Dimension2Id = c.Int(), ProductUidId = c.Int(), }) .PrimaryKey(t => t.JobOrderLineId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.Products", t => t.ProductId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.ProductId) .Index(t => t.SiteId) .Index(t => t.DivisionId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id); CreateTable( "Web.ViewJobOrderBalanceForInvoice", c => new { JobOrderLineId = c.Int(nullable: false, identity: true), BalanceQty = c.Decimal(nullable: false, precision: 18, scale: 4), Rate = c.Decimal(nullable: false, precision: 18, scale: 4), BalanceAmount = c.Decimal(nullable: false, precision: 18, scale: 4), JobOrderHeaderId = c.Int(nullable: false), JobOrderNo = c.String(), ProductId = c.Int(nullable: false), JobWorkerId = c.Int(nullable: false), OrderDate = c.DateTime(nullable: false), Dimension1Id = c.Int(), Dimension2Id = c.Int(), }) .PrimaryKey(t => t.JobOrderLineId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.JobWorkers", t => t.JobWorkerId) .ForeignKey("Web.Products", t => t.ProductId) .Index(t => t.ProductId) .Index(t => t.JobWorkerId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id); CreateTable( "Web.ViewJobOrderBalanceFromStatus", c => new { JobOrderLineId = c.Int(nullable: false, identity: true), BalanceQty = c.Decimal(nullable: false, precision: 18, scale: 4), Rate = c.Decimal(nullable: false, precision: 18, scale: 4), BalanceAmount = c.Decimal(nullable: false, precision: 18, scale: 4), JobOrderHeaderId = c.Int(nullable: false), JobOrderNo = c.String(), ProductId = c.Int(nullable: false), JobWorkerId = c.Int(nullable: false), OrderDate = c.DateTime(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), Dimension1Id = c.Int(), Dimension2Id = c.Int(), ProductUidId = c.Int(), }) .PrimaryKey(t => t.JobOrderLineId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.Products", t => t.ProductId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.ProductId) .Index(t => t.SiteId) .Index(t => t.DivisionId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id); CreateTable( "Web.ViewJobOrderHeader", c => new { JobOrderHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DueDate = c.DateTime(nullable: false), JobWorkerId = c.Int(nullable: false), BillToPartyId = c.Int(nullable: false), OrderById = c.Int(nullable: false), GodownId = c.Int(nullable: false), JobInstructionId = c.Int(nullable: false), TermsAndConditions = c.String(), ProcessId = c.Int(nullable: false), ConstCenterId = c.Int(nullable: false), MachineId = c.Int(nullable: false), Status = c.Int(nullable: false), Remark = c.String(), CreatedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedBy = c.String(), ModifiedDate = c.DateTime(nullable: false), TotalQty = c.Decimal(nullable: false, precision: 18, scale: 4), TotalAmount = c.Decimal(nullable: false, precision: 18, scale: 4), }) .PrimaryKey(t => t.JobOrderHeaderId); CreateTable( "Web.ViewJobOrderInspectionRequestBalance", c => new { JobOrderInspectionRequestLineId = c.Int(nullable: false, identity: true), JobOrderLineId = c.Int(nullable: false), BalanceQty = c.Decimal(nullable: false, precision: 18, scale: 4), JobOrderInspectionRequestHeaderId = c.Int(nullable: false), JobOrderInspectionRequestNo = c.String(), ProductId = c.Int(nullable: false), JobWorkerId = c.Int(nullable: false), RequestDate = c.DateTime(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), Dimension1Id = c.Int(), Dimension2Id = c.Int(), ProductUidId = c.Int(), }) .PrimaryKey(t => t.JobOrderInspectionRequestLineId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.Products", t => t.ProductId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.ProductId) .Index(t => t.SiteId) .Index(t => t.DivisionId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id); CreateTable( "Web.ViewJobOrderLine", c => new { JobOrderLineId = c.Int(nullable: false, identity: true), JobOrderHeaderId = c.Int(nullable: false), OrderQty = c.Decimal(nullable: false, precision: 18, scale: 4), Rate = c.Decimal(nullable: false, precision: 18, scale: 4), OrderAmount = c.Decimal(nullable: false, precision: 18, scale: 4), ProductId = c.Int(nullable: false), DeliveryUnitId = c.String(), Remark = c.String(), }) .PrimaryKey(t => t.JobOrderLineId); CreateTable( "Web.ViewJobReceiveBalance", c => new { JobReceiveLineId = c.Int(nullable: false, identity: true), JobOrderLineId = c.Int(nullable: false), JobOrderHeaderId = c.Int(nullable: false), BalanceQty = c.Decimal(nullable: false, precision: 18, scale: 4), JobReceiveHeaderId = c.Int(nullable: false), JobReceiveNo = c.String(), JobOrderNo = c.String(), ProductId = c.Int(nullable: false), Dimension1Id = c.Int(), Dimension2Id = c.Int(), JobWorkerId = c.Int(nullable: false), OrderDate = c.DateTime(nullable: false), DocTypeId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), }) .PrimaryKey(t => t.JobReceiveLineId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.JobOrderLines", t => t.JobOrderLineId) .ForeignKey("Web.Products", t => t.ProductId) .Index(t => t.JobOrderLineId) .Index(t => t.ProductId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id); CreateTable( "Web.ViewJobReceiveBalanceForInvoice", c => new { JobReceiveLineId = c.Int(nullable: false, identity: true), JobOrderLineId = c.Int(nullable: false), JobOrderHeaderId = c.Int(nullable: false), BalanceQty = c.Decimal(nullable: false, precision: 18, scale: 4), JobReceiveHeaderId = c.Int(nullable: false), JobReceiveNo = c.String(), JobOrderNo = c.String(), ProductId = c.Int(nullable: false), Dimension1Id = c.Int(), Dimension2Id = c.Int(), JobWorkerId = c.Int(nullable: false), OrderDate = c.DateTime(nullable: false), DocTypeId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), }) .PrimaryKey(t => t.JobReceiveLineId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.JobOrderLines", t => t.JobOrderLineId) .ForeignKey("Web.Products", t => t.ProductId) .Index(t => t.JobOrderLineId) .Index(t => t.ProductId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id); CreateTable( "Web.ViewJobReceiveBalanceForQA", c => new { JobReceiveLineId = c.Int(nullable: false, identity: true), BalanceQty = c.Decimal(nullable: false, precision: 18, scale: 4), JobReceiveHeaderId = c.Int(nullable: false), DocTypeId = c.Int(nullable: false), JobReceiveNo = c.String(), ProductId = c.Int(nullable: false), JobWorkerId = c.Int(nullable: false), OrderDate = c.DateTime(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), Dimension1Id = c.Int(), Dimension2Id = c.Int(), ProductUidId = c.Int(), }) .PrimaryKey(t => t.JobReceiveLineId); CreateTable( "Web.ViewMaterialPlanBalance", c => new { MaterialPlanLineId = c.Int(nullable: false, identity: true), BalanceQty = c.Decimal(nullable: false, precision: 18, scale: 4), MaterialPlanHeaderId = c.Int(nullable: false), MaterialPlanNo = c.String(), ProductId = c.Int(nullable: false), MaterialPlanDate = c.DateTime(nullable: false), DocTypeId = c.Int(nullable: false), DocTypeName = c.String(), }) .PrimaryKey(t => t.MaterialPlanLineId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .Index(t => t.DocTypeId); CreateTable( "Web.ViewMaterialRequestBalance", c => new { RequisitionLineId = c.Int(nullable: false, identity: true), BalanceQty = c.Decimal(nullable: false, precision: 18, scale: 4), RequisitionHeaderId = c.Int(nullable: false), MaterialRequestNo = c.String(), PersonId = c.Int(nullable: false), ProductId = c.Int(nullable: false), Dimension1Id = c.Int(), Dimension2Id = c.Int(), MaterialRequestDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.RequisitionLineId); CreateTable( "Web.ViewProdOrderBalance", c => new { ProdOrderLineId = c.Int(nullable: false, identity: true), BalanceQty = c.Decimal(nullable: false, precision: 18, scale: 4), ProdOrderHeaderId = c.Int(nullable: false), ProdOrderNo = c.String(), ProductId = c.Int(nullable: false), IndentDate = c.DateTime(nullable: false), Dimension1Id = c.Int(), Dimension2Id = c.Int(), DocTypeId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), ReferenceDocLineId = c.Int(), ReferenceDocTypeId = c.Int(), }) .PrimaryKey(t => t.ProdOrderLineId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .ForeignKey("Web.Products", t => t.ProductId) .Index(t => t.ProductId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id) .Index(t => t.DocTypeId); CreateTable( "Web.ViewProdOrderBalanceForMPlan", c => new { ProdOrderLineId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), BalanceQty = c.Decimal(nullable: false, precision: 18, scale: 4), ProdOrderHeaderId = c.Int(nullable: false), ProdOrderNo = c.String(), ProductId = c.Int(nullable: false), IndentDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.ProdOrderLineId); CreateTable( "Web.ViewProdOrderHeader", c => new { ProdOrderHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DueDate = c.DateTime(nullable: false), Status = c.Int(nullable: false), Remark = c.String(), CreatedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedBy = c.String(), ModifiedDate = c.DateTime(nullable: false), TotalQty = c.Decimal(nullable: false, precision: 18, scale: 4), }) .PrimaryKey(t => t.ProdOrderHeaderId); CreateTable( "Web.ViewProdOrderLine", c => new { ProdOrderLineId = c.Int(nullable: false, identity: true), ProdOrderHeaderId = c.Int(nullable: false), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), ProductId = c.Int(nullable: false), Remark = c.String(), }) .PrimaryKey(t => t.ProdOrderLineId); CreateTable( "Web.ViewPurchaseGoodsReceiptBalance", c => new { PurchaseGoodsReceiptLineId = c.Int(nullable: false, identity: true), PurchaseOrderHeaderId = c.Int(nullable: false), PurchaseOrderLineId = c.Int(nullable: false), BalanceQty = c.Decimal(nullable: false, precision: 18, scale: 4), BalanceDealQty = c.Decimal(nullable: false, precision: 18, scale: 4), BalanceDocQty = c.Decimal(nullable: false, precision: 18, scale: 4), PurchaseGoodsReceiptHeaderId = c.Int(nullable: false), PurchaseGoodsReceiptNo = c.String(), PurchaseOrderNo = c.String(), ProductId = c.Int(nullable: false), SupplierId = c.Int(nullable: false), OrderDate = c.DateTime(nullable: false), DocTypeId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), }) .PrimaryKey(t => t.PurchaseGoodsReceiptLineId); CreateTable( "Web.ViewPurchaseGoodsReceiptLine", c => new { PurchaseGoodsReceiptLineId = c.Int(nullable: false, identity: true), PurchaseGoodsReceiptHeaderId = c.Int(nullable: false), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), ProductId = c.Int(nullable: false), Remark = c.String(), }) .PrimaryKey(t => t.PurchaseGoodsReceiptLineId); CreateTable( "Web.ViewPurchaseIndentBalance", c => new { PurchaseIndentLineId = c.Int(nullable: false, identity: true), BalanceQty = c.Decimal(nullable: false, precision: 18, scale: 4), PurchaseIndentHeaderId = c.Int(nullable: false), PurchaseIndentNo = c.String(), ProductId = c.Int(nullable: false), IndentDate = c.DateTime(nullable: false), DocTypeId = c.Int(nullable: false), DocTypeName = c.String(), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), }) .PrimaryKey(t => t.PurchaseIndentLineId) .ForeignKey("Web.DocumentTypes", t => t.DocTypeId) .Index(t => t.DocTypeId); CreateTable( "Web.ViewPurchaseIndentHeader", c => new { PurchaseIndentHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), Status = c.String(), Remark = c.String(), CreatedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedBy = c.String(), ModifiedDate = c.DateTime(nullable: false), TotalQty = c.Decimal(nullable: false, precision: 18, scale: 4), }) .PrimaryKey(t => t.PurchaseIndentHeaderId); CreateTable( "Web.ViewPurchaseIndentLine", c => new { PurchaseIndentLineId = c.Int(nullable: false, identity: true), PurchaseIndentHeaderId = c.Int(nullable: false), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), ProductId = c.Int(nullable: false), Remark = c.String(), }) .PrimaryKey(t => t.PurchaseIndentLineId); CreateTable( "Web.ViewPurchaseInvoiceBalance", c => new { PurchaseInvoiceLineId = c.Int(nullable: false, identity: true), PurchaseGoodsReceiptHeaderId = c.Int(nullable: false), PurchaseGoodsReceiptLineId = c.Int(nullable: false), BalanceQty = c.Decimal(nullable: false, precision: 18, scale: 4), PurchaseInvoiceHeaderId = c.Int(nullable: false), PurchaseInvoiceNo = c.String(), ProductId = c.Int(nullable: false), SupplierId = c.Int(nullable: false), OrderDate = c.DateTime(nullable: false), PurchaseInvoiceDocTypeId = c.Int(nullable: false), PurchaseGoodsReceiptNo = c.String(), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), }) .PrimaryKey(t => t.PurchaseInvoiceLineId); CreateTable( "Web.ViewPurchaseOrderBalance", c => new { PurchaseOrderLineId = c.Int(nullable: false, identity: true), BalanceQty = c.Decimal(nullable: false, precision: 18, scale: 4), Rate = c.Decimal(nullable: false, precision: 18, scale: 4), BalanceAmount = c.Decimal(nullable: false, precision: 18, scale: 4), PurchaseOrderHeaderId = c.Int(nullable: false), PurchaseOrderNo = c.String(), ProductId = c.Int(nullable: false), SupplierId = c.Int(nullable: false), OrderDate = c.DateTime(nullable: false), DocTypeId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), }) .PrimaryKey(t => t.PurchaseOrderLineId); CreateTable( "Web.ViewPurchaseOrderBalanceForInvoice", c => new { PurchaseOrderLineId = c.Int(nullable: false, identity: true), BalanceQty = c.Decimal(nullable: false, precision: 18, scale: 4), Rate = c.Decimal(nullable: false, precision: 18, scale: 4), BalanceAmount = c.Decimal(nullable: false, precision: 18, scale: 4), PurchaseOrderHeaderId = c.Int(nullable: false), PurchaseOrderNo = c.String(), ProductId = c.Int(nullable: false), SupplierId = c.Int(nullable: false), OrderDate = c.DateTime(nullable: false), Dimension1Id = c.Int(), Dimension2Id = c.Int(), }) .PrimaryKey(t => t.PurchaseOrderLineId); CreateTable( "Web.ViewPurchaseOrderHeader", c => new { PurchaseOrderHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DueDate = c.DateTime(nullable: false), SupplierId = c.Int(nullable: false), ShipMethodId = c.Int(nullable: false), DeliveryTermsId = c.Int(nullable: false), ShipAddressId = c.Int(nullable: false), SupplierShipDate = c.DateTime(nullable: false), SupplierRemark = c.String(), CreditDays = c.Int(nullable: false), ProgressPer = c.Int(nullable: false), Status = c.String(), Remark = c.String(), CreatedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedBy = c.String(), ModifiedDate = c.DateTime(nullable: false), TotalQty = c.Decimal(nullable: false, precision: 18, scale: 4), TotalAmount = c.Decimal(nullable: false, precision: 18, scale: 4), }) .PrimaryKey(t => t.PurchaseOrderHeaderId); CreateTable( "Web.ViewPurchaseOrderLine", c => new { PurchaseOrderLineId = c.Int(nullable: false, identity: true), PurchaseOrderHeaderId = c.Int(nullable: false), OrderQty = c.Decimal(nullable: false, precision: 18, scale: 4), OrderDeliveryQty = c.Decimal(nullable: false, precision: 18, scale: 4), Rate = c.Decimal(nullable: false, precision: 18, scale: 4), OrderAmount = c.Decimal(nullable: false, precision: 18, scale: 4), ProductId = c.Int(nullable: false), DeliveryUnitId = c.String(), Remark = c.String(), }) .PrimaryKey(t => t.PurchaseOrderLineId); CreateTable( "Web.ViewRequisitionBalance", c => new { RequisitionLineId = c.Int(nullable: false, identity: true), BalanceQty = c.Decimal(nullable: false, precision: 18, scale: 4), RequisitionHeaderId = c.Int(nullable: false), RequisitionNo = c.String(), ProductId = c.Int(nullable: false), PersonId = c.Int(nullable: false), OrderDate = c.DateTime(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), Dimension1Id = c.Int(), Dimension2Id = c.Int(), CostCenterId = c.Int(), }) .PrimaryKey(t => t.RequisitionLineId) .ForeignKey("Web.CostCenters", t => t.CostCenterId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.People", t => t.PersonId) .ForeignKey("Web.Products", t => t.ProductId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => t.ProductId) .Index(t => t.PersonId) .Index(t => t.SiteId) .Index(t => t.DivisionId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id) .Index(t => t.CostCenterId); CreateTable( "Web._Roles", c => new { Id = c.String(nullable: false, maxLength: 128), Name = c.String(), }) .PrimaryKey(t => t.Id); CreateTable( "Web.ViewRugArea", c => new { ProductId = c.Int(nullable: false, identity: true), ProductName = c.String(), SizeId = c.Int(nullable: false), ProductShapeId = c.Int(nullable: false), SizeName = c.String(), Area = c.Decimal(nullable: false, precision: 18, scale: 4), UnitId = c.String(), SqYardPerPcs = c.Decimal(nullable: false, precision: 18, scale: 4), }) .PrimaryKey(t => t.ProductId); CreateTable( "Web.ViewRugSize", c => new { ProductId = c.Int(nullable: false, identity: true), StandardSizeID = c.Int(), StandardSizeName = c.String(), StandardSizeArea = c.Decimal(precision: 18, scale: 4), ManufaturingSizeID = c.Int(), ManufaturingSizeName = c.String(), ManufaturingSizeArea = c.Decimal(precision: 18, scale: 4), FinishingSizeID = c.Int(), FinishingSizeName = c.String(), FinishingSizeArea = c.Decimal(precision: 18, scale: 4), StencilSizeId = c.Int(), StencilSizeName = c.String(), StencilSizeArea = c.Decimal(precision: 18, scale: 4), MapSizeId = c.Int(), MapSizeName = c.String(), MapSizeArea = c.Decimal(precision: 18, scale: 4), }) .PrimaryKey(t => t.ProductId); CreateTable( "Web.ViewSaleDeliveryOrderBalance", c => new { SaleDeliveryOrderLineId = c.Int(nullable: false, identity: true), OrderQty = c.Decimal(nullable: false, precision: 18, scale: 4), DispatchQty = c.Decimal(nullable: false, precision: 18, scale: 4), BalanceQty = c.Decimal(nullable: false, precision: 18, scale: 4), SaleOrderLineId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), SaleDeliveryOrderHeaderId = c.Int(nullable: false), SaleDeliveryOrderNo = c.String(), BuyerId = c.Int(nullable: false), DueDate = c.DateTime(nullable: false), Priority = c.Int(nullable: false), }) .PrimaryKey(t => t.SaleDeliveryOrderLineId); CreateTable( "Web.ViewSaleDispatchBalance", c => new { SaleDispatchLineId = c.Int(nullable: false, identity: true), SaleOrderHeaderId = c.Int(nullable: false), SaleOrderLineId = c.Int(nullable: false), BalanceQty = c.Decimal(nullable: false, precision: 18, scale: 4), BalanceDealQty = c.Decimal(nullable: false, precision: 18, scale: 4), BalanceDocQty = c.Decimal(nullable: false, precision: 18, scale: 4), SaleDispatchHeaderId = c.Int(nullable: false), SaleDispatchNo = c.String(), SaleOrderNo = c.String(), ProductId = c.Int(nullable: false), Dimension1Id = c.Int(), Dimension2Id = c.Int(), BuyerId = c.Int(nullable: false), OrderDate = c.DateTime(nullable: false), DocTypeId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), Rate = c.Decimal(precision: 18, scale: 4), }) .PrimaryKey(t => t.SaleDispatchLineId); CreateTable( "Web.ViewSaleInvoiceBalance", c => new { SaleInvoiceLineId = c.Int(nullable: false, identity: true), SaleDispatchHeaderId = c.Int(nullable: false), SaleDispatchLineId = c.Int(nullable: false), BalanceQty = c.Decimal(nullable: false, precision: 18, scale: 4), SaleInvoiceHeaderId = c.Int(nullable: false), SaleInvoiceNo = c.String(), ProductId = c.Int(nullable: false), SaleToBuyerId = c.Int(nullable: false), OrderDate = c.DateTime(nullable: false), SaleInvoiceDocTypeId = c.Int(nullable: false), SaleDispatchNo = c.String(), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), }) .PrimaryKey(t => t.SaleInvoiceLineId); CreateTable( "Web.ViewSaleInvoiceLine", c => new { SaleInvoiceHeaderId = c.Int(nullable: false, identity: true), SaleInvoiceLineId = c.Int(nullable: false), ProductUidId = c.Int(), ProductID = c.Int(nullable: false), Dimension1Id = c.Int(), Dimension2Id = c.Int(), Specification = c.String(), SaleOrderLineId = c.Int(nullable: false), Qty = c.Decimal(nullable: false, precision: 18, scale: 4), BaleNo = c.String(), ProductInvoiceGroupId = c.Int(), DealQty = c.Decimal(nullable: false, precision: 18, scale: 4), DealUnitId = c.String(), GrossWeight = c.Decimal(nullable: false, precision: 18, scale: 4), NetWeight = c.Decimal(nullable: false, precision: 18, scale: 4), Rate = c.Decimal(nullable: false, precision: 18, scale: 4), Amount = c.Decimal(nullable: false, precision: 18, scale: 4), Sr = c.Int(nullable: false), Remark = c.String(), }) .PrimaryKey(t => t.SaleInvoiceHeaderId); CreateTable( "Web.ViewSaleOrderBalance", c => new { SaleOrderLineId = c.Int(nullable: false, identity: true), BalanceQty = c.Decimal(nullable: false, precision: 18, scale: 4), Rate = c.Decimal(nullable: false, precision: 18, scale: 4), BalanceAmount = c.Decimal(nullable: false, precision: 18, scale: 4), SaleOrderHeaderId = c.Int(nullable: false), Dimension1Id = c.Int(), Dimension2Id = c.Int(), SiteId = c.Int(nullable: false), DivisionId = c.Int(nullable: false), SaleOrderNo = c.String(), ProductId = c.Int(nullable: false), BuyerId = c.Int(nullable: false), OrderDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.SaleOrderLineId) .ForeignKey("Web.Dimension1", t => t.Dimension1Id) .ForeignKey("Web.Dimension2", t => t.Dimension2Id) .ForeignKey("Web.Products", t => t.ProductId) .Index(t => t.Dimension1Id) .Index(t => t.Dimension2Id) .Index(t => t.ProductId); CreateTable( "Web.ViewSaleOrderBalanceForCancellation", c => new { SaleOrderLineId = c.Int(nullable: false, identity: true), BalanceQty = c.Decimal(nullable: false, precision: 18, scale: 4), Rate = c.Decimal(nullable: false, precision: 18, scale: 4), BalanceAmount = c.Decimal(nullable: false, precision: 18, scale: 4), SaleOrderHeaderId = c.Int(nullable: false), SaleOrderNo = c.String(), ProductId = c.Int(nullable: false), Dimension1Id = c.Int(), Dimension2Id = c.Int(), BuyerId = c.Int(nullable: false), OrderDate = c.DateTime(nullable: false), }) .PrimaryKey(t => t.SaleOrderLineId) .ForeignKey("Web.Products", t => t.ProductId) .Index(t => t.ProductId); CreateTable( "Web.ViewSaleOrderHeader", c => new { SaleOrderHeaderId = c.Int(nullable: false, identity: true), DocTypeId = c.Int(nullable: false), DocDate = c.DateTime(nullable: false), DocNo = c.String(), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), DueDate = c.DateTime(nullable: false), SaleToBuyerId = c.Int(nullable: false), BillToBuyerId = c.Int(nullable: false), CurrencyId = c.Int(nullable: false), Priority = c.Int(nullable: false), ShipMethodId = c.Int(nullable: false), ShipAddress = c.String(), DeliveryTermsId = c.Int(nullable: false), Status = c.Int(nullable: false), Remark = c.String(), BuyerOrderNo = c.String(), CreatedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedBy = c.String(), ModifiedDate = c.DateTime(nullable: false), TotalQty = c.Decimal(nullable: false, precision: 18, scale: 4), TotalAmount = c.Decimal(nullable: false, precision: 18, scale: 4), }) .PrimaryKey(t => t.SaleOrderHeaderId); CreateTable( "Web.ViewSaleOrderLine", c => new { SaleOrderLineId = c.Int(nullable: false, identity: true), SaleOrderHeaderId = c.Int(nullable: false), OrderQty = c.Decimal(nullable: false, precision: 18, scale: 4), Rate = c.Decimal(nullable: false, precision: 18, scale: 4), Amount = c.Decimal(nullable: false, precision: 18, scale: 4), ProductId = c.Int(nullable: false), Specification = c.String(), DeliveryUnitId = c.Int(nullable: false), Remark = c.String(), }) .PrimaryKey(t => t.SaleOrderLineId); CreateTable( "Web.ViewStockInBalance", c => new { StockInId = c.Int(nullable: false, identity: true), StockInNo = c.String(), StockInDate = c.DateTime(nullable: false), PersonId = c.Int(), ProductId = c.Int(nullable: false), Dimension1Id = c.Int(), Dimension2Id = c.Int(), LotNo = c.String(), BalanceQty = c.Decimal(nullable: false, precision: 18, scale: 4), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), }) .PrimaryKey(t => t.StockInId); CreateTable( "Web.WeavingRetensions", c => new { WeavingRetensionId = c.Int(nullable: false, identity: true), DivisionId = c.Int(nullable: false), SiteId = c.Int(nullable: false), ProductCategoryId = c.Int(), RetensionPer = c.Decimal(nullable: false, precision: 18, scale: 4), MinimumAmount = c.Decimal(nullable: false, precision: 18, scale: 4), CreatedBy = c.String(), ModifiedBy = c.String(), CreatedDate = c.DateTime(nullable: false), ModifiedDate = c.DateTime(nullable: false), OMSId = c.String(maxLength: 50), }) .PrimaryKey(t => t.WeavingRetensionId) .ForeignKey("Web.Divisions", t => t.DivisionId) .ForeignKey("Web.ProductCategories", t => t.ProductCategoryId) .ForeignKey("Web.Sites", t => t.SiteId) .Index(t => new { t.DivisionId, t.SiteId }, unique: true, name: "IX_WeavingRetension_DocID") .Index(t => t.ProductCategoryId); CreateTable( "Web.FinishedProduct", c => new { ProductId = c.Int(nullable: false), IsSample = c.Boolean(nullable: false), ProductCategoryId = c.Int(), ProductCollectionId = c.Int(), ProductQualityId = c.Int(), ProductDesignId = c.Int(), ProductDesignPatternId = c.Int(), ColourId = c.Int(), FaceContentId = c.Int(), ContentId = c.Int(), ProductInvoiceGroupId = c.Int(), ProcessSequenceHeaderId = c.Int(), ProductManufacturerId = c.Int(), ProductStyleId = c.Int(), DescriptionOfGoodsId = c.Int(), OriginCountryId = c.Int(), ProductShapeId = c.Int(), SampleId = c.Int(), CounterNo = c.Int(), DiscontinuedDate = c.DateTime(), MapScale = c.Int(), TraceType = c.String(), MapType = c.String(), ProductionRemark = c.String(), }) .PrimaryKey(t => t.ProductId) .ForeignKey("Web.Products", t => t.ProductId) .ForeignKey("Web.ProductCategories", t => t.ProductCategoryId) .ForeignKey("Web.ProductCollections", t => t.ProductCollectionId) .ForeignKey("Web.ProductQualities", t => t.ProductQualityId) .ForeignKey("Web.ProductDesigns", t => t.ProductDesignId) .ForeignKey("Web.ProductDesignPatterns", t => t.ProductDesignPatternId) .ForeignKey("Web.Colours", t => t.ColourId) .ForeignKey("Web.ProductContentHeaders", t => t.FaceContentId) .ForeignKey("Web.ProductContentHeaders", t => t.ContentId) .ForeignKey("Web.ProductInvoiceGroups", t => t.ProductInvoiceGroupId) .ForeignKey("Web.ProcessSequenceHeaders", t => t.ProcessSequenceHeaderId) .ForeignKey("Web.ProductManufacturer", t => t.ProductManufacturerId) .ForeignKey("Web.ProductStyles", t => t.ProductStyleId) .ForeignKey("Web.DescriptionOfGoods", t => t.DescriptionOfGoodsId) .ForeignKey("Web.Countries", t => t.OriginCountryId) .ForeignKey("Web.ProductTypes", t => t.ProductShapeId) .ForeignKey("Web.Products", t => t.SampleId) .Index(t => t.ProductId) .Index(t => t.ProductCategoryId) .Index(t => t.ProductCollectionId) .Index(t => t.ProductQualityId) .Index(t => t.ProductDesignId) .Index(t => t.ProductDesignPatternId) .Index(t => t.ColourId) .Index(t => t.FaceContentId) .Index(t => t.ContentId) .Index(t => t.ProductInvoiceGroupId) .Index(t => t.ProcessSequenceHeaderId) .Index(t => t.ProductManufacturerId) .Index(t => t.ProductStyleId) .Index(t => t.DescriptionOfGoodsId) .Index(t => t.OriginCountryId) .Index(t => t.ProductShapeId) .Index(t => t.SampleId); CreateTable( "Web.SaleInvoiceHeaderDetail", c => new { SaleInvoiceHeaderId = c.Int(nullable: false), BLNo = c.String(maxLength: 20), BLDate = c.DateTime(nullable: false), PrivateMark = c.String(maxLength: 20), PortOfLoading = c.String(maxLength: 50), DestinationPort = c.String(maxLength: 50), FinalPlaceOfDelivery = c.String(maxLength: 50), PreCarriageBy = c.String(maxLength: 50), PlaceOfPreCarriage = c.String(maxLength: 50), CircularNo = c.String(maxLength: 50), CircularDate = c.DateTime(nullable: false), OrderNo = c.String(maxLength: 50), OrderDate = c.DateTime(nullable: false), BaleNoSeries = c.String(), DescriptionOfGoods = c.String(), PackingMaterialDescription = c.String(), KindsOfackages = c.Decimal(nullable: false, precision: 18, scale: 4), Compositions = c.String(), OtherRefrence = c.String(), TermsOfSale = c.String(), NotifyParty = c.String(), TransporterInformation = c.String(), InvoiceAmount = c.Decimal(precision: 18, scale: 4), Freight = c.Decimal(precision: 18, scale: 4), VehicleNo = c.String(), }) .PrimaryKey(t => t.SaleInvoiceHeaderId) .ForeignKey("Web.SaleInvoiceHeaders", t => t.SaleInvoiceHeaderId) .Index(t => t.SaleInvoiceHeaderId); CreateTable( "Web.ProductManufacturer", c => new { PersonID = c.Int(nullable: false), }) .PrimaryKey(t => t.PersonID) .ForeignKey("Web.People", t => t.PersonID) .Index(t => t.PersonID); } public override void Down() { DropForeignKey("Web.ProductManufacturer", "PersonID", "Web.People"); DropForeignKey("Web.SaleInvoiceHeaderDetail", "SaleInvoiceHeaderId", "Web.SaleInvoiceHeaders"); DropForeignKey("Web.FinishedProduct", "SampleId", "Web.Products"); DropForeignKey("Web.FinishedProduct", "ProductShapeId", "Web.ProductTypes"); DropForeignKey("Web.FinishedProduct", "OriginCountryId", "Web.Countries"); DropForeignKey("Web.FinishedProduct", "DescriptionOfGoodsId", "Web.DescriptionOfGoods"); DropForeignKey("Web.FinishedProduct", "ProductStyleId", "Web.ProductStyles"); DropForeignKey("Web.FinishedProduct", "ProductManufacturerId", "Web.ProductManufacturer"); DropForeignKey("Web.FinishedProduct", "ProcessSequenceHeaderId", "Web.ProcessSequenceHeaders"); DropForeignKey("Web.FinishedProduct", "ProductInvoiceGroupId", "Web.ProductInvoiceGroups"); DropForeignKey("Web.FinishedProduct", "ContentId", "Web.ProductContentHeaders"); DropForeignKey("Web.FinishedProduct", "FaceContentId", "Web.ProductContentHeaders"); DropForeignKey("Web.FinishedProduct", "ColourId", "Web.Colours"); DropForeignKey("Web.FinishedProduct", "ProductDesignPatternId", "Web.ProductDesignPatterns"); DropForeignKey("Web.FinishedProduct", "ProductDesignId", "Web.ProductDesigns"); DropForeignKey("Web.FinishedProduct", "ProductQualityId", "Web.ProductQualities"); DropForeignKey("Web.FinishedProduct", "ProductCollectionId", "Web.ProductCollections"); DropForeignKey("Web.FinishedProduct", "ProductCategoryId", "Web.ProductCategories"); DropForeignKey("Web.FinishedProduct", "ProductId", "Web.Products"); DropForeignKey("Web.WeavingRetensions", "SiteId", "Web.Sites"); DropForeignKey("Web.WeavingRetensions", "ProductCategoryId", "Web.ProductCategories"); DropForeignKey("Web.WeavingRetensions", "DivisionId", "Web.Divisions"); DropForeignKey("Web.ViewSaleOrderBalanceForCancellation", "ProductId", "Web.Products"); DropForeignKey("Web.ViewSaleOrderBalance", "ProductId", "Web.Products"); DropForeignKey("Web.ViewSaleOrderBalance", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.ViewSaleOrderBalance", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.ViewRequisitionBalance", "SiteId", "Web.Sites"); DropForeignKey("Web.ViewRequisitionBalance", "ProductId", "Web.Products"); DropForeignKey("Web.ViewRequisitionBalance", "PersonId", "Web.People"); DropForeignKey("Web.ViewRequisitionBalance", "DivisionId", "Web.Divisions"); DropForeignKey("Web.ViewRequisitionBalance", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.ViewRequisitionBalance", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.ViewRequisitionBalance", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.ViewPurchaseIndentBalance", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.ViewProdOrderBalance", "ProductId", "Web.Products"); DropForeignKey("Web.ViewProdOrderBalance", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.ViewProdOrderBalance", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.ViewProdOrderBalance", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.ViewMaterialPlanBalance", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.ViewJobReceiveBalanceForInvoice", "ProductId", "Web.Products"); DropForeignKey("Web.ViewJobReceiveBalanceForInvoice", "JobOrderLineId", "Web.JobOrderLines"); DropForeignKey("Web.ViewJobReceiveBalanceForInvoice", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.ViewJobReceiveBalanceForInvoice", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.ViewJobReceiveBalance", "ProductId", "Web.Products"); DropForeignKey("Web.ViewJobReceiveBalance", "JobOrderLineId", "Web.JobOrderLines"); DropForeignKey("Web.ViewJobReceiveBalance", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.ViewJobReceiveBalance", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.ViewJobOrderInspectionRequestBalance", "SiteId", "Web.Sites"); DropForeignKey("Web.ViewJobOrderInspectionRequestBalance", "ProductId", "Web.Products"); DropForeignKey("Web.ViewJobOrderInspectionRequestBalance", "DivisionId", "Web.Divisions"); DropForeignKey("Web.ViewJobOrderInspectionRequestBalance", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.ViewJobOrderInspectionRequestBalance", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.ViewJobOrderBalanceFromStatus", "SiteId", "Web.Sites"); DropForeignKey("Web.ViewJobOrderBalanceFromStatus", "ProductId", "Web.Products"); DropForeignKey("Web.ViewJobOrderBalanceFromStatus", "DivisionId", "Web.Divisions"); DropForeignKey("Web.ViewJobOrderBalanceFromStatus", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.ViewJobOrderBalanceFromStatus", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.ViewJobOrderBalanceForInvoice", "ProductId", "Web.Products"); DropForeignKey("Web.ViewJobOrderBalanceForInvoice", "JobWorkerId", "Web.JobWorkers"); DropForeignKey("Web.ViewJobOrderBalanceForInvoice", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.ViewJobOrderBalanceForInvoice", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.ViewJobOrderBalanceForInspectionRequest", "SiteId", "Web.Sites"); DropForeignKey("Web.ViewJobOrderBalanceForInspectionRequest", "ProductId", "Web.Products"); DropForeignKey("Web.ViewJobOrderBalanceForInspectionRequest", "DivisionId", "Web.Divisions"); DropForeignKey("Web.ViewJobOrderBalanceForInspectionRequest", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.ViewJobOrderBalanceForInspectionRequest", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.ViewJobOrderBalanceForInspection", "SiteId", "Web.Sites"); DropForeignKey("Web.ViewJobOrderBalanceForInspection", "ProductId", "Web.Products"); DropForeignKey("Web.ViewJobOrderBalanceForInspection", "DivisionId", "Web.Divisions"); DropForeignKey("Web.ViewJobOrderBalanceForInspection", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.ViewJobOrderBalanceForInspection", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.ViewJobOrderBalance", "SiteId", "Web.Sites"); DropForeignKey("Web.ViewJobOrderBalance", "ProductId", "Web.Products"); DropForeignKey("Web.ViewJobOrderBalance", "DivisionId", "Web.Divisions"); DropForeignKey("Web.ViewJobOrderBalance", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.ViewJobOrderBalance", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.ViewJobInvoiceBalanceForRateAmendment", "ProductId", "Web.Products"); DropForeignKey("Web.ViewJobInvoiceBalanceForRateAmendment", "JobWorkerId", "Web.JobWorkers"); DropForeignKey("Web.ViewJobInvoiceBalanceForRateAmendment", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.ViewJobInvoiceBalanceForRateAmendment", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.AspNetUserRoles", "IdentityUser_Id", "Web.Users"); DropForeignKey("Web.AspNetUserLogins", "IdentityUser_Id", "Web.Users"); DropForeignKey("Web.AspNetUserClaims", "IdentityUser_Id", "Web.Users"); DropForeignKey("Web.UserRoles", "UserId", "Web.Users"); DropForeignKey("Web.UserPersons", "PersonId", "Web.People"); DropForeignKey("Web.UserBookMarks", "MenuId", "Web.Menus"); DropForeignKey("Web.UnitConversions", "UnitConversionForId", "Web.UnitConversionFors"); DropForeignKey("Web.UnitConversions", "ToUnitId", "Web.Units"); DropForeignKey("Web.UnitConversions", "ProductId", "Web.Products"); DropForeignKey("Web.UnitConversions", "FromUnitId", "Web.Units"); DropForeignKey("Web.TdsRates", "TdsGroupId", "Web.TdsGroups"); DropForeignKey("Web.TdsRates", "TdsCategoryId", "Web.TdsCategories"); DropForeignKey("Web.StockUid", "SiteId", "Web.Sites"); DropForeignKey("Web.StockUid", "ProductUidId", "Web.ProductUids"); DropForeignKey("Web.StockUid", "ProcessId", "Web.Processes"); DropForeignKey("Web.StockUid", "GodownId", "Web.Godowns"); DropForeignKey("Web.StockUid", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.StockUid", "DivisionId", "Web.Divisions"); DropForeignKey("Web.StockProcessBalances", "ProductId", "Web.Products"); DropForeignKey("Web.StockProcessBalances", "ProcessId", "Web.Processes"); DropForeignKey("Web.StockProcessBalances", "GodownId", "Web.Godowns"); DropForeignKey("Web.StockProcessBalances", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.StockProcessBalances", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.StockProcessBalances", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.StockInOuts", "StockOutId", "Web.Stocks"); DropForeignKey("Web.StockInOuts", "StockInId", "Web.Stocks"); DropForeignKey("Web.StockBalances", "ProductId", "Web.Products"); DropForeignKey("Web.StockBalances", "ProcessId", "Web.Processes"); DropForeignKey("Web.StockBalances", "GodownId", "Web.Godowns"); DropForeignKey("Web.StockBalances", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.StockBalances", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.StockBalances", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.StockAdjs", "StockOutId", "Web.Stocks"); DropForeignKey("Web.StockAdjs", "StockInId", "Web.Stocks"); DropForeignKey("Web.StockAdjs", "SiteId", "Web.Sites"); DropForeignKey("Web.StockAdjs", "DivisionId", "Web.Divisions"); DropForeignKey("Web.SchemeRateDetails", "UnitId", "Web.Units"); DropForeignKey("Web.SchemeRateDetails", "SchemeId", "Web.SchemeHeaders"); DropForeignKey("Web.SchemeDateDetails", "SchemeId", "Web.SchemeHeaders"); DropForeignKey("Web.SchemeHeaders", "ProcessId", "Web.Processes"); DropForeignKey("Web.SaleOrderSettings", "UnitConversionForId", "Web.UnitConversionFors"); DropForeignKey("Web.SaleOrderSettings", "SiteId", "Web.Sites"); DropForeignKey("Web.SaleOrderSettings", "ShipMethodId", "Web.ShipMethods"); DropForeignKey("Web.SaleOrderSettings", "ProcessId", "Web.Processes"); DropForeignKey("Web.SaleOrderSettings", "ImportMenuId", "Web.Menus"); DropForeignKey("Web.SaleOrderSettings", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.SaleOrderSettings", "DivisionId", "Web.Divisions"); DropForeignKey("Web.SaleOrderSettings", "DeliveryTermsId", "Web.DeliveryTerms"); DropForeignKey("Web.SaleOrderSettings", "CurrencyId", "Web.Currencies"); DropForeignKey("Web.SaleOrderSettings", "CalculationId", "Web.Calculations"); DropForeignKey("Web.SaleOrderRateAmendmentLines", "SaleOrderLineId", "Web.SaleOrderLines"); DropForeignKey("Web.SaleOrderRateAmendmentLines", "SaleOrderAmendmentHeaderId", "Web.SaleOrderAmendmentHeaders"); DropForeignKey("Web.SaleOrderQtyAmendmentLines", "SaleOrderLineId", "Web.SaleOrderLines"); DropForeignKey("Web.SaleOrderQtyAmendmentLines", "SaleOrderAmendmentHeaderId", "Web.SaleOrderAmendmentHeaders"); DropForeignKey("Web.SaleOrderLineStatus", "SaleOrderLineId", "Web.SaleOrderLines"); DropForeignKey("Web.SaleOrderCancelHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.SaleOrderCancelLines", "SaleOrderCancelHeaderId", "Web.SaleOrderCancelHeaders"); DropForeignKey("Web.SaleOrderCancelLines", "SaleOrderLineId", "Web.SaleOrderLines"); DropForeignKey("Web.SaleOrderCancelHeaders", "ReasonId", "Web.Reasons"); DropForeignKey("Web.SaleOrderCancelHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.SaleOrderCancelHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.SaleOrderCancelHeaders", "BuyerId", "Web.Buyers"); DropForeignKey("Web.SaleOrderAmendmentHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.SaleOrderAmendmentHeaders", "ReasonId", "Web.Reasons"); DropForeignKey("Web.SaleOrderAmendmentHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.SaleOrderAmendmentHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.SaleOrderAmendmentHeaders", "BuyerId", "Web.Buyers"); DropForeignKey("Web.SaleInvoiceSettings", "UnitConversionForId", "Web.UnitConversionFors"); DropForeignKey("Web.SaleInvoiceSettings", "SiteId", "Web.Sites"); DropForeignKey("Web.SaleInvoiceSettings", "ShipMethodId", "Web.ShipMethods"); DropForeignKey("Web.SaleInvoiceSettings", "SalesTaxGroupId", "Web.SalesTaxGroups"); DropForeignKey("Web.SaleInvoiceSettings", "SaleDispatchDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.SaleInvoiceSettings", "ProcessId", "Web.Processes"); DropForeignKey("Web.SaleInvoiceSettings", "ImportMenuId", "Web.Menus"); DropForeignKey("Web.SaleInvoiceSettings", "GodownId", "Web.Godowns"); DropForeignKey("Web.SaleInvoiceSettings", "DocTypePackingHeaderId", "Web.DocumentTypes"); DropForeignKey("Web.SaleInvoiceSettings", "DocTypeDispatchReturnId", "Web.DocumentTypes"); DropForeignKey("Web.SaleInvoiceSettings", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.SaleInvoiceSettings", "DivisionId", "Web.Divisions"); DropForeignKey("Web.SaleInvoiceSettings", "DeliveryTermsId", "Web.DeliveryTerms"); DropForeignKey("Web.SaleInvoiceSettings", "CurrencyId", "Web.Currencies"); DropForeignKey("Web.SaleInvoiceSettings", "CalculationId", "Web.Calculations"); DropForeignKey("Web.SaleInvoiceReturnLineCharges", "LineTableId", "Web.SaleInvoiceReturnLines"); DropForeignKey("Web.SaleInvoiceReturnLineCharges", "PersonID", "Web.People"); DropForeignKey("Web.SaleInvoiceReturnLineCharges", "ParentChargeId", "Web.Charges"); DropForeignKey("Web.SaleInvoiceReturnLineCharges", "LedgerAccountDrId", "Web.LedgerAccounts"); DropForeignKey("Web.SaleInvoiceReturnLineCharges", "LedgerAccountCrId", "Web.LedgerAccounts"); DropForeignKey("Web.SaleInvoiceReturnLineCharges", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.SaleInvoiceReturnLineCharges", "ContraLedgerAccountId", "Web.LedgerAccounts"); DropForeignKey("Web.SaleInvoiceReturnLineCharges", "ChargeTypeId", "Web.ChargeTypes"); DropForeignKey("Web.SaleInvoiceReturnLineCharges", "ChargeId", "Web.Charges"); DropForeignKey("Web.SaleInvoiceReturnLineCharges", "CalculateOnId", "Web.Charges"); DropForeignKey("Web.SaleInvoiceReturnLines", "SaleInvoiceReturnHeaderId", "Web.SaleInvoiceReturnHeaders"); DropForeignKey("Web.SaleInvoiceReturnLines", "SaleInvoiceLineId", "Web.SaleInvoiceLines"); DropForeignKey("Web.SaleInvoiceReturnLines", "SaleDispatchReturnLineId", "Web.SaleDispatchReturnLines"); DropForeignKey("Web.SaleInvoiceReturnLines", "DealUnitId", "Web.Units"); DropForeignKey("Web.SaleInvoiceReturnHeaderCharges", "HeaderTableId", "Web.SaleInvoiceReturnHeaders"); DropForeignKey("Web.SaleInvoiceReturnHeaderCharges", "ProductChargeId", "Web.Charges"); DropForeignKey("Web.SaleInvoiceReturnHeaderCharges", "PersonID", "Web.People"); DropForeignKey("Web.SaleInvoiceReturnHeaderCharges", "ParentChargeId", "Web.Charges"); DropForeignKey("Web.SaleInvoiceReturnHeaderCharges", "LedgerAccountDrId", "Web.LedgerAccounts"); DropForeignKey("Web.SaleInvoiceReturnHeaderCharges", "LedgerAccountCrId", "Web.LedgerAccounts"); DropForeignKey("Web.SaleInvoiceReturnHeaderCharges", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.SaleInvoiceReturnHeaderCharges", "ContraLedgerAccountId", "Web.LedgerAccounts"); DropForeignKey("Web.SaleInvoiceReturnHeaderCharges", "ChargeTypeId", "Web.ChargeTypes"); DropForeignKey("Web.SaleInvoiceReturnHeaderCharges", "ChargeId", "Web.Charges"); DropForeignKey("Web.SaleInvoiceReturnHeaderCharges", "CalculateOnId", "Web.Charges"); DropForeignKey("Web.SaleInvoiceReturnHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.SaleInvoiceReturnHeaders", "SalesTaxGroupPartyId", "Web.SalesTaxGroupParties"); DropForeignKey("Web.SaleInvoiceReturnHeaders", "SalesTaxGroupId", "Web.ChargeGroupPersons"); DropForeignKey("Web.SaleInvoiceReturnHeaders", "SaleDispatchReturnHeaderId", "Web.SaleDispatchReturnHeaders"); DropForeignKey("Web.SaleInvoiceReturnHeaders", "ReasonId", "Web.Reasons"); DropForeignKey("Web.SaleInvoiceReturnHeaders", "LedgerHeaderId", "Web.LedgerHeaders"); DropForeignKey("Web.SaleInvoiceReturnHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.SaleInvoiceReturnHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.SaleInvoiceReturnHeaders", "CurrencyId", "Web.Currencies"); DropForeignKey("Web.SaleInvoiceReturnHeaders", "BuyerId", "Web.Buyers"); DropForeignKey("Web.SaleInvoiceLineCharges", "LineTableId", "Web.SaleInvoiceLines"); DropForeignKey("Web.SaleInvoiceLineCharges", "PersonID", "Web.People"); DropForeignKey("Web.SaleInvoiceLineCharges", "ParentChargeId", "Web.Charges"); DropForeignKey("Web.SaleInvoiceLineCharges", "LedgerAccountDrId", "Web.LedgerAccounts"); DropForeignKey("Web.SaleInvoiceLineCharges", "LedgerAccountCrId", "Web.LedgerAccounts"); DropForeignKey("Web.SaleInvoiceLineCharges", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.SaleInvoiceLineCharges", "ContraLedgerAccountId", "Web.LedgerAccounts"); DropForeignKey("Web.SaleInvoiceLineCharges", "ChargeTypeId", "Web.ChargeTypes"); DropForeignKey("Web.SaleInvoiceLineCharges", "ChargeId", "Web.Charges"); DropForeignKey("Web.SaleInvoiceLineCharges", "CalculateOnId", "Web.Charges"); DropForeignKey("Web.SaleInvoiceHeaderCharges", "HeaderTableId", "Web.SaleInvoiceHeaders"); DropForeignKey("Web.SaleInvoiceHeaderCharges", "ProductChargeId", "Web.Charges"); DropForeignKey("Web.SaleInvoiceHeaderCharges", "PersonID", "Web.People"); DropForeignKey("Web.SaleInvoiceHeaderCharges", "ParentChargeId", "Web.Charges"); DropForeignKey("Web.SaleInvoiceHeaderCharges", "LedgerAccountDrId", "Web.LedgerAccounts"); DropForeignKey("Web.SaleInvoiceHeaderCharges", "LedgerAccountCrId", "Web.LedgerAccounts"); DropForeignKey("Web.SaleInvoiceHeaderCharges", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.SaleInvoiceHeaderCharges", "ContraLedgerAccountId", "Web.LedgerAccounts"); DropForeignKey("Web.SaleInvoiceHeaderCharges", "ChargeTypeId", "Web.ChargeTypes"); DropForeignKey("Web.SaleInvoiceHeaderCharges", "ChargeId", "Web.Charges"); DropForeignKey("Web.SaleInvoiceHeaderCharges", "CalculateOnId", "Web.Charges"); DropForeignKey("Web.SaleDispatchSettings", "UnitConversionForId", "Web.UnitConversionFors"); DropForeignKey("Web.SaleDispatchSettings", "SiteId", "Web.Sites"); DropForeignKey("Web.SaleDispatchSettings", "ShipMethodId", "Web.ShipMethods"); DropForeignKey("Web.SaleDispatchSettings", "ProcessId", "Web.Processes"); DropForeignKey("Web.SaleDispatchSettings", "ImportMenuId", "Web.Menus"); DropForeignKey("Web.SaleDispatchSettings", "GodownId", "Web.Godowns"); DropForeignKey("Web.SaleDispatchSettings", "DocTypePackingHeaderId", "Web.DocumentTypes"); DropForeignKey("Web.SaleDispatchSettings", "DocTypeDispatchReturnId", "Web.DocumentTypes"); DropForeignKey("Web.SaleDispatchSettings", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.SaleDispatchSettings", "DivisionId", "Web.Divisions"); DropForeignKey("Web.SaleDispatchSettings", "DeliveryTermsId", "Web.DeliveryTerms"); DropForeignKey("Web.SaleDispatchReturnLines", "StockId", "Web.Stocks"); DropForeignKey("Web.SaleDispatchReturnLines", "SaleDispatchReturnHeaderId", "Web.SaleDispatchReturnHeaders"); DropForeignKey("Web.SaleDispatchReturnLines", "SaleDispatchLineId", "Web.SaleDispatchLines"); DropForeignKey("Web.SaleDispatchReturnLines", "DealUnitId", "Web.Units"); DropForeignKey("Web.SaleDispatchReturnHeaders", "StockHeaderId", "Web.StockHeaders"); DropForeignKey("Web.SaleDispatchReturnHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.SaleDispatchReturnHeaders", "ReasonId", "Web.Reasons"); DropForeignKey("Web.SaleDispatchReturnHeaders", "GodownId", "Web.Godowns"); DropForeignKey("Web.SaleDispatchReturnHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.SaleDispatchReturnHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.SaleDispatchReturnHeaders", "BuyerId", "Web.Buyers"); DropForeignKey("Web.SaleDeliveryOrderSettings", "SiteId", "Web.Sites"); DropForeignKey("Web.SaleDeliveryOrderSettings", "ImportMenuId", "Web.Menus"); DropForeignKey("Web.SaleDeliveryOrderSettings", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.SaleDeliveryOrderSettings", "DivisionId", "Web.Divisions"); DropForeignKey("Web.SaleDeliveryOrderCancelLines", "SaleDeliveryOrderLineId", "Web.SaleDeliveryOrderLines"); DropForeignKey("Web.SaleDeliveryOrderCancelLines", "SaleDeliveryOrderCancelHeaderId", "Web.SaleDeliveryOrderCancelHeaders"); DropForeignKey("Web.SaleDeliveryOrderCancelLines", "ProductUidId", "Web.ProductUids"); DropForeignKey("Web.SaleDeliveryOrderCancelHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.SaleDeliveryOrderCancelHeaders", "ReasonId", "Web.Reasons"); DropForeignKey("Web.SaleDeliveryOrderCancelHeaders", "OrderById", "Web.Employees"); DropForeignKey("Web.SaleDeliveryOrderCancelHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.SaleDeliveryOrderCancelHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.SaleDeliveryOrderCancelHeaders", "BuyerId", "Web.Buyers"); DropForeignKey("Web.RugStencils", "ProductSizeId", "Web.ProductSizes"); DropForeignKey("Web.RugStencils", "ProductDesignId", "Web.ProductDesigns"); DropForeignKey("Web.RugStencils", "StencilId", "Web.Products"); DropForeignKey("Web.Rug_RetentionPercentage", "SiteId", "Web.Sites"); DropForeignKey("Web.Rug_RetentionPercentage", "ProductCategoryId", "Web.Stocks"); DropForeignKey("Web.Rug_RetentionPercentage", "DivisionId", "Web.Divisions"); DropForeignKey("Web.RouteLines", "RouteId", "Web.Routes"); DropForeignKey("Web.RouteLines", "CityId", "Web.Cities"); DropForeignKey("Web.RolesSites", "SiteId", "Web.Sites"); DropForeignKey("Web.RolesSites", "RoleId", "Web.AspNetRoles"); DropForeignKey("Web.RolesMenus", "SiteId", "Web.Sites"); DropForeignKey("Web.RolesMenus", "RoleId", "Web.AspNetRoles"); DropForeignKey("Web.RolesMenus", "MenuId", "Web.Menus"); DropForeignKey("Web.RolesMenus", "DivisionId", "Web.Divisions"); DropForeignKey("Web.RolesDivisions", "RoleId", "Web.AspNetRoles"); DropForeignKey("Web.RolesDivisions", "DivisionId", "Web.Divisions"); DropForeignKey("Web.RolesControllerActions", "RoleId", "Web.AspNetRoles"); DropForeignKey("Web.RolesControllerActions", "ControllerActionId", "Web.ControllerActions"); DropForeignKey("Web.AspNetUserRoles", "RoleId", "Web.AspNetRoles"); DropForeignKey("Web.RequisitionSettings", "SiteId", "Web.Sites"); DropForeignKey("Web.RequisitionSettings", "DefaultReasonId", "Web.Reasons"); DropForeignKey("Web.RequisitionSettings", "OnSubmitMenuId", "Web.Menus"); DropForeignKey("Web.RequisitionSettings", "OnApproveMenuId", "Web.Menus"); DropForeignKey("Web.RequisitionSettings", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.RequisitionSettings", "DivisionId", "Web.Divisions"); DropForeignKey("Web.RequisitionLineStatus", "RequisitionLineId", "Web.RequisitionLines"); DropForeignKey("Web.RequisitionCancelHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.RequisitionCancelLines", "RequisitionLineId", "Web.RequisitionLines"); DropForeignKey("Web.RequisitionCancelLines", "RequisitionCancelHeaderId", "Web.RequisitionCancelHeaders"); DropForeignKey("Web.RequisitionCancelHeaders", "ReferenceDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.RequisitionCancelHeaders", "ReasonId", "Web.Reasons"); DropForeignKey("Web.RequisitionCancelHeaders", "PersonId", "Web.People"); DropForeignKey("Web.RequisitionCancelHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.RequisitionCancelHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.ReportColumns", "SubReportHeaderId", "Web.ReportHeaders"); DropForeignKey("Web.ReportColumns", "SubReportId", "Web.SubReports"); DropForeignKey("Web.SubReports", "ReportHeaderId", "Web.ReportHeaders"); DropForeignKey("Web.ReportColumns", "ReportHeaderId", "Web.ReportHeaders"); DropForeignKey("Web.ReportLines", "ReportHeaderId", "Web.ReportHeaders"); DropForeignKey("Web.RateListProductRateGroups", "RateListHeaderId", "Web.RateListHeaders"); DropForeignKey("Web.RateListProductRateGroups", "ProductRateGroupId", "Web.ProductRateGroups"); DropForeignKey("Web.RateListPersonRateGroups", "RateListHeaderId", "Web.RateListHeaders"); DropForeignKey("Web.RateListPersonRateGroups", "PersonRateGroupId", "Web.PersonRateGroups"); DropForeignKey("Web.RateListLineHistories", "RateListHeaderId", "Web.RateListHeaders"); DropForeignKey("Web.RateListLineHistories", "ProductRateGroupId", "Web.ProductRateGroups"); DropForeignKey("Web.RateListLineHistories", "ProductId", "Web.Products"); DropForeignKey("Web.RateListLineHistories", "PersonRateGroupId", "Web.PersonRateGroups"); DropForeignKey("Web.RateListLineHistories", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.RateListLineHistories", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.RateListLines", "RateListHeaderId", "Web.RateListHeaders"); DropForeignKey("Web.RateListLines", "ProductRateGroupId", "Web.ProductRateGroups"); DropForeignKey("Web.RateListLines", "ProductId", "Web.Products"); DropForeignKey("Web.RateListLines", "PersonRateGroupId", "Web.PersonRateGroups"); DropForeignKey("Web.RateListLines", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.RateListLines", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.RateListHistories", "ProductId", "Web.Products"); DropForeignKey("Web.RateListHistories", "ProcessId", "Web.Processes"); DropForeignKey("Web.RateListHistories", "PersonRateGroupId", "Web.PersonRateGroups"); DropForeignKey("Web.RateListHistories", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.RateListHistories", "DealUnitId", "Web.Units"); DropForeignKey("Web.RateListHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.RateListHeaders", "ProcessId", "Web.Processes"); DropForeignKey("Web.RateListHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.RateListHeaders", "DealUnitId", "Web.Units"); DropForeignKey("Web.RateLists", "ProductId", "Web.Products"); DropForeignKey("Web.RateLists", "ProcessId", "Web.Processes"); DropForeignKey("Web.RateLists", "PersonRateGroupId", "Web.PersonRateGroups"); DropForeignKey("Web.RateLists", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.RateLists", "DealUnitId", "Web.Units"); DropForeignKey("Web.RateConversionSettings", "SiteId", "Web.Sites"); DropForeignKey("Web.RateConversionSettings", "ProcessId", "Web.Processes"); DropForeignKey("Web.RateConversionSettings", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.RateConversionSettings", "DivisionId", "Web.Divisions"); DropForeignKey("Web.PurchaseQuotationSettings", "UnitConversionForId", "Web.UnitConversionFors"); DropForeignKey("Web.PurchaseQuotationSettings", "SiteId", "Web.Sites"); DropForeignKey("Web.PurchaseQuotationSettings", "OnSubmitMenuId", "Web.Menus"); DropForeignKey("Web.PurchaseQuotationSettings", "OnApproveMenuId", "Web.Menus"); DropForeignKey("Web.PurchaseQuotationSettings", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.PurchaseQuotationSettings", "DivisionId", "Web.Divisions"); DropForeignKey("Web.PurchaseQuotationSettings", "CalculationId", "Web.Calculations"); DropForeignKey("Web.PurchaseQuotationLineCharges", "LineTableId", "Web.PurchaseQuotationLines"); DropForeignKey("Web.PurchaseQuotationLineCharges", "PersonID", "Web.People"); DropForeignKey("Web.PurchaseQuotationLineCharges", "ParentChargeId", "Web.Charges"); DropForeignKey("Web.PurchaseQuotationLineCharges", "LedgerAccountDrId", "Web.LedgerAccounts"); DropForeignKey("Web.PurchaseQuotationLineCharges", "LedgerAccountCrId", "Web.LedgerAccounts"); DropForeignKey("Web.PurchaseQuotationLineCharges", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.PurchaseQuotationLineCharges", "ContraLedgerAccountId", "Web.LedgerAccounts"); DropForeignKey("Web.PurchaseQuotationLineCharges", "ChargeTypeId", "Web.ChargeTypes"); DropForeignKey("Web.PurchaseQuotationLineCharges", "ChargeId", "Web.Charges"); DropForeignKey("Web.PurchaseQuotationLineCharges", "CalculateOnId", "Web.Charges"); DropForeignKey("Web.PurchaseQuotationHeaderCharges", "HeaderTableId", "Web.PurchaseQuotationHeaders"); DropForeignKey("Web.PurchaseQuotationHeaderCharges", "ProductChargeId", "Web.Charges"); DropForeignKey("Web.PurchaseQuotationHeaderCharges", "PersonID", "Web.People"); DropForeignKey("Web.PurchaseQuotationHeaderCharges", "ParentChargeId", "Web.Charges"); DropForeignKey("Web.PurchaseQuotationHeaderCharges", "LedgerAccountDrId", "Web.LedgerAccounts"); DropForeignKey("Web.PurchaseQuotationHeaderCharges", "LedgerAccountCrId", "Web.LedgerAccounts"); DropForeignKey("Web.PurchaseQuotationHeaderCharges", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.PurchaseQuotationHeaderCharges", "ContraLedgerAccountId", "Web.LedgerAccounts"); DropForeignKey("Web.PurchaseQuotationHeaderCharges", "ChargeTypeId", "Web.ChargeTypes"); DropForeignKey("Web.PurchaseQuotationHeaderCharges", "ChargeId", "Web.Charges"); DropForeignKey("Web.PurchaseQuotationHeaderCharges", "CalculateOnId", "Web.Charges"); DropForeignKey("Web.PurchaseQuotationHeaders", "UnitConversionForId", "Web.UnitConversionFors"); DropForeignKey("Web.PurchaseQuotationHeaders", "SupplierId", "Web.Suppliers"); DropForeignKey("Web.PurchaseQuotationHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.PurchaseQuotationHeaders", "ShipMethodId", "Web.ShipMethods"); DropForeignKey("Web.PurchaseQuotationHeaders", "SalesTaxGroupId", "Web.ChargeGroupPersons"); DropForeignKey("Web.PurchaseQuotationLines", "SalesTaxGroupId", "Web.SalesTaxGroups"); DropForeignKey("Web.PurchaseQuotationLines", "PurchaseQuotationHeaderId", "Web.PurchaseQuotationHeaders"); DropForeignKey("Web.PurchaseQuotationLines", "PurchaseIndentLineId", "Web.PurchaseIndentLines"); DropForeignKey("Web.PurchaseQuotationLines", "ProductId", "Web.Products"); DropForeignKey("Web.PurchaseQuotationLines", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.PurchaseQuotationLines", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.PurchaseQuotationLines", "DealUnitId", "Web.Units"); DropForeignKey("Web.PurchaseQuotationHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.PurchaseQuotationHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.PurchaseQuotationHeaders", "DeliveryTermsId", "Web.DeliveryTerms"); DropForeignKey("Web.PurchaseQuotationHeaders", "CurrencyId", "Web.Currencies"); DropForeignKey("Web.PurchaseQuotationHeaders", "BillingAccountId", "Web.Suppliers"); DropForeignKey("Web.PurchaseOrderSettings", "UnitConversionForId", "Web.UnitConversionFors"); DropForeignKey("Web.PurchaseOrderSettings", "SiteId", "Web.Sites"); DropForeignKey("Web.PurchaseOrderSettings", "OnSubmitMenuId", "Web.Menus"); DropForeignKey("Web.PurchaseOrderSettings", "OnApproveMenuId", "Web.Menus"); DropForeignKey("Web.PurchaseOrderSettings", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.PurchaseOrderSettings", "DivisionId", "Web.Divisions"); DropForeignKey("Web.PurchaseOrderSettings", "CalculationId", "Web.Calculations"); DropForeignKey("Web.PurchaseOrderRateAmendmentLineCharges", "LineTableId", "Web.PurchaseOrderRateAmendmentLines"); DropForeignKey("Web.PurchaseOrderRateAmendmentLineCharges", "PersonID", "Web.People"); DropForeignKey("Web.PurchaseOrderRateAmendmentLineCharges", "ParentChargeId", "Web.Charges"); DropForeignKey("Web.PurchaseOrderRateAmendmentLineCharges", "LedgerAccountDrId", "Web.LedgerAccounts"); DropForeignKey("Web.PurchaseOrderRateAmendmentLineCharges", "LedgerAccountCrId", "Web.LedgerAccounts"); DropForeignKey("Web.PurchaseOrderRateAmendmentLineCharges", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.PurchaseOrderRateAmendmentLineCharges", "ContraLedgerAccountId", "Web.LedgerAccounts"); DropForeignKey("Web.PurchaseOrderRateAmendmentLineCharges", "ChargeTypeId", "Web.ChargeTypes"); DropForeignKey("Web.PurchaseOrderRateAmendmentLineCharges", "ChargeId", "Web.Charges"); DropForeignKey("Web.PurchaseOrderRateAmendmentLineCharges", "CalculateOnId", "Web.Charges"); DropForeignKey("Web.PurchaseOrderRateAmendmentLines", "PurchaseOrderLineId", "Web.PurchaseOrderLines"); DropForeignKey("Web.PurchaseOrderRateAmendmentLines", "PurchaseOrderAmendmentHeaderId", "Web.PurchaseOrderAmendmentHeaders"); DropForeignKey("Web.PurchaseOrderQtyAmendmentLines", "PurchaseOrderLineId", "Web.PurchaseOrderLines"); DropForeignKey("Web.PurchaseOrderQtyAmendmentLines", "PurchaseOrderAmendmentHeaderId", "Web.PurchaseOrderAmendmentHeaders"); DropForeignKey("Web.PurchaseOrderLineStatus", "PurchaseOrderLineId", "Web.PurchaseOrderLines"); DropForeignKey("Web.PurchaseOrderLineCharges", "LineTableId", "Web.PurchaseOrderLines"); DropForeignKey("Web.PurchaseOrderLineCharges", "PersonID", "Web.People"); DropForeignKey("Web.PurchaseOrderLineCharges", "ParentChargeId", "Web.Charges"); DropForeignKey("Web.PurchaseOrderLineCharges", "LedgerAccountDrId", "Web.LedgerAccounts"); DropForeignKey("Web.PurchaseOrderLineCharges", "LedgerAccountCrId", "Web.LedgerAccounts"); DropForeignKey("Web.PurchaseOrderLineCharges", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.PurchaseOrderLineCharges", "ContraLedgerAccountId", "Web.LedgerAccounts"); DropForeignKey("Web.PurchaseOrderLineCharges", "ChargeTypeId", "Web.ChargeTypes"); DropForeignKey("Web.PurchaseOrderLineCharges", "ChargeId", "Web.Charges"); DropForeignKey("Web.PurchaseOrderLineCharges", "CalculateOnId", "Web.Charges"); DropForeignKey("Web.PurchaseOrderInspectionSettings", "SiteId", "Web.Sites"); DropForeignKey("Web.PurchaseOrderInspectionSettings", "ProcessId", "Web.Processes"); DropForeignKey("Web.PurchaseOrderInspectionSettings", "ImportMenuId", "Web.Menus"); DropForeignKey("Web.PurchaseOrderInspectionSettings", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.PurchaseOrderInspectionSettings", "DivisionId", "Web.Divisions"); DropForeignKey("Web.PurchaseOrderInspectionRequestSettings", "SiteId", "Web.Sites"); DropForeignKey("Web.PurchaseOrderInspectionRequestSettings", "ProcessId", "Web.Processes"); DropForeignKey("Web.PurchaseOrderInspectionRequestSettings", "ImportMenuId", "Web.Menus"); DropForeignKey("Web.PurchaseOrderInspectionRequestSettings", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.PurchaseOrderInspectionRequestSettings", "DivisionId", "Web.Divisions"); DropForeignKey("Web.PurchaseOrderInspectionRequestCancelLines", "PurchaseOrderInspectionRequestLineId", "Web.PurchaseOrderInspectionRequestLines"); DropForeignKey("Web.PurchaseOrderInspectionRequestCancelLines", "PurchaseOrderInspectionRequestCancelHeaderId", "Web.PurchaseOrderInspectionRequestCancelHeaders"); DropForeignKey("Web.PurchaseOrderInspectionRequestCancelLines", "ProductUidId", "Web.ProductUids"); DropForeignKey("Web.PurchaseOrderInspectionRequestCancelHeaders", "SupplierId", "Web.Suppliers"); DropForeignKey("Web.PurchaseOrderInspectionRequestCancelHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.PurchaseOrderInspectionRequestCancelHeaders", "ReasonId", "Web.Reasons"); DropForeignKey("Web.PurchaseOrderInspectionRequestCancelHeaders", "ProcessId", "Web.Processes"); DropForeignKey("Web.PurchaseOrderInspectionRequestCancelHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.PurchaseOrderInspectionRequestCancelHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.PurchaseOrderInspectionLines", "ReferenceDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.PurchaseOrderInspectionLines", "PurchaseOrderLineId", "Web.PurchaseOrderLines"); DropForeignKey("Web.PurchaseOrderInspectionLines", "PurchaseOrderInspectionRequestLineId", "Web.PurchaseOrderInspectionRequestLines"); DropForeignKey("Web.PurchaseOrderInspectionRequestLines", "PurchaseOrderLineId", "Web.PurchaseOrderLines"); DropForeignKey("Web.PurchaseOrderInspectionRequestLines", "PurchaseOrderInspectionRequestHeaderId", "Web.PurchaseOrderInspectionRequestHeaders"); DropForeignKey("Web.PurchaseOrderInspectionRequestHeaders", "SupplierId", "Web.Suppliers"); DropForeignKey("Web.PurchaseOrderInspectionRequestHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.PurchaseOrderInspectionRequestHeaders", "ProcessId", "Web.Processes"); DropForeignKey("Web.PurchaseOrderInspectionRequestHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.PurchaseOrderInspectionRequestHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.PurchaseOrderInspectionRequestLines", "ProductUidId", "Web.ProductUids"); DropForeignKey("Web.PurchaseOrderInspectionLines", "PurchaseOrderInspectionHeaderId", "Web.PurchaseOrderInspectionHeaders"); DropForeignKey("Web.PurchaseOrderInspectionLines", "ProductUidId", "Web.ProductUids"); DropForeignKey("Web.PurchaseOrderInspectionHeaders", "SupplierId", "Web.Suppliers"); DropForeignKey("Web.PurchaseOrderInspectionHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.PurchaseOrderInspectionHeaders", "ReferenceDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.PurchaseOrderInspectionHeaders", "ProcessId", "Web.Processes"); DropForeignKey("Web.PurchaseOrderInspectionHeaders", "InspectionById", "Web.Employees"); DropForeignKey("Web.PurchaseOrderInspectionHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.PurchaseOrderInspectionHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.PurchaseOrderHeaderStatus", "PurchaseOrderHeaderId", "Web.PurchaseOrderHeaders"); DropForeignKey("Web.PurchaseOrderHeaderCharges", "HeaderTableId", "Web.PurchaseOrderHeaders"); DropForeignKey("Web.PurchaseOrderHeaderCharges", "ProductChargeId", "Web.Charges"); DropForeignKey("Web.PurchaseOrderHeaderCharges", "PersonID", "Web.People"); DropForeignKey("Web.PurchaseOrderHeaderCharges", "ParentChargeId", "Web.Charges"); DropForeignKey("Web.PurchaseOrderHeaderCharges", "LedgerAccountDrId", "Web.LedgerAccounts"); DropForeignKey("Web.PurchaseOrderHeaderCharges", "LedgerAccountCrId", "Web.LedgerAccounts"); DropForeignKey("Web.PurchaseOrderHeaderCharges", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.PurchaseOrderHeaderCharges", "ContraLedgerAccountId", "Web.LedgerAccounts"); DropForeignKey("Web.PurchaseOrderHeaderCharges", "ChargeTypeId", "Web.ChargeTypes"); DropForeignKey("Web.PurchaseOrderHeaderCharges", "ChargeId", "Web.Charges"); DropForeignKey("Web.PurchaseOrderHeaderCharges", "CalculateOnId", "Web.Charges"); DropForeignKey("Web.PurchaseOrderAmendmentHeaderCharges", "HeaderTableId", "Web.PurchaseOrderAmendmentHeaders"); DropForeignKey("Web.PurchaseOrderAmendmentHeaderCharges", "ProductChargeId", "Web.Charges"); DropForeignKey("Web.PurchaseOrderAmendmentHeaderCharges", "PersonID", "Web.People"); DropForeignKey("Web.PurchaseOrderAmendmentHeaderCharges", "ParentChargeId", "Web.Charges"); DropForeignKey("Web.PurchaseOrderAmendmentHeaderCharges", "LedgerAccountDrId", "Web.LedgerAccounts"); DropForeignKey("Web.PurchaseOrderAmendmentHeaderCharges", "LedgerAccountCrId", "Web.LedgerAccounts"); DropForeignKey("Web.PurchaseOrderAmendmentHeaderCharges", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.PurchaseOrderAmendmentHeaderCharges", "ContraLedgerAccountId", "Web.LedgerAccounts"); DropForeignKey("Web.PurchaseOrderAmendmentHeaderCharges", "ChargeTypeId", "Web.ChargeTypes"); DropForeignKey("Web.PurchaseOrderAmendmentHeaderCharges", "ChargeId", "Web.Charges"); DropForeignKey("Web.PurchaseOrderAmendmentHeaderCharges", "CalculateOnId", "Web.Charges"); DropForeignKey("Web.PurchaseOrderAmendmentHeaders", "SupplierId", "Web.Suppliers"); DropForeignKey("Web.PurchaseOrderAmendmentHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.PurchaseOrderAmendmentHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.PurchaseOrderAmendmentHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.PurchaseInvoiceSettings", "UnitConversionForId", "Web.UnitConversionFors"); DropForeignKey("Web.PurchaseInvoiceSettings", "SiteId", "Web.Sites"); DropForeignKey("Web.PurchaseInvoiceSettings", "PurchaseGoodsReceiptDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.PurchaseInvoiceSettings", "ImportMenuId", "Web.Menus"); DropForeignKey("Web.PurchaseInvoiceSettings", "DocTypeGoodsReturnId", "Web.DocumentTypes"); DropForeignKey("Web.PurchaseInvoiceSettings", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.PurchaseInvoiceSettings", "DivisionId", "Web.Divisions"); DropForeignKey("Web.PurchaseInvoiceSettings", "CalculationId", "Web.Calculations"); DropForeignKey("Web.PurchaseInvoiceReturnLineCharges", "LineTableId", "Web.PurchaseInvoiceReturnLines"); DropForeignKey("Web.PurchaseInvoiceReturnLineCharges", "PersonID", "Web.People"); DropForeignKey("Web.PurchaseInvoiceReturnLineCharges", "ParentChargeId", "Web.Charges"); DropForeignKey("Web.PurchaseInvoiceReturnLineCharges", "LedgerAccountDrId", "Web.LedgerAccounts"); DropForeignKey("Web.PurchaseInvoiceReturnLineCharges", "LedgerAccountCrId", "Web.LedgerAccounts"); DropForeignKey("Web.PurchaseInvoiceReturnLineCharges", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.PurchaseInvoiceReturnLineCharges", "ContraLedgerAccountId", "Web.LedgerAccounts"); DropForeignKey("Web.PurchaseInvoiceReturnLineCharges", "ChargeTypeId", "Web.ChargeTypes"); DropForeignKey("Web.PurchaseInvoiceReturnLineCharges", "ChargeId", "Web.Charges"); DropForeignKey("Web.PurchaseInvoiceReturnLineCharges", "CalculateOnId", "Web.Charges"); DropForeignKey("Web.PurchaseInvoiceReturnLines", "PurchaseInvoiceReturnHeaderId", "Web.PurchaseInvoiceReturnHeaders"); DropForeignKey("Web.PurchaseInvoiceReturnLines", "PurchaseInvoiceLineId", "Web.PurchaseInvoiceLines"); DropForeignKey("Web.PurchaseInvoiceReturnLines", "PurchaseGoodsReturnLineId", "Web.PurchaseGoodsReturnLines"); DropForeignKey("Web.PurchaseInvoiceReturnLines", "DealUnitId", "Web.Units"); DropForeignKey("Web.PurchaseInvoiceReturnHeaderCharges", "HeaderTableId", "Web.PurchaseInvoiceReturnHeaders"); DropForeignKey("Web.PurchaseInvoiceReturnHeaderCharges", "ProductChargeId", "Web.Charges"); DropForeignKey("Web.PurchaseInvoiceReturnHeaderCharges", "PersonID", "Web.People"); DropForeignKey("Web.PurchaseInvoiceReturnHeaderCharges", "ParentChargeId", "Web.Charges"); DropForeignKey("Web.PurchaseInvoiceReturnHeaderCharges", "LedgerAccountDrId", "Web.LedgerAccounts"); DropForeignKey("Web.PurchaseInvoiceReturnHeaderCharges", "LedgerAccountCrId", "Web.LedgerAccounts"); DropForeignKey("Web.PurchaseInvoiceReturnHeaderCharges", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.PurchaseInvoiceReturnHeaderCharges", "ContraLedgerAccountId", "Web.LedgerAccounts"); DropForeignKey("Web.PurchaseInvoiceReturnHeaderCharges", "ChargeTypeId", "Web.ChargeTypes"); DropForeignKey("Web.PurchaseInvoiceReturnHeaderCharges", "ChargeId", "Web.Charges"); DropForeignKey("Web.PurchaseInvoiceReturnHeaderCharges", "CalculateOnId", "Web.Charges"); DropForeignKey("Web.PurchaseInvoiceReturnHeaders", "SupplierId", "Web.Suppliers"); DropForeignKey("Web.PurchaseInvoiceReturnHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.PurchaseInvoiceReturnHeaders", "SalesTaxGroupPartyId", "Web.SalesTaxGroupParties"); DropForeignKey("Web.PurchaseInvoiceReturnHeaders", "SalesTaxGroupId", "Web.ChargeGroupPersons"); DropForeignKey("Web.PurchaseInvoiceReturnHeaders", "ReasonId", "Web.Reasons"); DropForeignKey("Web.PurchaseInvoiceReturnHeaders", "PurchaseGoodsReturnHeaderId", "Web.PurchaseGoodsReturnHeaders"); DropForeignKey("Web.PurchaseInvoiceReturnHeaders", "LedgerHeaderId", "Web.LedgerHeaders"); DropForeignKey("Web.PurchaseInvoiceReturnHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.PurchaseInvoiceReturnHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.PurchaseInvoiceReturnHeaders", "CurrencyId", "Web.Currencies"); DropForeignKey("Web.PurchaseInvoiceRateAmendmentLines", "PurchaseInvoiceLineId", "Web.PurchaseInvoiceLines"); DropForeignKey("Web.PurchaseInvoiceRateAmendmentLines", "PurchaseInvoiceAmendmentHeaderId", "Web.PurchaseInvoiceAmendmentHeaders"); DropForeignKey("Web.PurchaseInvoiceLineCharges", "LineTableId", "Web.PurchaseInvoiceLines"); DropForeignKey("Web.PurchaseInvoiceLineCharges", "PersonID", "Web.People"); DropForeignKey("Web.PurchaseInvoiceLineCharges", "ParentChargeId", "Web.Charges"); DropForeignKey("Web.PurchaseInvoiceLineCharges", "LedgerAccountDrId", "Web.LedgerAccounts"); DropForeignKey("Web.PurchaseInvoiceLineCharges", "LedgerAccountCrId", "Web.LedgerAccounts"); DropForeignKey("Web.PurchaseInvoiceLineCharges", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.PurchaseInvoiceLineCharges", "ContraLedgerAccountId", "Web.LedgerAccounts"); DropForeignKey("Web.PurchaseInvoiceLineCharges", "ChargeTypeId", "Web.ChargeTypes"); DropForeignKey("Web.PurchaseInvoiceLineCharges", "ChargeId", "Web.Charges"); DropForeignKey("Web.PurchaseInvoiceLineCharges", "CalculateOnId", "Web.Charges"); DropForeignKey("Web.PurchaseInvoiceHeaderCharges", "HeaderTableId", "Web.PurchaseInvoiceHeaders"); DropForeignKey("Web.PurchaseInvoiceHeaderCharges", "ProductChargeId", "Web.Charges"); DropForeignKey("Web.PurchaseInvoiceHeaderCharges", "PersonID", "Web.People"); DropForeignKey("Web.PurchaseInvoiceHeaderCharges", "ParentChargeId", "Web.Charges"); DropForeignKey("Web.PurchaseInvoiceHeaderCharges", "LedgerAccountDrId", "Web.LedgerAccounts"); DropForeignKey("Web.PurchaseInvoiceHeaderCharges", "LedgerAccountCrId", "Web.LedgerAccounts"); DropForeignKey("Web.PurchaseInvoiceHeaderCharges", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.PurchaseInvoiceHeaderCharges", "ContraLedgerAccountId", "Web.LedgerAccounts"); DropForeignKey("Web.PurchaseInvoiceHeaderCharges", "ChargeTypeId", "Web.ChargeTypes"); DropForeignKey("Web.PurchaseInvoiceHeaderCharges", "ChargeId", "Web.Charges"); DropForeignKey("Web.PurchaseInvoiceHeaderCharges", "CalculateOnId", "Web.Charges"); DropForeignKey("Web.PurchaseInvoiceHeaders", "UnitConversionForId", "Web.UnitConversionFors"); DropForeignKey("Web.PurchaseInvoiceHeaders", "SupplierId", "Web.Suppliers"); DropForeignKey("Web.PurchaseInvoiceHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.PurchaseInvoiceHeaders", "ShipMethodId", "Web.ShipMethods"); DropForeignKey("Web.PurchaseInvoiceHeaders", "SalesTaxGroupPartyId", "Web.SalesTaxGroupParties"); DropForeignKey("Web.PurchaseInvoiceHeaders", "SalesTaxGroupId", "Web.ChargeGroupPersons"); DropForeignKey("Web.PurchaseInvoiceHeaders", "ReferenceDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.PurchaseInvoiceLines", "SalesTaxGroupId", "Web.SalesTaxGroups"); DropForeignKey("Web.PurchaseInvoiceLines", "ReferenceDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.PurchaseInvoiceLines", "PurchaseInvoiceHeaderId", "Web.PurchaseInvoiceHeaders"); DropForeignKey("Web.PurchaseInvoiceLines", "PurchaseGoodsReceiptLineId", "Web.PurchaseGoodsReceiptLines"); DropForeignKey("Web.PurchaseInvoiceLines", "DealUnitId", "Web.Units"); DropForeignKey("Web.PurchaseInvoiceHeaders", "PurchaseGoodsReceiptHeaderId", "Web.PurchaseGoodsReceiptHeaders"); DropForeignKey("Web.PurchaseInvoiceHeaders", "LedgerHeaderId", "Web.LedgerHeaders"); DropForeignKey("Web.PurchaseInvoiceHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.PurchaseInvoiceHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.PurchaseInvoiceHeaders", "DeliveryTermsId", "Web.DeliveryTerms"); DropForeignKey("Web.PurchaseInvoiceHeaders", "CurrencyId", "Web.Currencies"); DropForeignKey("Web.PurchaseInvoiceHeaders", "BillingAccountId", "Web.Suppliers"); DropForeignKey("Web.PurchaseInvoiceAmendmentHeaders", "SupplierId", "Web.Suppliers"); DropForeignKey("Web.PurchaseInvoiceAmendmentHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.PurchaseInvoiceAmendmentHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.PurchaseInvoiceAmendmentHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.PurchaseIndentSettings", "SiteId", "Web.Sites"); DropForeignKey("Web.PurchaseIndentSettings", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.PurchaseIndentSettings", "DivisionId", "Web.Divisions"); DropForeignKey("Web.PurchaseIndentLineStatus", "PurchaseIndentLineId", "Web.PurchaseIndentLines"); DropForeignKey("Web.PurchaseGoodsReturnLines", "StockId", "Web.Stocks"); DropForeignKey("Web.PurchaseGoodsReturnLines", "PurchaseGoodsReturnHeaderId", "Web.PurchaseGoodsReturnHeaders"); DropForeignKey("Web.PurchaseGoodsReturnLines", "PurchaseGoodsReceiptLineId", "Web.PurchaseGoodsReceiptLines"); DropForeignKey("Web.PurchaseGoodsReturnLines", "ProductUidLastTransactionPersonId", "Web.People"); DropForeignKey("Web.PurchaseGoodsReturnLines", "ProductUidLastTransactionDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.PurchaseGoodsReturnLines", "ProductUidCurrentProcessId", "Web.Processes"); DropForeignKey("Web.PurchaseGoodsReturnLines", "ProductUidCurrentGodownId", "Web.Godowns"); DropForeignKey("Web.PurchaseGoodsReturnLines", "DealUnitId", "Web.Units"); DropForeignKey("Web.PurchaseGoodsReturnHeaders", "SupplierId", "Web.Suppliers"); DropForeignKey("Web.PurchaseGoodsReturnHeaders", "StockHeaderId", "Web.StockHeaders"); DropForeignKey("Web.PurchaseGoodsReturnHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.PurchaseGoodsReturnHeaders", "ReasonId", "Web.Reasons"); DropForeignKey("Web.PurchaseGoodsReturnHeaders", "GodownId", "Web.Godowns"); DropForeignKey("Web.PurchaseGoodsReturnHeaders", "GatePassHeaderId", "Web.GatePassHeaders"); DropForeignKey("Web.PurchaseGoodsReturnHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.PurchaseGoodsReturnHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.PurchaseGoodsReceiptSettings", "UnitConversionForId", "Web.UnitConversionFors"); DropForeignKey("Web.PurchaseGoodsReceiptSettings", "SiteId", "Web.Sites"); DropForeignKey("Web.PurchaseGoodsReceiptSettings", "ImportMenuId", "Web.Menus"); DropForeignKey("Web.PurchaseGoodsReceiptSettings", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.PurchaseGoodsReceiptSettings", "DivisionId", "Web.Divisions"); DropForeignKey("Web.ProductUidSiteDetails", "ProductUidHeaderId", "Web.ProductUidHeaders"); DropForeignKey("Web.ProductUidSiteDetails", "ProductId", "Web.Products"); DropForeignKey("Web.ProductUidSiteDetails", "LastTransactionPersonId", "Web.People"); DropForeignKey("Web.ProductUidSiteDetails", "LastTransactionDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.ProductUidSiteDetails", "GenPersonId", "Web.Buyers"); DropForeignKey("Web.ProductUidSiteDetails", "GenDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.ProductUidSiteDetails", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.ProductUidSiteDetails", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.ProductUidSiteDetails", "CurrenctProcessId", "Web.Processes"); DropForeignKey("Web.ProductUidSiteDetails", "CurrenctGodownId", "Web.Godowns"); DropForeignKey("Web.ProductTags", "TagId", "Web.Tags"); DropForeignKey("Web.ProductTags", "ProductId", "Web.Products"); DropForeignKey("Web.ProductSiteDetails", "SiteId", "Web.Sites"); DropForeignKey("Web.ProductSiteDetails", "ProductId", "Web.Products"); DropForeignKey("Web.ProductSiteDetails", "GodownId", "Web.Godowns"); DropForeignKey("Web.ProductSiteDetails", "DivisionId", "Web.Divisions"); DropForeignKey("Web.Sizes", "ProductShapeId", "Web.ProductShapes"); DropForeignKey("Web.ProductProcesses", "ProductRateGroupId", "Web.ProductRateGroups"); DropForeignKey("Web.ProductProcesses", "ProductId", "Web.Products"); DropForeignKey("Web.ProductProcesses", "ProcessId", "Web.Processes"); DropForeignKey("Web.ProductProcesses", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.ProductProcesses", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.ProductionOrderSettings", "SiteId", "Web.Sites"); DropForeignKey("Web.ProductionOrderSettings", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.ProductionOrderSettings", "DivisionId", "Web.Divisions"); DropForeignKey("Web.ProductCustomGroupLines", "ProductCustomGroupHeaderId", "Web.ProductCustomGroupHeaders"); DropForeignKey("Web.ProductCustomGroupLines", "ProductId", "Web.Products"); DropForeignKey("Web.ProductAlias", "ProductId", "Web.Products"); DropForeignKey("Web.ProductAlias", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.ProdOrderSettings", "SiteId", "Web.Sites"); DropForeignKey("Web.ProdOrderSettings", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.ProdOrderSettings", "DivisionId", "Web.Divisions"); DropForeignKey("Web.ProdOrderLineStatus", "ProdOrderLineId", "Web.ProdOrderLines"); DropForeignKey("Web.ProdOrderHeaderStatus", "ProdOrderHeaderId", "Web.ProdOrderHeaders"); DropForeignKey("Web.ProdOrderCancelLines", "ReferenceDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.ProdOrderCancelLines", "ProdOrderLineId", "Web.ProdOrderLines"); DropForeignKey("Web.ProdOrderCancelLines", "ProdOrderCancelHeaderId", "Web.ProdOrderCancelHeaders"); DropForeignKey("Web.ProdOrderCancelHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.ProdOrderCancelHeaders", "ReferenceDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.ProdOrderCancelHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.ProdOrderCancelHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.ProcessSettings", "SiteId", "Web.Sites"); DropForeignKey("Web.ProcessSettings", "RateListMenuId", "Web.Menus"); DropForeignKey("Web.ProcessSettings", "ProcessId", "Web.Processes"); DropForeignKey("Web.ProcessSettings", "DivisionId", "Web.Divisions"); DropForeignKey("Web.ProcessSequenceLines", "ProductRateGroupId", "Web.ProductRateGroups"); DropForeignKey("Web.ProductRateGroups", "SiteId", "Web.Sites"); DropForeignKey("Web.ProductRateGroups", "DivisionId", "Web.Divisions"); DropForeignKey("Web.ProcessSequenceLines", "ProcessSequenceHeaderId", "Web.ProcessSequenceHeaders"); DropForeignKey("Web.ProcessSequenceLines", "ProcessId", "Web.Processes"); DropForeignKey("Web.PersonRegistrations", "PersonId", "Web.People"); DropForeignKey("Web.PersonProcesses", "ProcessId", "Web.Processes"); DropForeignKey("Web.PersonProcesses", "PersonRateGroupId", "Web.PersonRateGroups"); DropForeignKey("Web.PersonProcesses", "PersonId", "Web.People"); DropForeignKey("Web.PersonDocuments", "PersonId", "Web.People"); DropForeignKey("Web.PersonCustomGroupLines", "PersonCustomGroupHeaderId", "Web.PersonCustomGroupHeaders"); DropForeignKey("Web.PersonCustomGroupLines", "PersonId", "Web.People"); DropForeignKey("Web.PersonBankAccounts", "PersonId", "Web.People"); DropForeignKey("Web.PerkDocumentTypes", "SiteId", "Web.Sites"); DropForeignKey("Web.PerkDocumentTypes", "RateDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.PerkDocumentTypes", "PerkId", "Web.Perks"); DropForeignKey("Web.PerkDocumentTypes", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.PerkDocumentTypes", "DivisionId", "Web.Divisions"); DropForeignKey("Web.PackingSettings", "SiteId", "Web.Sites"); DropForeignKey("Web.PackingSettings", "ImportMenuId", "Web.Menus"); DropForeignKey("Web.PackingSettings", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.PackingSettings", "DivisionId", "Web.Divisions"); DropForeignKey("Web.MaterialRequestSettings", "SiteId", "Web.Sites"); DropForeignKey("Web.MaterialRequestSettings", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.MaterialRequestSettings", "DivisionId", "Web.Divisions"); DropForeignKey("Web.MaterialReceiveSettings", "SiteId", "Web.Sites"); DropForeignKey("Web.MaterialReceiveSettings", "ProcessId", "Web.Processes"); DropForeignKey("Web.MaterialReceiveSettings", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.MaterialReceiveSettings", "DivisionId", "Web.Divisions"); DropForeignKey("Web.MaterialPlanSettings", "SiteId", "Web.Sites"); DropForeignKey("Web.MaterialPlanSettings", "GodownId", "Web.Godowns"); DropForeignKey("Web.MaterialPlanSettings", "DocTypePurchaseIndentId", "Web.DocumentTypes"); DropForeignKey("Web.MaterialPlanSettings", "DocTypeProductionOrderId", "Web.DocumentTypes"); DropForeignKey("Web.MaterialPlanSettings", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.MaterialPlanSettings", "DivisionId", "Web.Divisions"); DropForeignKey("Web.MaterialPlanForSaleOrders", "SaleOrderLineId", "Web.SaleOrderLines"); DropForeignKey("Web.MaterialPlanForSaleOrders", "MaterialPlanLineId", "Web.MaterialPlanLines"); DropForeignKey("Web.MaterialPlanForSaleOrders", "MaterialPlanHeaderId", "Web.MaterialPlanHeaders"); DropForeignKey("Web.MaterialPlanForSaleOrderLines", "ProductId", "Web.Products"); DropForeignKey("Web.MaterialPlanForSaleOrderLines", "MaterialPlanLineId", "Web.MaterialPlanLines"); DropForeignKey("Web.MaterialPlanForSaleOrderLines", "MaterialPlanForSaleOrderId", "Web.MaterialPlanForSaleOrders"); DropForeignKey("Web.MaterialPlanForSaleOrderLines", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.MaterialPlanForSaleOrderLines", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.MaterialPlanForProdOrders", "ProdOrderLineId", "Web.ProdOrderLines"); DropForeignKey("Web.MaterialPlanForProdOrders", "MaterialPlanHeaderId", "Web.MaterialPlanHeaders"); DropForeignKey("Web.MaterialPlanForProdOrderLines", "ProductId", "Web.Products"); DropForeignKey("Web.MaterialPlanForProdOrderLines", "ProcessId", "Web.Processes"); DropForeignKey("Web.MaterialPlanForProdOrderLines", "MaterialPlanLineId", "Web.MaterialPlanLines"); DropForeignKey("Web.MaterialPlanForProdOrderLines", "MaterialPlanForProdOrderId", "Web.MaterialPlanForProdOrders"); DropForeignKey("Web.MaterialPlanForProdOrderLines", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.MaterialPlanForProdOrderLines", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.MaterialPlanForJobOrders", "MaterialPlanLineId", "Web.MaterialPlanLines"); DropForeignKey("Web.MaterialPlanForJobOrders", "MaterialPlanHeaderId", "Web.MaterialPlanHeaders"); DropForeignKey("Web.MaterialPlanForJobOrderLines", "ProductId", "Web.Products"); DropForeignKey("Web.MaterialPlanForJobOrderLines", "MaterialPlanLineId", "Web.MaterialPlanLines"); DropForeignKey("Web.MaterialPlanForJobOrderLines", "MaterialPlanForJobOrderId", "Web.MaterialPlanForJobOrders"); DropForeignKey("Web.MaterialPlanForJobOrderLines", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.MaterialPlanForJobOrderLines", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.MaterialPlanForJobOrders", "JobOrderLineId", "Web.JobOrderLines"); DropForeignKey("Web.StockHeaderSettings", "SiteId", "Web.Sites"); DropForeignKey("Web.StockHeaderSettings", "ProcessId", "Web.Processes"); DropForeignKey("Web.StockHeaderSettings", "OnSubmitMenuId", "Web.Menus"); DropForeignKey("Web.StockHeaderSettings", "ImportMenuId", "Web.Menus"); DropForeignKey("Web.StockHeaderSettings", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.StockHeaderSettings", "DivisionId", "Web.Divisions"); DropForeignKey("Web.Manufacturers", "PersonID", "Web.People"); DropForeignKey("Web.LedgerSettings", "WizardMenuId", "Web.Menus"); DropForeignKey("Web.LedgerSettings", "SiteId", "Web.Sites"); DropForeignKey("Web.LedgerSettings", "ProcessId", "Web.Processes"); DropForeignKey("Web.LedgerSettings", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.LedgerSettings", "DivisionId", "Web.Divisions"); DropForeignKey("Web.LedgerLineRefValues", "LedgerLineId", "Web.LedgerLines"); DropForeignKey("Web.LedgerAdjs", "SiteId", "Web.Sites"); DropForeignKey("Web.LedgerAdjs", "LedgerId", "Web.Ledgers"); DropForeignKey("Web.LedgerAdjs", "DrLedgerId", "Web.Ledgers"); DropForeignKey("Web.LedgerAdjs", "CrLedgerId", "Web.Ledgers"); DropForeignKey("Web.Ledgers", "LedgerLineId", "Web.LedgerLines"); DropForeignKey("Web.LedgerLines", "LedgerHeaderId", "Web.LedgerHeaders"); DropForeignKey("Web.LedgerLines", "LedgerAccountId", "Web.LedgerAccounts"); DropForeignKey("Web.LedgerLines", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.Ledgers", "LedgerHeaderId", "Web.LedgerHeaders"); DropForeignKey("Web.Ledgers", "LedgerAccountId", "Web.LedgerAccounts"); DropForeignKey("Web.Ledgers", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.Ledgers", "ContraLedgerAccountId", "Web.LedgerAccounts"); DropForeignKey("Web.LeaveTypes", "SiteId", "Web.Sites"); DropForeignKey("Web.JobReturnBoms", "StockProcessId", "Web.StockProcesses"); DropForeignKey("Web.JobReturnBoms", "ProductId", "Web.Products"); DropForeignKey("Web.JobReturnBoms", "JobReturnLineId", "Web.JobReturnLines"); DropForeignKey("Web.JobReturnBoms", "JobReturnHeaderId", "Web.JobReturnHeaders"); DropForeignKey("Web.JobReturnBoms", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.JobReturnBoms", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.JobReturnBoms", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.JobReceiveSettings", "WizardMenuId", "Web.Menus"); DropForeignKey("Web.JobReceiveSettings", "SiteId", "Web.Sites"); DropForeignKey("Web.JobReceiveSettings", "ProcessId", "Web.Processes"); DropForeignKey("Web.JobReceiveSettings", "OnSubmitMenuId", "Web.Menus"); DropForeignKey("Web.JobReceiveSettings", "OnApproveMenuId", "Web.Menus"); DropForeignKey("Web.JobReceiveSettings", "ImportMenuId", "Web.Menus"); DropForeignKey("Web.JobReceiveSettings", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.JobReceiveSettings", "DivisionId", "Web.Divisions"); DropForeignKey("Web.JobReceiveSettings", "CalculationId", "Web.Calculations"); DropForeignKey("Web.JobReceiveQASettings", "WizardMenuId", "Web.Menus"); DropForeignKey("Web.JobReceiveQASettings", "SiteId", "Web.Sites"); DropForeignKey("Web.JobReceiveQASettings", "ProcessId", "Web.Processes"); DropForeignKey("Web.JobReceiveQASettings", "ImportMenuId", "Web.Menus"); DropForeignKey("Web.JobReceiveQASettings", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.JobReceiveQASettings", "DivisionId", "Web.Divisions"); DropForeignKey("Web.JobReceiveQAHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.JobReceiveQAHeaders", "ReferenceDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.JobReceiveQAHeaders", "QAById", "Web.Employees"); DropForeignKey("Web.JobReceiveQAHeaders", "ProcessId", "Web.Processes"); DropForeignKey("Web.JobReceiveQAHeaders", "JobWorkerId", "Web.JobWorkers"); DropForeignKey("Web.JobReceiveQALines", "ReferenceDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.JobReceiveQALines", "ProductUidId", "Web.ProductUids"); DropForeignKey("Web.JobReceiveQALines", "JobReceiveQAHeaderId", "Web.JobReceiveQAHeaders"); DropForeignKey("Web.JobReceiveQALines", "JobReceiveLineId", "Web.JobReceiveLines"); DropForeignKey("Web.JobReceiveQAHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.JobReceiveQAHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.JobReceiveLineStatus", "JobReceiveLineId", "Web.JobReceiveLines"); DropForeignKey("Web.JobReceiveByProducts", "ProductId", "Web.Products"); DropForeignKey("Web.JobReceiveByProducts", "JobReceiveHeaderId", "Web.JobReceiveHeaders"); DropForeignKey("Web.JobReceiveByProducts", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.JobReceiveByProducts", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.JobReceiveBoms", "StockProcessId", "Web.StockProcesses"); DropForeignKey("Web.JobReceiveBoms", "ProductId", "Web.Products"); DropForeignKey("Web.JobReceiveBoms", "JobReceiveLineId", "Web.JobReceiveLines"); DropForeignKey("Web.JobReceiveBoms", "JobReceiveHeaderId", "Web.JobReceiveHeaders"); DropForeignKey("Web.JobReceiveBoms", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.JobReceiveBoms", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.JobReceiveBoms", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.JobOrderSettings", "WizardMenuId", "Web.Menus"); DropForeignKey("Web.JobOrderSettings", "UnitConversionForId", "Web.UnitConversionFors"); DropForeignKey("Web.JobOrderSettings", "SiteId", "Web.Sites"); DropForeignKey("Web.JobOrderSettings", "ProcessId", "Web.Processes"); DropForeignKey("Web.JobOrderSettings", "OnSubmitMenuId", "Web.Menus"); DropForeignKey("Web.JobOrderSettings", "OnApproveMenuId", "Web.Menus"); DropForeignKey("Web.JobOrderSettings", "JobUnitId", "Web.Units"); DropForeignKey("Web.JobOrderSettings", "ImportMenuId", "Web.Menus"); DropForeignKey("Web.JobOrderSettings", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.JobOrderSettings", "DivisionId", "Web.Divisions"); DropForeignKey("Web.JobOrderSettings", "DealUnitId", "Web.Units"); DropForeignKey("Web.JobOrderSettings", "CalculationId", "Web.Calculations"); DropForeignKey("Web.JobOrderRateAmendmentLines", "JobWorkerId", "Web.JobWorkers"); DropForeignKey("Web.JobOrderRateAmendmentLines", "JobOrderLineId", "Web.JobOrderLines"); DropForeignKey("Web.JobOrderRateAmendmentLines", "JobOrderAmendmentHeaderId", "Web.JobOrderAmendmentHeaders"); DropForeignKey("Web.JobOrderQtyAmendmentLines", "JobOrderLineId", "Web.JobOrderLines"); DropForeignKey("Web.JobOrderQtyAmendmentLines", "JobOrderAmendmentHeaderId", "Web.JobOrderAmendmentHeaders"); DropForeignKey("Web.JobOrderPerks", "PerkId", "Web.Perks"); DropForeignKey("Web.JobOrderPerks", "JobOrderHeaderId", "Web.JobOrderHeaders"); DropForeignKey("Web.JobOrderLineStatus", "JobOrderLineId", "Web.JobOrderLines"); DropForeignKey("Web.JobOrderLineExtendeds", "OtherUnitId", "Web.Units"); DropForeignKey("Web.JobOrderLineExtendeds", "JobOrderLineId", "Web.JobOrderLines"); DropForeignKey("Web.JobOrderLineCharges", "PersonID", "Web.People"); DropForeignKey("Web.JobOrderLineCharges", "ParentChargeId", "Web.Charges"); DropForeignKey("Web.JobOrderLineCharges", "LedgerAccountDrId", "Web.LedgerAccounts"); DropForeignKey("Web.JobOrderLineCharges", "LedgerAccountCrId", "Web.LedgerAccounts"); DropForeignKey("Web.JobOrderLineCharges", "LineTableId", "Web.JobOrderLines"); DropForeignKey("Web.JobOrderLineCharges", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.JobOrderLineCharges", "ContraLedgerAccountId", "Web.LedgerAccounts"); DropForeignKey("Web.JobOrderLineCharges", "ChargeTypeId", "Web.ChargeTypes"); DropForeignKey("Web.JobOrderLineCharges", "ChargeId", "Web.Charges"); DropForeignKey("Web.JobOrderLineCharges", "CalculateOnId", "Web.Charges"); DropForeignKey("Web.JobOrderJobOrders", "JobOrderHeaderId", "Web.JobOrderHeaders"); DropForeignKey("Web.JobOrderJobOrders", "GenJobOrderHeaderId", "Web.JobOrderHeaders"); DropForeignKey("Web.JobOrderInspectionSettings", "SiteId", "Web.Sites"); DropForeignKey("Web.JobOrderInspectionSettings", "ProcessId", "Web.Processes"); DropForeignKey("Web.JobOrderInspectionSettings", "ImportMenuId", "Web.Menus"); DropForeignKey("Web.JobOrderInspectionSettings", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.JobOrderInspectionSettings", "DivisionId", "Web.Divisions"); DropForeignKey("Web.JobOrderInspectionRequestSettings", "SiteId", "Web.Sites"); DropForeignKey("Web.JobOrderInspectionRequestSettings", "ProcessId", "Web.Processes"); DropForeignKey("Web.JobOrderInspectionRequestSettings", "ImportMenuId", "Web.Menus"); DropForeignKey("Web.JobOrderInspectionRequestSettings", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.JobOrderInspectionRequestSettings", "DivisionId", "Web.Divisions"); DropForeignKey("Web.JobOrderInspectionRequestCancelLines", "ProductUidId", "Web.ProductUids"); DropForeignKey("Web.JobOrderInspectionRequestCancelLines", "JobOrderInspectionRequestLineId", "Web.JobOrderInspectionRequestLines"); DropForeignKey("Web.JobOrderInspectionRequestCancelLines", "JobOrderInspectionRequestCancelHeaderId", "Web.JobOrderInspectionRequestCancelHeaders"); DropForeignKey("Web.JobOrderInspectionRequestCancelHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.JobOrderInspectionRequestCancelHeaders", "ReasonId", "Web.Reasons"); DropForeignKey("Web.JobOrderInspectionRequestCancelHeaders", "ProcessId", "Web.Processes"); DropForeignKey("Web.JobOrderInspectionRequestCancelHeaders", "JobWorkerId", "Web.JobWorkers"); DropForeignKey("Web.JobOrderInspectionRequestCancelHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.JobOrderInspectionRequestCancelHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.JobOrderInspectionLines", "ReferenceDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.JobOrderInspectionLines", "ProductUidId", "Web.ProductUids"); DropForeignKey("Web.JobOrderInspectionLines", "JobOrderLineId", "Web.JobOrderLines"); DropForeignKey("Web.JobOrderInspectionLines", "JobOrderInspectionRequestLineId", "Web.JobOrderInspectionRequestLines"); DropForeignKey("Web.JobOrderInspectionRequestLines", "ProductUidId", "Web.ProductUids"); DropForeignKey("Web.JobOrderInspectionRequestLines", "JobOrderLineId", "Web.JobOrderLines"); DropForeignKey("Web.JobOrderInspectionRequestLines", "JobOrderInspectionRequestHeaderId", "Web.JobOrderInspectionRequestHeaders"); DropForeignKey("Web.JobOrderInspectionRequestHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.JobOrderInspectionRequestHeaders", "ProcessId", "Web.Processes"); DropForeignKey("Web.JobOrderInspectionRequestHeaders", "JobWorkerId", "Web.JobWorkers"); DropForeignKey("Web.JobOrderInspectionRequestHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.JobOrderInspectionRequestHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.JobOrderInspectionLines", "JobOrderInspectionHeaderId", "Web.JobOrderInspectionHeaders"); DropForeignKey("Web.JobOrderInspectionHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.JobOrderInspectionHeaders", "ReferenceDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.JobOrderInspectionHeaders", "ProcessId", "Web.Processes"); DropForeignKey("Web.JobOrderInspectionHeaders", "JobWorkerId", "Web.JobWorkers"); DropForeignKey("Web.JobOrderInspectionHeaders", "InspectionById", "Web.Employees"); DropForeignKey("Web.JobOrderInspectionHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.JobOrderInspectionHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.JobOrderHeaderStatus", "JobOrderHeaderId", "Web.JobOrderHeaders"); DropForeignKey("Web.JobOrderHeaderCharges", "ProductChargeId", "Web.Charges"); DropForeignKey("Web.JobOrderHeaderCharges", "PersonID", "Web.People"); DropForeignKey("Web.JobOrderHeaderCharges", "ParentChargeId", "Web.Charges"); DropForeignKey("Web.JobOrderHeaderCharges", "LedgerAccountDrId", "Web.LedgerAccounts"); DropForeignKey("Web.JobOrderHeaderCharges", "LedgerAccountCrId", "Web.LedgerAccounts"); DropForeignKey("Web.JobOrderHeaderCharges", "HeaderTableId", "Web.JobOrderHeaders"); DropForeignKey("Web.JobOrderHeaderCharges", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.JobOrderHeaderCharges", "ContraLedgerAccountId", "Web.LedgerAccounts"); DropForeignKey("Web.JobOrderHeaderCharges", "ChargeTypeId", "Web.ChargeTypes"); DropForeignKey("Web.JobOrderHeaderCharges", "ChargeId", "Web.Charges"); DropForeignKey("Web.JobOrderHeaderCharges", "CalculateOnId", "Web.Charges"); DropForeignKey("Web.JobOrderCancelBoms", "ProductId", "Web.Products"); DropForeignKey("Web.JobOrderCancelBoms", "JobOrderHeaderId", "Web.JobOrderHeaders"); DropForeignKey("Web.JobOrderCancelBoms", "JobOrderCancelLineId", "Web.JobOrderCancelLines"); DropForeignKey("Web.JobOrderCancelBoms", "JobOrderCancelHeaderId", "Web.JobOrderCancelHeaders"); DropForeignKey("Web.JobOrderCancelHeaders", "StockHeaderId", "Web.StockHeaders"); DropForeignKey("Web.JobOrderCancelHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.JobOrderCancelHeaders", "ReasonId", "Web.Reasons"); DropForeignKey("Web.JobOrderCancelHeaders", "ProcessId", "Web.Processes"); DropForeignKey("Web.JobOrderCancelHeaders", "OrderById", "Web.Employees"); DropForeignKey("Web.JobOrderCancelHeaders", "JobWorkerId", "Web.JobWorkers"); DropForeignKey("Web.JobOrderCancelLines", "JobOrderCancelHeaderId", "Web.JobOrderCancelHeaders"); DropForeignKey("Web.JobOrderCancelLines", "StockProcessId", "Web.StockProcesses"); DropForeignKey("Web.JobOrderCancelLines", "StockId", "Web.Stocks"); DropForeignKey("Web.JobOrderCancelLines", "ProductUidLastTransactionPersonId", "Web.People"); DropForeignKey("Web.JobOrderCancelLines", "ProductUidLastTransactionDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.JobOrderCancelLines", "ProductUidCurrentProcessId", "Web.Processes"); DropForeignKey("Web.JobOrderCancelLines", "ProductUidCurrentGodownId", "Web.Godowns"); DropForeignKey("Web.JobOrderCancelLines", "ProductUidId", "Web.ProductUids"); DropForeignKey("Web.JobOrderCancelLines", "JobOrderLineId", "Web.JobOrderLines"); DropForeignKey("Web.JobOrderCancelHeaders", "GodownId", "Web.Godowns"); DropForeignKey("Web.JobOrderCancelHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.JobOrderCancelHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.JobOrderCancelBoms", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.JobOrderCancelBoms", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.JobOrderByProducts", "ProductId", "Web.Products"); DropForeignKey("Web.JobOrderByProducts", "JobOrderHeaderId", "Web.JobOrderHeaders"); DropForeignKey("Web.JobOrderAmendmentHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.JobOrderAmendmentHeaders", "ProcessId", "Web.Processes"); DropForeignKey("Web.JobOrderAmendmentHeaders", "OrderById", "Web.Employees"); DropForeignKey("Web.JobOrderAmendmentHeaders", "LedgerHeaderId", "Web.LedgerHeaders"); DropForeignKey("Web.JobOrderAmendmentHeaders", "JobWorkerId", "Web.JobWorkers"); DropForeignKey("Web.JobOrderAmendmentHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.JobOrderAmendmentHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.JobInvoiceSettings", "WizardMenuId", "Web.Menus"); DropForeignKey("Web.JobInvoiceSettings", "SiteId", "Web.Sites"); DropForeignKey("Web.JobInvoiceSettings", "JobReturnDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.JobInvoiceSettings", "ProcessId", "Web.Processes"); DropForeignKey("Web.JobInvoiceSettings", "JobReceiveDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.JobInvoiceSettings", "ImportMenuId", "Web.Menus"); DropForeignKey("Web.JobInvoiceSettings", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.JobInvoiceSettings", "DivisionId", "Web.Divisions"); DropForeignKey("Web.JobInvoiceSettings", "CalculationId", "Web.Calculations"); DropForeignKey("Web.JobInvoiceReturnLineCharges", "PersonID", "Web.People"); DropForeignKey("Web.JobInvoiceReturnLineCharges", "ParentChargeId", "Web.Charges"); DropForeignKey("Web.JobInvoiceReturnLineCharges", "LedgerAccountDrId", "Web.LedgerAccounts"); DropForeignKey("Web.JobInvoiceReturnLineCharges", "LedgerAccountCrId", "Web.LedgerAccounts"); DropForeignKey("Web.JobInvoiceReturnLineCharges", "LineTableId", "Web.JobInvoiceReturnLines"); DropForeignKey("Web.JobInvoiceReturnLineCharges", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.JobInvoiceReturnLineCharges", "ContraLedgerAccountId", "Web.LedgerAccounts"); DropForeignKey("Web.JobInvoiceReturnLineCharges", "ChargeTypeId", "Web.ChargeTypes"); DropForeignKey("Web.JobInvoiceReturnLineCharges", "ChargeId", "Web.Charges"); DropForeignKey("Web.JobInvoiceReturnLineCharges", "CalculateOnId", "Web.Charges"); DropForeignKey("Web.JobInvoiceReturnLines", "JobReturnLineId", "Web.JobReturnLines"); DropForeignKey("Web.JobInvoiceReturnLines", "JobInvoiceReturnHeaderId", "Web.JobInvoiceReturnHeaders"); DropForeignKey("Web.JobInvoiceReturnLines", "JobInvoiceLineId", "Web.JobInvoiceLines"); DropForeignKey("Web.JobInvoiceReturnLines", "DealUnitId", "Web.Units"); DropForeignKey("Web.JobInvoiceReturnHeaderCharges", "ProductChargeId", "Web.Charges"); DropForeignKey("Web.JobInvoiceReturnHeaderCharges", "PersonID", "Web.People"); DropForeignKey("Web.JobInvoiceReturnHeaderCharges", "ParentChargeId", "Web.Charges"); DropForeignKey("Web.JobInvoiceReturnHeaderCharges", "LedgerAccountDrId", "Web.LedgerAccounts"); DropForeignKey("Web.JobInvoiceReturnHeaderCharges", "LedgerAccountCrId", "Web.LedgerAccounts"); DropForeignKey("Web.JobInvoiceReturnHeaderCharges", "HeaderTableId", "Web.JobInvoiceReturnHeaders"); DropForeignKey("Web.JobInvoiceReturnHeaderCharges", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.JobInvoiceReturnHeaderCharges", "ContraLedgerAccountId", "Web.LedgerAccounts"); DropForeignKey("Web.JobInvoiceReturnHeaderCharges", "ChargeTypeId", "Web.ChargeTypes"); DropForeignKey("Web.JobInvoiceReturnHeaderCharges", "ChargeId", "Web.Charges"); DropForeignKey("Web.JobInvoiceReturnHeaderCharges", "CalculateOnId", "Web.Charges"); DropForeignKey("Web.JobInvoiceReturnHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.JobInvoiceReturnHeaders", "ReasonId", "Web.Reasons"); DropForeignKey("Web.JobInvoiceReturnHeaders", "ProcessId", "Web.Processes"); DropForeignKey("Web.JobInvoiceReturnHeaders", "LedgerHeaderId", "Web.LedgerHeaders"); DropForeignKey("Web.JobInvoiceReturnHeaders", "JobWorkerId", "Web.JobWorkers"); DropForeignKey("Web.JobInvoiceReturnHeaders", "JobReturnHeaderId", "Web.JobReturnHeaders"); DropForeignKey("Web.JobReturnHeaders", "StockHeaderId", "Web.StockHeaders"); DropForeignKey("Web.JobReturnHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.JobReturnHeaders", "ReferenceDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.JobReturnHeaders", "ReasonId", "Web.Reasons"); DropForeignKey("Web.JobReturnHeaders", "ProcessId", "Web.Processes"); DropForeignKey("Web.JobReturnHeaders", "OrderById", "Web.Employees"); DropForeignKey("Web.JobReturnHeaders", "JobWorkerId", "Web.JobWorkers"); DropForeignKey("Web.JobReturnLines", "JobReturnHeaderId", "Web.JobReturnHeaders"); DropForeignKey("Web.JobReturnLines", "StockProcessId", "Web.StockProcesses"); DropForeignKey("Web.JobReturnLines", "StockId", "Web.Stocks"); DropForeignKey("Web.JobReturnLines", "ReferenceDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.JobReturnLines", "ProductUidLastTransactionPersonId", "Web.People"); DropForeignKey("Web.JobReturnLines", "ProductUidLastTransactionDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.JobReturnLines", "ProductUidCurrentProcessId", "Web.Processes"); DropForeignKey("Web.JobReturnLines", "ProductUidCurrentGodownId", "Web.Godowns"); DropForeignKey("Web.JobReturnLines", "JobReceiveLineId", "Web.JobReceiveLines"); DropForeignKey("Web.JobReturnLines", "DealUnitId", "Web.Units"); DropForeignKey("Web.JobReturnHeaders", "GodownId", "Web.Godowns"); DropForeignKey("Web.JobReturnHeaders", "GatePassHeaderId", "Web.GatePassHeaders"); DropForeignKey("Web.JobReturnHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.JobReturnHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.JobInvoiceReturnHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.JobInvoiceReturnHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.JobInvoiceRateAmendmentLineCharges", "PersonID", "Web.People"); DropForeignKey("Web.JobInvoiceRateAmendmentLineCharges", "ParentChargeId", "Web.Charges"); DropForeignKey("Web.JobInvoiceRateAmendmentLineCharges", "LedgerAccountDrId", "Web.LedgerAccounts"); DropForeignKey("Web.JobInvoiceRateAmendmentLineCharges", "LedgerAccountCrId", "Web.LedgerAccounts"); DropForeignKey("Web.JobInvoiceRateAmendmentLineCharges", "LineTableId", "Web.JobInvoiceRateAmendmentLines"); DropForeignKey("Web.JobInvoiceRateAmendmentLineCharges", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.JobInvoiceRateAmendmentLineCharges", "ContraLedgerAccountId", "Web.LedgerAccounts"); DropForeignKey("Web.JobInvoiceRateAmendmentLineCharges", "ChargeTypeId", "Web.ChargeTypes"); DropForeignKey("Web.JobInvoiceRateAmendmentLineCharges", "ChargeId", "Web.Charges"); DropForeignKey("Web.JobInvoiceRateAmendmentLineCharges", "CalculateOnId", "Web.Charges"); DropForeignKey("Web.JobInvoiceRateAmendmentLines", "JobWorkerId", "Web.JobWorkers"); DropForeignKey("Web.JobInvoiceRateAmendmentLines", "JobInvoiceLineId", "Web.JobInvoiceLines"); DropForeignKey("Web.JobInvoiceRateAmendmentLines", "JobInvoiceAmendmentHeaderId", "Web.JobInvoiceAmendmentHeaders"); DropForeignKey("Web.JobInvoiceLineStatus", "JobInvoiceLineId", "Web.JobInvoiceLines"); DropForeignKey("Web.JobInvoiceLineCharges", "PersonID", "Web.People"); DropForeignKey("Web.JobInvoiceLineCharges", "ParentChargeId", "Web.Charges"); DropForeignKey("Web.JobInvoiceLineCharges", "LedgerAccountDrId", "Web.LedgerAccounts"); DropForeignKey("Web.JobInvoiceLineCharges", "LedgerAccountCrId", "Web.LedgerAccounts"); DropForeignKey("Web.JobInvoiceLineCharges", "LineTableId", "Web.JobInvoiceLines"); DropForeignKey("Web.JobInvoiceLineCharges", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.JobInvoiceLineCharges", "ContraLedgerAccountId", "Web.LedgerAccounts"); DropForeignKey("Web.JobInvoiceLineCharges", "ChargeTypeId", "Web.ChargeTypes"); DropForeignKey("Web.JobInvoiceLineCharges", "ChargeId", "Web.Charges"); DropForeignKey("Web.JobInvoiceLineCharges", "CalculateOnId", "Web.Charges"); DropForeignKey("Web.JobInvoiceHeaderCharges", "ProductChargeId", "Web.Charges"); DropForeignKey("Web.JobInvoiceHeaderCharges", "PersonID", "Web.People"); DropForeignKey("Web.JobInvoiceHeaderCharges", "ParentChargeId", "Web.Charges"); DropForeignKey("Web.JobInvoiceHeaderCharges", "LedgerAccountDrId", "Web.LedgerAccounts"); DropForeignKey("Web.JobInvoiceHeaderCharges", "LedgerAccountCrId", "Web.LedgerAccounts"); DropForeignKey("Web.JobInvoiceHeaderCharges", "HeaderTableId", "Web.JobInvoiceHeaders"); DropForeignKey("Web.JobInvoiceHeaderCharges", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.JobInvoiceHeaderCharges", "ContraLedgerAccountId", "Web.LedgerAccounts"); DropForeignKey("Web.JobInvoiceHeaderCharges", "ChargeTypeId", "Web.ChargeTypes"); DropForeignKey("Web.JobInvoiceHeaderCharges", "ChargeId", "Web.Charges"); DropForeignKey("Web.JobInvoiceHeaderCharges", "CalculateOnId", "Web.Charges"); DropForeignKey("Web.JobInvoiceHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.JobInvoiceHeaders", "ProcessId", "Web.Processes"); DropForeignKey("Web.JobInvoiceHeaders", "LedgerHeaderId", "Web.LedgerHeaders"); DropForeignKey("Web.JobInvoiceHeaders", "JobWorkerId", "Web.JobWorkers"); DropForeignKey("Web.JobInvoiceHeaders", "JobReceiveHeaderId", "Web.JobReceiveHeaders"); DropForeignKey("Web.JobInvoiceLines", "JobWorkerId", "Web.JobWorkers"); DropForeignKey("Web.JobInvoiceLines", "JobReceiveLineId", "Web.JobReceiveLines"); DropForeignKey("Web.JobReceiveLines", "StockProcessId", "Web.StockProcesses"); DropForeignKey("Web.JobReceiveLines", "StockId", "Web.Stocks"); DropForeignKey("Web.JobReceiveLines", "ReferenceDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.JobReceiveLines", "ProductUidLastTransactionPersonId", "Web.People"); DropForeignKey("Web.JobReceiveLines", "ProductUidLastTransactionDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.JobReceiveLines", "ProductUidCurrentProcessId", "Web.Processes"); DropForeignKey("Web.JobReceiveLines", "ProductUidCurrentGodownId", "Web.Godowns"); DropForeignKey("Web.JobReceiveLines", "ProductUidId", "Web.ProductUids"); DropForeignKey("Web.JobReceiveLines", "MachineId", "Web.Products"); DropForeignKey("Web.JobReceiveLines", "JobReceiveHeaderId", "Web.JobReceiveHeaders"); DropForeignKey("Web.JobReceiveHeaders", "StockHeaderId", "Web.StockHeaders"); DropForeignKey("Web.JobReceiveHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.JobReceiveHeaders", "ReferenceDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.JobReceiveHeaders", "ProcessId", "Web.Processes"); DropForeignKey("Web.JobReceiveHeaders", "JobWorkerId", "Web.JobWorkers"); DropForeignKey("Web.JobReceiveHeaders", "JobReceiveById", "Web.Employees"); DropForeignKey("Web.JobReceiveHeaders", "GodownId", "Web.Godowns"); DropForeignKey("Web.JobReceiveHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.JobReceiveHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.JobReceiveLines", "JobOrderLineId", "Web.JobOrderLines"); DropForeignKey("Web.JobReceiveLines", "DealUnitId", "Web.Units"); DropForeignKey("Web.JobInvoiceLines", "JobInvoiceHeaderId", "Web.JobInvoiceHeaders"); DropForeignKey("Web.JobInvoiceLines", "DealUnitId", "Web.Units"); DropForeignKey("Web.JobInvoiceLines", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.JobInvoiceHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.JobInvoiceHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.JobInvoiceAmendmentHeaderCharges", "ProductChargeId", "Web.Charges"); DropForeignKey("Web.JobInvoiceAmendmentHeaderCharges", "PersonID", "Web.People"); DropForeignKey("Web.JobInvoiceAmendmentHeaderCharges", "ParentChargeId", "Web.Charges"); DropForeignKey("Web.JobInvoiceAmendmentHeaderCharges", "LedgerAccountDrId", "Web.LedgerAccounts"); DropForeignKey("Web.JobInvoiceAmendmentHeaderCharges", "LedgerAccountCrId", "Web.LedgerAccounts"); DropForeignKey("Web.JobInvoiceAmendmentHeaderCharges", "HeaderTableId", "Web.JobInvoiceAmendmentHeaders"); DropForeignKey("Web.JobInvoiceAmendmentHeaderCharges", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.JobInvoiceAmendmentHeaderCharges", "ContraLedgerAccountId", "Web.LedgerAccounts"); DropForeignKey("Web.JobInvoiceAmendmentHeaderCharges", "ChargeTypeId", "Web.ChargeTypes"); DropForeignKey("Web.JobInvoiceAmendmentHeaderCharges", "ChargeId", "Web.Charges"); DropForeignKey("Web.JobInvoiceAmendmentHeaderCharges", "CalculateOnId", "Web.Charges"); DropForeignKey("Web.JobInvoiceAmendmentHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.JobInvoiceAmendmentHeaders", "ProcessId", "Web.Processes"); DropForeignKey("Web.JobInvoiceAmendmentHeaders", "OrderById", "Web.Employees"); DropForeignKey("Web.JobInvoiceAmendmentHeaders", "JobWorkerId", "Web.JobWorkers"); DropForeignKey("Web.JobInvoiceAmendmentHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.JobInvoiceAmendmentHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.JobConsumptionSettings", "SiteId", "Web.Sites"); DropForeignKey("Web.JobConsumptionSettings", "ProcessId", "Web.Processes"); DropForeignKey("Web.JobConsumptionSettings", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.JobConsumptionSettings", "DivisionId", "Web.Divisions"); DropForeignKey("Web.InspectionQaAttributes", "ProductTypeQaAttributeId", "Web.ProductTypeQaAttributes"); DropForeignKey("Web.ProductTypeQaAttributes", "ProductTypeId", "Web.ProductTypes"); DropForeignKey("Web.ExcessMaterialSettings", "SiteId", "Web.Sites"); DropForeignKey("Web.ExcessMaterialSettings", "ProcessId", "Web.Processes"); DropForeignKey("Web.ExcessMaterialSettings", "ImportMenuId", "Web.Menus"); DropForeignKey("Web.ExcessMaterialSettings", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.ExcessMaterialSettings", "DivisionId", "Web.Divisions"); DropForeignKey("Web.ExcessMaterialHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.ExcessMaterialHeaders", "ProcessId", "Web.Processes"); DropForeignKey("Web.ExcessMaterialHeaders", "PersonId", "Web.People"); DropForeignKey("Web.ExcessMaterialHeaders", "GodownId", "Web.Godowns"); DropForeignKey("Web.ExcessMaterialLines", "ProductUidLastTransactionPersonId", "Web.People"); DropForeignKey("Web.ExcessMaterialLines", "ProductUidLastTransactionDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.ExcessMaterialLines", "ProductUidCurrentProcessId", "Web.Processes"); DropForeignKey("Web.ExcessMaterialLines", "ProductUidCurrentGodownId", "Web.Godowns"); DropForeignKey("Web.ExcessMaterialLines", "ProductUidId", "Web.ProductUids"); DropForeignKey("Web.ExcessMaterialLines", "ProductId", "Web.Products"); DropForeignKey("Web.ExcessMaterialLines", "ProcessId", "Web.Processes"); DropForeignKey("Web.ExcessMaterialLines", "ExcessMaterialHeaderId", "Web.ExcessMaterialHeaders"); DropForeignKey("Web.ExcessMaterialLines", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.ExcessMaterialLines", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.ExcessMaterialHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.ExcessMaterialHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.ExcessMaterialHeaders", "CurrencyId", "Web.Currencies"); DropForeignKey("Web.DocumentTypeTimePlans", "SiteId", "Web.Sites"); DropForeignKey("Web.DocumentTypeTimePlans", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.DocumentTypeTimePlans", "DivisionId", "Web.Divisions"); DropForeignKey("Web.DocumentTypeTimeExtensions", "SiteId", "Web.Sites"); DropForeignKey("Web.DocumentTypeTimeExtensions", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.DocumentTypeTimeExtensions", "DivisionId", "Web.Divisions"); DropForeignKey("Web.DocumentTypeSites", "SiteId", "Web.Sites"); DropForeignKey("Web.DocumentTypeSites", "DocumentTypeId", "Web.DocumentTypes"); DropForeignKey("Web.DocumentTypeDivisions", "DocumentTypeId", "Web.DocumentTypes"); DropForeignKey("Web.DocumentTypeDivisions", "DivisionId", "Web.Divisions"); DropForeignKey("Web.DocSmsContents", "SiteId", "Web.Sites"); DropForeignKey("Web.DocSmsContents", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.DocSmsContents", "DivisionId", "Web.Divisions"); DropForeignKey("Web.DocNotificationContents", "SiteId", "Web.Sites"); DropForeignKey("Web.DocNotificationContents", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.DocNotificationContents", "DivisionId", "Web.Divisions"); DropForeignKey("Web.DocEmailContents", "SiteId", "Web.Sites"); DropForeignKey("Web.DocEmailContents", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.DocEmailContents", "DivisionId", "Web.Divisions"); DropForeignKey("Web.DispatchWaybillLines", "DispatchWaybillHeaderId", "Web.DispatchWaybillHeaders"); DropForeignKey("Web.DispatchWaybillLines", "CityId", "Web.Cities"); DropForeignKey("Web.DispatchWaybillHeaders", "TransporterId", "Web.Transporters"); DropForeignKey("Web.DispatchWaybillHeaders", "ToCityId", "Web.Cities"); DropForeignKey("Web.DispatchWaybillHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.DispatchWaybillHeaders", "ShipMethodId", "Web.ShipMethods"); DropForeignKey("Web.DispatchWaybillHeaders", "SaleInvoiceHeaderId", "Web.SaleInvoiceHeaders"); DropForeignKey("Web.DispatchWaybillHeaders", "RouteId", "Web.Routes"); DropForeignKey("Web.DispatchWaybillHeaders", "FromCityId", "Web.Cities"); DropForeignKey("Web.DispatchWaybillHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.DispatchWaybillHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.DispatchWaybillHeaders", "ConsigneeId", "Web.Buyers"); DropForeignKey("Web.CustomDetails", "TRCourierId", "Web.People"); DropForeignKey("Web.CustomDetails", "SiteId", "Web.Sites"); DropForeignKey("Web.CustomDetails", "SaleInvoiceHeaderId", "Web.SaleInvoiceHeaders"); DropForeignKey("Web.SaleInvoiceHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.SaleInvoiceHeaders", "SaleToBuyerId", "Web.People"); DropForeignKey("Web.SaleInvoiceHeaders", "SaleDispatchHeaderId", "Web.SaleDispatchHeaders"); DropForeignKey("Web.SaleDispatchHeaders", "StockHeaderId", "Web.StockHeaders"); DropForeignKey("Web.SaleDispatchHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.SaleDispatchHeaders", "ShipMethodId", "Web.ShipMethods"); DropForeignKey("Web.SaleDispatchHeaders", "SaleToBuyerId", "Web.People"); DropForeignKey("Web.SaleDispatchLines", "StockInId", "Web.Stocks"); DropForeignKey("Web.SaleDispatchLines", "StockId", "Web.Stocks"); DropForeignKey("Web.SaleInvoiceLines", "SalesTaxGroupId", "Web.SalesTaxGroups"); DropForeignKey("Web.SaleInvoiceLines", "SaleOrderLineId", "Web.SaleOrderLines"); DropForeignKey("Web.SaleInvoiceLines", "SaleInvoiceHeaderId", "Web.SaleInvoiceHeaders"); DropForeignKey("Web.SaleInvoiceLines", "SaleDispatchLineId", "Web.SaleDispatchLines"); DropForeignKey("Web.SaleInvoiceLines", "PromoCodeId", "Web.PromoCodes"); DropForeignKey("Web.PromoCodes", "ProductTypeId", "Web.ProductTypes"); DropForeignKey("Web.PromoCodes", "ProductGroupId", "Web.ProductGroups"); DropForeignKey("Web.PromoCodes", "ProductCategoryId", "Web.ProductCategories"); DropForeignKey("Web.PromoCodes", "ProductId", "Web.Products"); DropForeignKey("Web.SaleInvoiceLines", "ProductInvoiceGroupId", "Web.ProductInvoiceGroups"); DropForeignKey("Web.SaleInvoiceLines", "ProductId", "Web.Products"); DropForeignKey("Web.SaleInvoiceLines", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.SaleInvoiceLines", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.SaleInvoiceLines", "DealUnitId", "Web.Units"); DropForeignKey("Web.SaleDispatchLines", "SaleDispatchHeaderId", "Web.SaleDispatchHeaders"); DropForeignKey("Web.SaleDispatchLines", "ProductUidLastTransactionPersonId", "Web.People"); DropForeignKey("Web.SaleDispatchLines", "ProductUidLastTransactionDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.SaleDispatchLines", "ProductUidCurrentProcessId", "Web.Processes"); DropForeignKey("Web.SaleDispatchLines", "ProductUidCurrentGodownId", "Web.Godowns"); DropForeignKey("Web.SaleDispatchLines", "PackingLineId", "Web.PackingLines"); DropForeignKey("Web.SaleDispatchLines", "GodownId", "Web.Godowns"); DropForeignKey("Web.SaleDispatchHeaders", "PackingHeaderId", "Web.PackingHeaders"); DropForeignKey("Web.SaleDispatchHeaders", "GatePassHeaderId", "Web.GatePassHeaders"); DropForeignKey("Web.SaleDispatchHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.SaleDispatchHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.SaleDispatchHeaders", "DeliveryTermsId", "Web.DeliveryTerms"); DropForeignKey("Web.SaleInvoiceHeaders", "LedgerHeaderId", "Web.LedgerHeaders"); DropForeignKey("Web.SaleInvoiceHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.SaleInvoiceHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.SaleInvoiceHeaders", "CurrencyId", "Web.Currencies"); DropForeignKey("Web.SaleInvoiceHeaders", "BillToBuyerId", "Web.Buyers"); DropForeignKey("Web.SaleInvoiceHeaders", "AgentId", "Web.People"); DropForeignKey("Web.CustomDetails", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.CustomDetails", "DivisionId", "Web.Divisions"); DropForeignKey("Web.CurrencyConversions", "ToCurrencyId", "Web.Currencies"); DropForeignKey("Web.CurrencyConversions", "FromCurrencyId", "Web.Currencies"); DropForeignKey("Web.Couriers", "PersonID", "Web.People"); DropForeignKey("Web.CostCenterStatusExtendeds", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.CostCenterStatus", "ProductId", "Web.Products"); DropForeignKey("Web.CostCenterStatus", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.Companies", "CurrencyId", "Web.Currencies"); DropForeignKey("Web.Companies", "CityId", "Web.Cities"); DropForeignKey("Web.ChargeGroupProducts", "ChargeTypeId", "Web.ChargeTypes"); DropForeignKey("Web.CalculationLineLedgerAccounts", "SiteId", "Web.Sites"); DropForeignKey("Web.CalculationLineLedgerAccounts", "LedgerAccountDrId", "Web.LedgerAccounts"); DropForeignKey("Web.CalculationLineLedgerAccounts", "LedgerAccountCrId", "Web.LedgerAccounts"); DropForeignKey("Web.CalculationLineLedgerAccounts", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.CalculationLineLedgerAccounts", "DivisionId", "Web.Divisions"); DropForeignKey("Web.CalculationLineLedgerAccounts", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.CalculationLineLedgerAccounts", "ContraLedgerAccountId", "Web.LedgerAccounts"); DropForeignKey("Web.CalculationLineLedgerAccounts", "CalculationProductId", "Web.CalculationProducts"); DropForeignKey("Web.CalculationProducts", "PersonId", "Web.People"); DropForeignKey("Web.CalculationProducts", "ParentChargeId", "Web.Charges"); DropForeignKey("Web.CalculationProducts", "LedgerAccountDrId", "Web.LedgerAccounts"); DropForeignKey("Web.CalculationProducts", "LedgerAccountCrId", "Web.LedgerAccounts"); DropForeignKey("Web.CalculationProducts", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.CalculationProducts", "ChargeTypeId", "Web.ChargeTypes"); DropForeignKey("Web.CalculationProducts", "ChargeId", "Web.Charges"); DropForeignKey("Web.CalculationProducts", "CalculationId", "Web.Calculations"); DropForeignKey("Web.CalculationProducts", "CalculateOnId", "Web.Charges"); DropForeignKey("Web.CalculationLineLedgerAccounts", "CalculationId", "Web.Calculations"); DropForeignKey("Web.CalculationHeaderLedgerAccounts", "SiteId", "Web.Sites"); DropForeignKey("Web.CalculationHeaderLedgerAccounts", "LedgerAccountDrId", "Web.LedgerAccounts"); DropForeignKey("Web.CalculationHeaderLedgerAccounts", "LedgerAccountCrId", "Web.LedgerAccounts"); DropForeignKey("Web.CalculationHeaderLedgerAccounts", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.CalculationHeaderLedgerAccounts", "DivisionId", "Web.Divisions"); DropForeignKey("Web.CalculationHeaderLedgerAccounts", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.CalculationHeaderLedgerAccounts", "ContraLedgerAccountId", "Web.LedgerAccounts"); DropForeignKey("Web.CalculationHeaderLedgerAccounts", "CalculationFooterId", "Web.CalculationFooters"); DropForeignKey("Web.CalculationHeaderLedgerAccounts", "CalculationId", "Web.Calculations"); DropForeignKey("Web.CalculationFooters", "ProductChargeId", "Web.Charges"); DropForeignKey("Web.CalculationFooters", "PersonId", "Web.People"); DropForeignKey("Web.CalculationFooters", "ParentChargeId", "Web.Charges"); DropForeignKey("Web.CalculationFooters", "LedgerAccountDrId", "Web.LedgerAccounts"); DropForeignKey("Web.CalculationFooters", "LedgerAccountCrId", "Web.LedgerAccounts"); DropForeignKey("Web.CalculationFooters", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.CalculationFooters", "ChargeTypeId", "Web.ChargeTypes"); DropForeignKey("Web.CalculationFooters", "ChargeId", "Web.Charges"); DropForeignKey("Web.CalculationFooters", "CalculationId", "Web.Calculations"); DropForeignKey("Web.CalculationFooters", "CalculateOnId", "Web.Charges"); DropForeignKey("Web.States", "Charge_ChargeId", "Web.Charges"); DropForeignKey("Web.States", "Calculation_CalculationId", "Web.Calculations"); DropForeignKey("Web.BusinessSessions", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.BusinessEntities", "TdsGroupId", "Web.TdsGroups"); DropForeignKey("Web.BusinessEntities", "TdsCategoryId", "Web.TdsCategories"); DropForeignKey("Web.BusinessEntities", "ServiceTaxCategoryId", "Web.ServiceTaxCategories"); DropForeignKey("Web.BusinessEntities", "SalesTaxGroupPartyId", "Web.SalesTaxGroupParties"); DropForeignKey("Web.BusinessEntities", "PersonRateGroupId", "Web.PersonRateGroups"); DropForeignKey("Web.PersonRateGroups", "SiteId", "Web.Sites"); DropForeignKey("Web.PersonRateGroups", "DivisionId", "Web.Divisions"); DropForeignKey("Web.BusinessEntities", "PersonID", "Web.People"); DropForeignKey("Web.BusinessEntities", "ParentId", "Web.People"); DropForeignKey("Web.BusinessEntities", "GuarantorId", "Web.People"); DropForeignKey("Web.BusinessEntities", "Buyer_PersonID", "Web.Buyers"); DropForeignKey("Web.BomDetails", "ProductId", "Web.Products"); DropForeignKey("Web.BomDetails", "ProcessId", "Web.Processes"); DropForeignKey("Web.BomDetails", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.BomDetails", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.BomDetails", "BaseProductId", "Web.Products"); DropForeignKey("Web.ProductQualities", "ProductTypeId", "Web.ProductTypes"); DropForeignKey("Web.ProductInvoiceGroups", "DivisionId", "Web.Divisions"); DropForeignKey("Web.ProductInvoiceGroups", "DescriptionOfGoodsId", "Web.DescriptionOfGoods"); DropForeignKey("Web.ProductDesignPatterns", "ProductTypeId", "Web.ProductTypes"); DropForeignKey("Web.ProductCollections", "ProductTypeId", "Web.ProductTypes"); DropForeignKey("Web.ProcessSequenceHeaders", "ReferenceDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.ProductContentLines", "ProductGroupId", "Web.ProductGroups"); DropForeignKey("Web.ProductContentLines", "ProductContentHeaderId", "Web.ProductContentHeaders"); DropForeignKey("Web.Products", "UnitId", "Web.Units"); DropForeignKey("Web.Products", "SalesTaxGroupProductId", "Web.SalesTaxGroupProducts"); DropForeignKey("Web.PurchaseGoodsReceiptLines", "StockId", "Web.Stocks"); DropForeignKey("Web.PurchaseGoodsReceiptLines", "ReferenceDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.PurchaseGoodsReceiptLines", "PurchaseOrderLineId", "Web.PurchaseOrderLines"); DropForeignKey("Web.PurchaseGoodsReceiptLines", "PurchaseIndentLineId", "Web.PurchaseIndentLines"); DropForeignKey("Web.PurchaseOrderLines", "SalesTaxGroupId", "Web.SalesTaxGroups"); DropForeignKey("Web.SalesTaxGroups", "SalesTaxGroupProductId", "Web.SalesTaxGroupProducts"); DropForeignKey("Web.SalesTaxGroups", "SalesTaxGroupPartyId", "Web.SalesTaxGroupParties"); DropForeignKey("Web.PurchaseOrderLines", "PurchaseOrderHeaderId", "Web.PurchaseOrderHeaders"); DropForeignKey("Web.PurchaseOrderHeaders", "UnitConversionForId", "Web.UnitConversionFors"); DropForeignKey("Web.PurchaseOrderHeaders", "SupplierId", "Web.People"); DropForeignKey("Web.PurchaseOrderHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.PurchaseOrderHeaders", "ShipMethodId", "Web.ShipMethods"); DropForeignKey("Web.PurchaseOrderHeaders", "SalesTaxGroupPersonId", "Web.ChargeGroupPersons"); DropForeignKey("Web.ChargeGroupPersons", "ChargeTypeId", "Web.ChargeTypes"); DropForeignKey("Web.PurchaseOrderHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.PurchaseOrderHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.PurchaseOrderHeaders", "DeliveryTermsId", "Web.DeliveryTerms"); DropForeignKey("Web.PurchaseOrderHeaders", "CurrencyId", "Web.Currencies"); DropForeignKey("Web.PurchaseOrderCancelLines", "PurchaseOrderLineId", "Web.PurchaseOrderLines"); DropForeignKey("Web.PurchaseOrderCancelLines", "PurchaseOrderCancelHeaderId", "Web.PurchaseOrderCancelHeaders"); DropForeignKey("Web.PurchaseOrderCancelHeaders", "SupplierId", "Web.Suppliers"); DropForeignKey("Web.PurchaseOrderCancelHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.PurchaseOrderCancelHeaders", "ReasonId", "Web.Reasons"); DropForeignKey("Web.PurchaseOrderCancelHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.PurchaseOrderCancelHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.PurchaseOrderLines", "PurchaseIndentLineId", "Web.PurchaseIndentLines"); DropForeignKey("Web.PurchaseOrderLines", "ProductUidHeaderId", "Web.ProductUidHeaders"); DropForeignKey("Web.PurchaseOrderLines", "ProductId", "Web.Products"); DropForeignKey("Web.PurchaseOrderLines", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.PurchaseOrderLines", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.PurchaseOrderLines", "DealUnitId", "Web.Units"); DropForeignKey("Web.PurchaseIndentLines", "PurchaseIndentHeaderId", "Web.PurchaseIndentHeaders"); DropForeignKey("Web.PurchaseIndentHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.PurchaseIndentHeaders", "ReasonId", "Web.Reasons"); DropForeignKey("Web.PurchaseIndentHeaders", "MaterialPlanHeaderId", "Web.MaterialPlanHeaders"); DropForeignKey("Web.PurchaseIndentHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.PurchaseIndentHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.PurchaseIndentHeaders", "DepartmentId", "Web.Departments"); DropForeignKey("Web.PurchaseIndentCancelLines", "PurchaseIndentLineId", "Web.PurchaseIndentLines"); DropForeignKey("Web.PurchaseIndentCancelLines", "PurchaseIndentCancelHeaderId", "Web.PurchaseIndentCancelHeaders"); DropForeignKey("Web.PurchaseIndentCancelHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.PurchaseIndentCancelHeaders", "ReasonId", "Web.Reasons"); DropForeignKey("Web.PurchaseIndentCancelHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.PurchaseIndentCancelHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.PurchaseIndentLines", "ProductId", "Web.Products"); DropForeignKey("Web.PurchaseIndentLines", "MaterialPlanLineId", "Web.MaterialPlanLines"); DropForeignKey("Web.PurchaseIndentLines", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.PurchaseIndentLines", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.PurchaseGoodsReceiptLines", "PurchaseGoodsReceiptHeaderId", "Web.PurchaseGoodsReceiptHeaders"); DropForeignKey("Web.PurchaseGoodsReceiptHeaders", "UnitConversionForId", "Web.UnitConversionFors"); DropForeignKey("Web.PurchaseGoodsReceiptHeaders", "SupplierId", "Web.Suppliers"); DropForeignKey("Web.PurchaseGoodsReceiptHeaders", "StockHeaderId", "Web.StockHeaders"); DropForeignKey("Web.PurchaseGoodsReceiptHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.PurchaseGoodsReceiptHeaders", "RoadPermitFormId", "Web.ProductUids"); DropForeignKey("Web.PurchaseGoodsReceiptHeaders", "ReferenceDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.PurchaseGoodsReceiptHeaders", "PurchaseWaybillId", "Web.PurchaseWaybills"); DropForeignKey("Web.PurchaseWaybills", "TransporterId", "Web.Transporters"); DropForeignKey("Web.Transporters", "PersonID", "Web.People"); DropForeignKey("Web.PurchaseWaybills", "ToCityId", "Web.Cities"); DropForeignKey("Web.PurchaseWaybills", "SiteId", "Web.Sites"); DropForeignKey("Web.PurchaseWaybills", "ShipMethodId", "Web.ShipMethods"); DropForeignKey("Web.PurchaseWaybills", "FromCityId", "Web.Cities"); DropForeignKey("Web.PurchaseWaybills", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.PurchaseWaybills", "DivisionId", "Web.Divisions"); DropForeignKey("Web.PurchaseWaybills", "ConsignerId", "Web.People"); DropForeignKey("Web.PurchaseGoodsReceiptHeaders", "GodownId", "Web.Godowns"); DropForeignKey("Web.PurchaseGoodsReceiptHeaders", "GateInId", "Web.GateIns"); DropForeignKey("Web.GateIns", "SiteId", "Web.Sites"); DropForeignKey("Web.GateIns", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.GateIns", "DivisionId", "Web.Divisions"); DropForeignKey("Web.PurchaseGoodsReceiptHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.PurchaseGoodsReceiptHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.PurchaseGoodsReceiptLines", "ProductUidLastTransactionPersonId", "Web.People"); DropForeignKey("Web.PurchaseGoodsReceiptLines", "ProductUidLastTransactionDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.PurchaseGoodsReceiptLines", "ProductUidCurrentProcessId", "Web.Processes"); DropForeignKey("Web.PurchaseGoodsReceiptLines", "ProductUidCurrentGodownId", "Web.Godowns"); DropForeignKey("Web.PurchaseGoodsReceiptLines", "ProductUidId", "Web.ProductUids"); DropForeignKey("Web.PurchaseGoodsReceiptLines", "ProductId", "Web.Products"); DropForeignKey("Web.PurchaseGoodsReceiptLines", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.PurchaseGoodsReceiptLines", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.PurchaseGoodsReceiptLines", "DealUnitId", "Web.Units"); DropForeignKey("Web.ProductSuppliers", "SupplierId", "Web.Suppliers"); DropForeignKey("Web.Suppliers", "SalesTaxGroupPartyId", "Web.SalesTaxGroupParties"); DropForeignKey("Web.Suppliers", "PersonID", "Web.People"); DropForeignKey("Web.ProductSuppliers", "ProductId", "Web.Products"); DropForeignKey("Web.ProductSizes", "SizeId", "Web.Sizes"); DropForeignKey("Web.Sizes", "UnitId", "Web.Units"); DropForeignKey("Web.Sizes", "ProductShapeId", "Web.ProductTypes"); DropForeignKey("Web.Sizes", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.ProductSizes", "ProductSizeTypeId", "Web.ProductSizeTypes"); DropForeignKey("Web.ProductSizes", "ProductId", "Web.Products"); DropForeignKey("Web.ProductRelatedAccessories", "Product_ProductId", "Web.Products"); DropForeignKey("Web.ProductRelatedAccessories", "ProductId", "Web.Products"); DropForeignKey("Web.ProductRelatedAccessories", "AccessoryId", "Web.Products"); DropForeignKey("Web.ProductIncludedAccessories", "Product_ProductId", "Web.Products"); DropForeignKey("Web.ProductIncludedAccessories", "ProductId", "Web.Products"); DropForeignKey("Web.ProductIncludedAccessories", "AccessoryId", "Web.Products"); DropForeignKey("Web.Products", "ProductGroupId", "Web.ProductGroups"); DropForeignKey("Web.ProductBuyers", "ProductId", "Web.Products"); DropForeignKey("Web.ProductBuyers", "BuyerId", "Web.Buyers"); DropForeignKey("Web.ProductAttributes", "ProductId", "Web.Products"); DropForeignKey("Web.JobOrderBoms", "ProductId", "Web.Products"); DropForeignKey("Web.JobOrderBoms", "JobOrderLineId", "Web.JobOrderLines"); DropForeignKey("Web.JobOrderBoms", "JobOrderHeaderId", "Web.JobOrderHeaders"); DropForeignKey("Web.JobOrderHeaders", "UnitConversionForId", "Web.UnitConversionFors"); DropForeignKey("Web.JobOrderHeaders", "StockHeaderId", "Web.StockHeaders"); DropForeignKey("Web.JobOrderHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.JobOrderHeaders", "ProcessId", "Web.Processes"); DropForeignKey("Web.JobOrderHeaders", "OrderById", "Web.Employees"); DropForeignKey("Web.Employees", "PersonID", "Web.People"); DropForeignKey("Web.Employees", "DesignationID", "Web.Designations"); DropForeignKey("Web.Employees", "DepartmentID", "Web.Departments"); DropForeignKey("Web.JobOrderHeaders", "MachineId", "Web.Machines"); DropForeignKey("Web.JobOrderHeaders", "JobWorkerId", "Web.JobWorkers"); DropForeignKey("Web.JobOrderLines", "UnitId", "Web.Units"); DropForeignKey("Web.JobOrderLines", "StockProcessId", "Web.StockProcesses"); DropForeignKey("Web.JobOrderLines", "StockId", "Web.Stocks"); DropForeignKey("Web.JobOrderLines", "ProductUidLastTransactionPersonId", "Web.People"); DropForeignKey("Web.JobOrderLines", "ProductUidLastTransactionDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.JobOrderLines", "ProductUidHeaderId", "Web.ProductUidHeaders"); DropForeignKey("Web.JobOrderLines", "ProductUidCurrentProcessId", "Web.Processes"); DropForeignKey("Web.JobOrderLines", "ProductUidCurrentGodownId", "Web.Godowns"); DropForeignKey("Web.JobOrderLines", "ProductUidId", "Web.ProductUids"); DropForeignKey("Web.ProductUids", "ProductUidHeaderId", "Web.ProductUidHeaders"); DropForeignKey("Web.ProductUidHeaders", "ProductId", "Web.Products"); DropForeignKey("Web.ProductUidHeaders", "GenPersonId", "Web.People"); DropForeignKey("Web.ProductUidHeaders", "GenDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.ProductUidHeaders", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.ProductUidHeaders", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.ProductUids", "ProductId", "Web.Products"); DropForeignKey("Web.PackingLines", "StockReceiveId", "Web.Stocks"); DropForeignKey("Web.PackingLines", "StockIssueId", "Web.Stocks"); DropForeignKey("Web.PackingLines", "SaleOrderLineId", "Web.SaleOrderLines"); DropForeignKey("Web.PackingLines", "SaleDeliveryOrderLineId", "Web.SaleDeliveryOrderLines"); DropForeignKey("Web.SaleDeliveryOrderLines", "SaleOrderLineId", "Web.SaleOrderLines"); DropForeignKey("Web.SaleOrderLines", "SaleOrderHeaderId", "Web.SaleOrderHeaders"); DropForeignKey("Web.SaleOrderHeaders", "UnitConversionForId", "Web.UnitConversionFors"); DropForeignKey("Web.SaleOrderHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.SaleOrderHeaders", "ShipMethodId", "Web.ShipMethods"); DropForeignKey("Web.SaleOrderHeaders", "SaleToBuyerId", "Web.People"); DropForeignKey("Web.SaleOrderHeaders", "LedgerHeaderId", "Web.LedgerHeaders"); DropForeignKey("Web.SaleOrderHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.SaleOrderHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.SaleOrderHeaders", "DeliveryTermsId", "Web.DeliveryTerms"); DropForeignKey("Web.SaleOrderHeaders", "CurrencyId", "Web.Currencies"); DropForeignKey("Web.SaleOrderHeaders", "BillToBuyerId", "Web.Buyers"); DropForeignKey("Web.SaleOrderLines", "ReferenceDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.SaleOrderLines", "ProductId", "Web.Products"); DropForeignKey("Web.SaleOrderLines", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.SaleOrderLines", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.SaleOrderLines", "DealUnitId", "Web.Units"); DropForeignKey("Web.SaleDeliveryOrderLines", "SaleDeliveryOrderHeaderId", "Web.SaleDeliveryOrderHeaders"); DropForeignKey("Web.SaleDeliveryOrderHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.SaleDeliveryOrderHeaders", "ShipMethodId", "Web.ShipMethods"); DropForeignKey("Web.SaleDeliveryOrderHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.SaleDeliveryOrderHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.SaleDeliveryOrderHeaders", "BuyerId", "Web.Buyers"); DropForeignKey("Web.PackingLines", "ProductUidLastTransactionPersonId", "Web.People"); DropForeignKey("Web.PackingLines", "ProductUidLastTransactionDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.PackingLines", "ProductUidCurrentProcessId", "Web.Processes"); DropForeignKey("Web.PackingLines", "ProductUidCurrentGodownId", "Web.Godowns"); DropForeignKey("Web.PackingLines", "ProductUidId", "Web.ProductUids"); DropForeignKey("Web.PackingLines", "ProductId", "Web.Products"); DropForeignKey("Web.PackingLines", "PackingHeaderId", "Web.PackingHeaders"); DropForeignKey("Web.PackingHeaders", "StockHeaderId", "Web.StockHeaders"); DropForeignKey("Web.StockLines", "StockProcessId", "Web.StockProcesses"); DropForeignKey("Web.StockLines", "StockHeaderId", "Web.StockHeaders"); DropForeignKey("Web.StockLines", "StockId", "Web.Stocks"); DropForeignKey("Web.StockLines", "RequisitionLineId", "Web.RequisitionLines"); DropForeignKey("Web.RequisitionLines", "RequisitionHeaderId", "Web.RequisitionHeaders"); DropForeignKey("Web.RequisitionHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.RequisitionHeaders", "ReferenceDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.RequisitionHeaders", "ReasonId", "Web.Reasons"); DropForeignKey("Web.Reasons", "DocumentCategoryId", "Web.DocumentCategories"); DropForeignKey("Web.RequisitionHeaders", "PersonId", "Web.People"); DropForeignKey("Web.RequisitionHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.RequisitionHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.RequisitionHeaders", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.RequisitionLines", "ProductId", "Web.Products"); DropForeignKey("Web.RequisitionLines", "ProcessId", "Web.Processes"); DropForeignKey("Web.RequisitionLines", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.RequisitionLines", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.StockLines", "ProductUidLastTransactionPersonId", "Web.People"); DropForeignKey("Web.StockLines", "ProductUidLastTransactionDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.StockLines", "ProductUidCurrentProcessId", "Web.Processes"); DropForeignKey("Web.StockLines", "ProductUidCurrentGodownId", "Web.Godowns"); DropForeignKey("Web.StockLines", "ProductUidId", "Web.ProductUids"); DropForeignKey("Web.StockLines", "ProductId", "Web.Products"); DropForeignKey("Web.StockLines", "FromStockProcessId", "Web.StockProcesses"); DropForeignKey("Web.StockProcesses", "StockHeaderId", "Web.StockHeaders"); DropForeignKey("Web.StockProcesses", "ReferenceDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.StockProcesses", "ProductUidId", "Web.ProductUids"); DropForeignKey("Web.StockProcesses", "ProductId", "Web.Products"); DropForeignKey("Web.StockProcesses", "ProcessId", "Web.Processes"); DropForeignKey("Web.StockProcesses", "GodownId", "Web.Godowns"); DropForeignKey("Web.StockProcesses", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.StockProcesses", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.StockProcesses", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.StockLines", "FromStockId", "Web.Stocks"); DropForeignKey("Web.Stocks", "StockHeaderId", "Web.StockHeaders"); DropForeignKey("Web.Stocks", "ReferenceDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.Stocks", "ProductUidId", "Web.ProductUids"); DropForeignKey("Web.Stocks", "ProductId", "Web.Products"); DropForeignKey("Web.Stocks", "ProcessId", "Web.Processes"); DropForeignKey("Web.Stocks", "GodownId", "Web.Godowns"); DropForeignKey("Web.Stocks", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.Stocks", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.Stocks", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.StockLines", "FromProcessId", "Web.Processes"); DropForeignKey("Web.StockLines", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.StockLines", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.StockLines", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.StockHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.StockHeaders", "ReferenceDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.StockHeaders", "ProcessId", "Web.Processes"); DropForeignKey("Web.StockHeaders", "PersonId", "Web.People"); DropForeignKey("Web.StockHeaders", "MachineId", "Web.Machines"); DropForeignKey("Web.StockHeaders", "LedgerHeaderId", "Web.LedgerHeaders"); DropForeignKey("Web.LedgerHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.LedgerHeaders", "ProcessId", "Web.Processes"); DropForeignKey("Web.LedgerHeaders", "LedgerAccountId", "Web.LedgerAccounts"); DropForeignKey("Web.LedgerHeaders", "GodownId", "Web.Godowns"); DropForeignKey("Web.LedgerHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.LedgerHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.LedgerHeaders", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.StockHeaders", "LedgerAccountId", "Web.LedgerAccounts"); DropForeignKey("Web.StockHeaders", "GodownId", "Web.Godowns"); DropForeignKey("Web.StockHeaders", "GatePassHeaderId", "Web.GatePassHeaders"); DropForeignKey("Web.StockHeaders", "FromGodownId", "Web.Godowns"); DropForeignKey("Web.StockHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.StockHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.StockHeaders", "CurrencyId", "Web.Currencies"); DropForeignKey("Web.StockHeaders", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.StockHeaders", "ContraLedgerAccountId", "Web.LedgerAccounts"); DropForeignKey("Web.PackingHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.PackingHeaders", "ShipMethodId", "Web.ShipMethods"); DropForeignKey("Web.PackingHeaders", "JobWorkerId", "Web.JobWorkers"); DropForeignKey("Web.PackingHeaders", "GodownId", "Web.Godowns"); DropForeignKey("Web.PackingHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.PackingHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.PackingHeaders", "DealUnitId", "Web.Units"); DropForeignKey("Web.PackingHeaders", "BuyerId", "Web.People"); DropForeignKey("Web.PackingLines", "FromProcessId", "Web.Processes"); DropForeignKey("Web.PackingLines", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.PackingLines", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.PackingLines", "DealUnitId", "Web.Units"); DropForeignKey("Web.ProductUids", "LastTransactionPersonId", "Web.People"); DropForeignKey("Web.ProductUids", "LastTransactionDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.ProductUids", "GenPersonId", "Web.Buyers"); DropForeignKey("Web.ProductUids", "GenDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.ProductUids", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.ProductUids", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.ProductUids", "CurrenctProcessId", "Web.Processes"); DropForeignKey("Web.ProductUids", "CurrenctGodownId", "Web.Godowns"); DropForeignKey("Web.JobOrderLines", "ProductId", "Web.Products"); DropForeignKey("Web.JobOrderLines", "ProdOrderLineId", "Web.ProdOrderLines"); DropForeignKey("Web.ProdOrderLines", "ReferenceDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.ProdOrderLines", "ProductId", "Web.Products"); DropForeignKey("Web.ProdOrderLines", "ProdOrderHeaderId", "Web.ProdOrderHeaders"); DropForeignKey("Web.ProdOrderHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.ProdOrderHeaders", "ReferenceDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.ProdOrderHeaders", "MaterialPlanHeaderId", "Web.MaterialPlanHeaders"); DropForeignKey("Web.ProdOrderHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.ProdOrderHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.ProdOrderHeaders", "BuyerId", "Web.Buyers"); DropForeignKey("Web.ProdOrderLines", "ProcessId", "Web.Processes"); DropForeignKey("Web.ProdOrderLines", "MaterialPlanLineId", "Web.MaterialPlanLines"); DropForeignKey("Web.MaterialPlanLines", "ProductId", "Web.Products"); DropForeignKey("Web.MaterialPlanLines", "ProcessId", "Web.Processes"); DropForeignKey("Web.MaterialPlanLines", "MaterialPlanHeaderId", "Web.MaterialPlanHeaders"); DropForeignKey("Web.MaterialPlanHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.MaterialPlanHeaders", "ReferenceDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.MaterialPlanHeaders", "GodownId", "Web.Godowns"); DropForeignKey("Web.MaterialPlanHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.MaterialPlanHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.MaterialPlanHeaders", "BuyerId", "Web.Buyers"); DropForeignKey("Web.Buyers", "PersonID", "Web.People"); DropForeignKey("Web.MaterialPlanLines", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.MaterialPlanLines", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.ProdOrderLines", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.ProdOrderLines", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.JobOrderLines", "JobOrderHeaderId", "Web.JobOrderHeaders"); DropForeignKey("Web.JobOrderLines", "FromProcessId", "Web.Processes"); DropForeignKey("Web.JobOrderLines", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.JobOrderLines", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.JobOrderLines", "DealUnitId", "Web.Units"); DropForeignKey("Web.JobOrderHeaders", "GodownId", "Web.Godowns"); DropForeignKey("Web.JobOrderHeaders", "GatePassHeaderId", "Web.GatePassHeaders"); DropForeignKey("Web.GatePassHeaders", "SiteId", "Web.Sites"); DropForeignKey("Web.GatePassHeaders", "ReferenceDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.GatePassHeaders", "PersonId", "Web.People"); DropForeignKey("Web.GatePassHeaders", "GodownId", "Web.Godowns"); DropForeignKey("Web.GatePassLines", "UnitId", "Web.Units"); DropForeignKey("Web.GatePassLines", "GatePassHeaderId", "Web.GatePassHeaders"); DropForeignKey("Web.GatePassHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.GatePassHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.JobOrderHeaders", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.JobOrderHeaders", "DivisionId", "Web.Divisions"); DropForeignKey("Web.JobOrderHeaders", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.CostCenters", "SiteId", "Web.Sites"); DropForeignKey("Web.Sites", "PersonId", "Web.People"); DropForeignKey("Web.Godowns", "SiteId", "Web.Sites"); DropForeignKey("Web.Sites", "DefaultGodownId", "Web.Godowns"); DropForeignKey("Web.Godowns", "GateId", "Web.Gates"); DropForeignKey("Web.Gates", "SiteId", "Web.Sites"); DropForeignKey("Web.Sites", "DefaultDivisionId", "Web.Divisions"); DropForeignKey("Web.Sites", "CityId", "Web.Cities"); DropForeignKey("Web.CostCenters", "ReferenceDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.Processes", "CostCenterId", "Web.CostCenters"); DropForeignKey("Web.CostCenters", "ProcessId", "Web.Processes"); DropForeignKey("Web.Processes", "ParentProcessId", "Web.Processes"); DropForeignKey("Web.Processes", "AccountId", "Web.LedgerAccounts"); DropForeignKey("Web.CostCenters", "ParentCostCenterId", "Web.CostCenters"); DropForeignKey("Web.CostCenters", "LedgerAccountId", "Web.LedgerAccounts"); DropForeignKey("Web.LedgerAccounts", "PersonId", "Web.People"); DropForeignKey("Web.LedgerAccounts", "LedgerAccountGroupId", "Web.LedgerAccountGroups"); DropForeignKey("Web.CostCenters", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.CostCenters", "DivisionId", "Web.Divisions"); DropForeignKey("Web.JobOrderHeaders", "BillToPartyId", "Web.JobWorkers"); DropForeignKey("Web.JobWorkers", "PersonID", "Web.People"); DropForeignKey("Web.JobOrderBoms", "Dimension2Id", "Web.Dimension2"); DropForeignKey("Web.Dimension2", "ReferenceDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.Dimension2", "ProductTypeId", "Web.ProductTypes"); DropForeignKey("Web.JobOrderBoms", "Dimension1Id", "Web.Dimension1"); DropForeignKey("Web.Dimension1", "ReferenceDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.Dimension1", "ProductTypeId", "Web.ProductTypes"); DropForeignKey("Web.ProductTypeAttributes", "ProductType_ProductTypeId", "Web.ProductTypes"); DropForeignKey("Web.ProductTypes", "ProductNatureId", "Web.ProductNatures"); DropForeignKey("Web.ProductGroups", "ProductTypeId", "Web.ProductTypes"); DropForeignKey("Web.ProductDesigns", "ProductTypeId", "Web.ProductTypes"); DropForeignKey("Web.ProductCategories", "ProductTypeId", "Web.ProductTypes"); DropForeignKey("Web.ProductTypes", "Dimension2TypeId", "Web.Dimension2Types"); DropForeignKey("Web.ProductTypes", "Dimension1TypeId", "Web.Dimension1Types"); DropForeignKey("Web.Products", "DrawBackTariffHeadId", "Web.DrawBackTariffHeads"); DropForeignKey("Web.Products", "ReferenceDocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.Products", "DivisionId", "Web.Divisions"); DropForeignKey("Web.AspNetUserRoles1", "RoleId", "Web.AspNetRoles1"); DropForeignKey("Web.Agents", "PersonID", "Web.People"); DropForeignKey("Web.PersonContacts", "Person_PersonID", "Web.People"); DropForeignKey("Web.PersonContacts", "PersonContactTypeId", "Web.PersonContactTypes"); DropForeignKey("Web.PersonContacts", "PersonId", "Web.People"); DropForeignKey("Web.PersonContacts", "ContactId", "Web.People"); DropForeignKey("Web.PersonAddresses", "PersonId", "Web.People"); DropForeignKey("Web.PersonAddresses", "CityId", "Web.Cities"); DropForeignKey("Web.States", "CountryId", "Web.Countries"); DropForeignKey("Web.Cities", "StateId", "Web.States"); DropForeignKey("Web.PersonAddresses", "AreaId", "Web.Areas"); DropForeignKey("Web.People", "ApplicationUser_Id", "Web.Users"); DropForeignKey("Web.ActivityLogs", "DocTypeId", "Web.DocumentTypes"); DropForeignKey("Web.DocumentTypes", "ReportMenuId", "Web.Menus"); DropForeignKey("Web.Menus", "SubModuleId", "Web.MenuSubModules"); DropForeignKey("Web.Menus", "ModuleId", "Web.MenuModules"); DropForeignKey("Web.Menus", "ControllerActionId", "Web.ControllerActions"); DropForeignKey("Web.DocumentTypes", "DocumentCategoryId", "Web.DocumentCategories"); DropForeignKey("Web.DocumentTypes", "ControllerActionId", "Web.ControllerActions"); DropForeignKey("Web.ControllerActions", "ControllerId", "Web.MvcControllers"); DropForeignKey("Web.MvcControllers", "ParentControllerId", "Web.MvcControllers"); DropForeignKey("Web.ActivityLogs", "ActivityType", "Web.ActivityTypes"); DropIndex("Web.ProductManufacturer", new[] { "PersonID" }); DropIndex("Web.SaleInvoiceHeaderDetail", new[] { "SaleInvoiceHeaderId" }); DropIndex("Web.FinishedProduct", new[] { "SampleId" }); DropIndex("Web.FinishedProduct", new[] { "ProductShapeId" }); DropIndex("Web.FinishedProduct", new[] { "OriginCountryId" }); DropIndex("Web.FinishedProduct", new[] { "DescriptionOfGoodsId" }); DropIndex("Web.FinishedProduct", new[] { "ProductStyleId" }); DropIndex("Web.FinishedProduct", new[] { "ProductManufacturerId" }); DropIndex("Web.FinishedProduct", new[] { "ProcessSequenceHeaderId" }); DropIndex("Web.FinishedProduct", new[] { "ProductInvoiceGroupId" }); DropIndex("Web.FinishedProduct", new[] { "ContentId" }); DropIndex("Web.FinishedProduct", new[] { "FaceContentId" }); DropIndex("Web.FinishedProduct", new[] { "ColourId" }); DropIndex("Web.FinishedProduct", new[] { "ProductDesignPatternId" }); DropIndex("Web.FinishedProduct", new[] { "ProductDesignId" }); DropIndex("Web.FinishedProduct", new[] { "ProductQualityId" }); DropIndex("Web.FinishedProduct", new[] { "ProductCollectionId" }); DropIndex("Web.FinishedProduct", new[] { "ProductCategoryId" }); DropIndex("Web.FinishedProduct", new[] { "ProductId" }); DropIndex("Web.WeavingRetensions", new[] { "ProductCategoryId" }); DropIndex("Web.WeavingRetensions", "IX_WeavingRetension_DocID"); DropIndex("Web.ViewSaleOrderBalanceForCancellation", new[] { "ProductId" }); DropIndex("Web.ViewSaleOrderBalance", new[] { "ProductId" }); DropIndex("Web.ViewSaleOrderBalance", new[] { "Dimension2Id" }); DropIndex("Web.ViewSaleOrderBalance", new[] { "Dimension1Id" }); DropIndex("Web.ViewRequisitionBalance", new[] { "CostCenterId" }); DropIndex("Web.ViewRequisitionBalance", new[] { "Dimension2Id" }); DropIndex("Web.ViewRequisitionBalance", new[] { "Dimension1Id" }); DropIndex("Web.ViewRequisitionBalance", new[] { "DivisionId" }); DropIndex("Web.ViewRequisitionBalance", new[] { "SiteId" }); DropIndex("Web.ViewRequisitionBalance", new[] { "PersonId" }); DropIndex("Web.ViewRequisitionBalance", new[] { "ProductId" }); DropIndex("Web.ViewPurchaseIndentBalance", new[] { "DocTypeId" }); DropIndex("Web.ViewProdOrderBalance", new[] { "DocTypeId" }); DropIndex("Web.ViewProdOrderBalance", new[] { "Dimension2Id" }); DropIndex("Web.ViewProdOrderBalance", new[] { "Dimension1Id" }); DropIndex("Web.ViewProdOrderBalance", new[] { "ProductId" }); DropIndex("Web.ViewMaterialPlanBalance", new[] { "DocTypeId" }); DropIndex("Web.ViewJobReceiveBalanceForInvoice", new[] { "Dimension2Id" }); DropIndex("Web.ViewJobReceiveBalanceForInvoice", new[] { "Dimension1Id" }); DropIndex("Web.ViewJobReceiveBalanceForInvoice", new[] { "ProductId" }); DropIndex("Web.ViewJobReceiveBalanceForInvoice", new[] { "JobOrderLineId" }); DropIndex("Web.ViewJobReceiveBalance", new[] { "Dimension2Id" }); DropIndex("Web.ViewJobReceiveBalance", new[] { "Dimension1Id" }); DropIndex("Web.ViewJobReceiveBalance", new[] { "ProductId" }); DropIndex("Web.ViewJobReceiveBalance", new[] { "JobOrderLineId" }); DropIndex("Web.ViewJobOrderInspectionRequestBalance", new[] { "Dimension2Id" }); DropIndex("Web.ViewJobOrderInspectionRequestBalance", new[] { "Dimension1Id" }); DropIndex("Web.ViewJobOrderInspectionRequestBalance", new[] { "DivisionId" }); DropIndex("Web.ViewJobOrderInspectionRequestBalance", new[] { "SiteId" }); DropIndex("Web.ViewJobOrderInspectionRequestBalance", new[] { "ProductId" }); DropIndex("Web.ViewJobOrderBalanceFromStatus", new[] { "Dimension2Id" }); DropIndex("Web.ViewJobOrderBalanceFromStatus", new[] { "Dimension1Id" }); DropIndex("Web.ViewJobOrderBalanceFromStatus", new[] { "DivisionId" }); DropIndex("Web.ViewJobOrderBalanceFromStatus", new[] { "SiteId" }); DropIndex("Web.ViewJobOrderBalanceFromStatus", new[] { "ProductId" }); DropIndex("Web.ViewJobOrderBalanceForInvoice", new[] { "Dimension2Id" }); DropIndex("Web.ViewJobOrderBalanceForInvoice", new[] { "Dimension1Id" }); DropIndex("Web.ViewJobOrderBalanceForInvoice", new[] { "JobWorkerId" }); DropIndex("Web.ViewJobOrderBalanceForInvoice", new[] { "ProductId" }); DropIndex("Web.ViewJobOrderBalanceForInspectionRequest", new[] { "Dimension2Id" }); DropIndex("Web.ViewJobOrderBalanceForInspectionRequest", new[] { "Dimension1Id" }); DropIndex("Web.ViewJobOrderBalanceForInspectionRequest", new[] { "DivisionId" }); DropIndex("Web.ViewJobOrderBalanceForInspectionRequest", new[] { "SiteId" }); DropIndex("Web.ViewJobOrderBalanceForInspectionRequest", new[] { "ProductId" }); DropIndex("Web.ViewJobOrderBalanceForInspection", new[] { "Dimension2Id" }); DropIndex("Web.ViewJobOrderBalanceForInspection", new[] { "Dimension1Id" }); DropIndex("Web.ViewJobOrderBalanceForInspection", new[] { "DivisionId" }); DropIndex("Web.ViewJobOrderBalanceForInspection", new[] { "SiteId" }); DropIndex("Web.ViewJobOrderBalanceForInspection", new[] { "ProductId" }); DropIndex("Web.ViewJobOrderBalance", new[] { "Dimension2Id" }); DropIndex("Web.ViewJobOrderBalance", new[] { "Dimension1Id" }); DropIndex("Web.ViewJobOrderBalance", new[] { "DivisionId" }); DropIndex("Web.ViewJobOrderBalance", new[] { "SiteId" }); DropIndex("Web.ViewJobOrderBalance", new[] { "ProductId" }); DropIndex("Web.ViewJobInvoiceBalanceForRateAmendment", new[] { "Dimension2Id" }); DropIndex("Web.ViewJobInvoiceBalanceForRateAmendment", new[] { "Dimension1Id" }); DropIndex("Web.ViewJobInvoiceBalanceForRateAmendment", new[] { "JobWorkerId" }); DropIndex("Web.ViewJobInvoiceBalanceForRateAmendment", new[] { "ProductId" }); DropIndex("Web.UserRoles", new[] { "UserId" }); DropIndex("Web.UserPersons", new[] { "PersonId" }); DropIndex("Web.UserBookMarks", new[] { "MenuId" }); DropIndex("Web.UnitConversions", "IX_UnitConversion_UniqueKey"); DropIndex("Web.TdsRates", new[] { "TdsGroupId" }); DropIndex("Web.TdsRates", new[] { "TdsCategoryId" }); DropIndex("Web.StockUid", new[] { "ProductUidId" }); DropIndex("Web.StockUid", new[] { "ProcessId" }); DropIndex("Web.StockUid", new[] { "GodownId" }); DropIndex("Web.StockUid", new[] { "SiteId" }); DropIndex("Web.StockUid", new[] { "DivisionId" }); DropIndex("Web.StockUid", new[] { "DocTypeId" }); DropIndex("Web.StockProcessBalances", new[] { "CostCenterId" }); DropIndex("Web.StockProcessBalances", new[] { "GodownId" }); DropIndex("Web.StockProcessBalances", new[] { "ProcessId" }); DropIndex("Web.StockProcessBalances", new[] { "Dimension2Id" }); DropIndex("Web.StockProcessBalances", new[] { "Dimension1Id" }); DropIndex("Web.StockProcessBalances", new[] { "ProductId" }); DropIndex("Web.StockInOuts", new[] { "StockInId" }); DropIndex("Web.StockInOuts", new[] { "StockOutId" }); DropIndex("Web.StockBalances", new[] { "CostCenterId" }); DropIndex("Web.StockBalances", new[] { "GodownId" }); DropIndex("Web.StockBalances", new[] { "ProcessId" }); DropIndex("Web.StockBalances", new[] { "Dimension2Id" }); DropIndex("Web.StockBalances", new[] { "Dimension1Id" }); DropIndex("Web.StockBalances", new[] { "ProductId" }); DropIndex("Web.StockAdjs", "IX_Stock_DocID"); DropIndex("Web.StockAdjs", new[] { "StockOutId" }); DropIndex("Web.StockAdjs", new[] { "StockInId" }); DropIndex("Web.SchemeRateDetails", new[] { "UnitId" }); DropIndex("Web.SchemeRateDetails", new[] { "SchemeId" }); DropIndex("Web.SchemeHeaders", new[] { "ProcessId" }); DropIndex("Web.SchemeHeaders", "IX_Scheme_SchemeName"); DropIndex("Web.SchemeDateDetails", new[] { "SchemeId" }); DropIndex("Web.SaleOrderSettings", new[] { "ProcessId" }); DropIndex("Web.SaleOrderSettings", new[] { "CalculationId" }); DropIndex("Web.SaleOrderSettings", new[] { "ImportMenuId" }); DropIndex("Web.SaleOrderSettings", new[] { "UnitConversionForId" }); DropIndex("Web.SaleOrderSettings", new[] { "DivisionId" }); DropIndex("Web.SaleOrderSettings", new[] { "SiteId" }); DropIndex("Web.SaleOrderSettings", new[] { "DeliveryTermsId" }); DropIndex("Web.SaleOrderSettings", new[] { "CurrencyId" }); DropIndex("Web.SaleOrderSettings", new[] { "ShipMethodId" }); DropIndex("Web.SaleOrderSettings", new[] { "DocTypeId" }); DropIndex("Web.SaleOrderRateAmendmentLines", new[] { "SaleOrderLineId" }); DropIndex("Web.SaleOrderRateAmendmentLines", new[] { "SaleOrderAmendmentHeaderId" }); DropIndex("Web.SaleOrderQtyAmendmentLines", new[] { "SaleOrderLineId" }); DropIndex("Web.SaleOrderQtyAmendmentLines", new[] { "SaleOrderAmendmentHeaderId" }); DropIndex("Web.SaleOrderLineStatus", new[] { "SaleOrderLineId" }); DropIndex("Web.SaleOrderCancelLines", new[] { "SaleOrderCancelHeaderId" }); DropIndex("Web.SaleOrderCancelLines", new[] { "SaleOrderLineId" }); DropIndex("Web.SaleOrderCancelHeaders", new[] { "SiteId" }); DropIndex("Web.SaleOrderCancelHeaders", new[] { "BuyerId" }); DropIndex("Web.SaleOrderCancelHeaders", new[] { "DivisionId" }); DropIndex("Web.SaleOrderCancelHeaders", new[] { "ReasonId" }); DropIndex("Web.SaleOrderCancelHeaders", new[] { "DocTypeId" }); DropIndex("Web.SaleOrderAmendmentHeaders", new[] { "BuyerId" }); DropIndex("Web.SaleOrderAmendmentHeaders", new[] { "ReasonId" }); DropIndex("Web.SaleOrderAmendmentHeaders", new[] { "SiteId" }); DropIndex("Web.SaleOrderAmendmentHeaders", new[] { "DivisionId" }); DropIndex("Web.SaleOrderAmendmentHeaders", new[] { "DocTypeId" }); DropIndex("Web.SaleInvoiceSettings", new[] { "GodownId" }); DropIndex("Web.SaleInvoiceSettings", new[] { "SalesTaxGroupId" }); DropIndex("Web.SaleInvoiceSettings", new[] { "ShipMethodId" }); DropIndex("Web.SaleInvoiceSettings", new[] { "DeliveryTermsId" }); DropIndex("Web.SaleInvoiceSettings", new[] { "ProcessId" }); DropIndex("Web.SaleInvoiceSettings", new[] { "CurrencyId" }); DropIndex("Web.SaleInvoiceSettings", new[] { "ImportMenuId" }); DropIndex("Web.SaleInvoiceSettings", new[] { "DocTypeDispatchReturnId" }); DropIndex("Web.SaleInvoiceSettings", new[] { "UnitConversionForId" }); DropIndex("Web.SaleInvoiceSettings", new[] { "CalculationId" }); DropIndex("Web.SaleInvoiceSettings", new[] { "SaleDispatchDocTypeId" }); DropIndex("Web.SaleInvoiceSettings", new[] { "DocTypePackingHeaderId" }); DropIndex("Web.SaleInvoiceSettings", new[] { "DivisionId" }); DropIndex("Web.SaleInvoiceSettings", new[] { "SiteId" }); DropIndex("Web.SaleInvoiceSettings", new[] { "DocTypeId" }); DropIndex("Web.SaleInvoiceReturnLineCharges", new[] { "ParentChargeId" }); DropIndex("Web.SaleInvoiceReturnLineCharges", new[] { "CostCenterId" }); DropIndex("Web.SaleInvoiceReturnLineCharges", new[] { "ContraLedgerAccountId" }); DropIndex("Web.SaleInvoiceReturnLineCharges", new[] { "LedgerAccountCrId" }); DropIndex("Web.SaleInvoiceReturnLineCharges", new[] { "LedgerAccountDrId" }); DropIndex("Web.SaleInvoiceReturnLineCharges", new[] { "PersonID" }); DropIndex("Web.SaleInvoiceReturnLineCharges", new[] { "CalculateOnId" }); DropIndex("Web.SaleInvoiceReturnLineCharges", new[] { "ChargeTypeId" }); DropIndex("Web.SaleInvoiceReturnLineCharges", new[] { "ChargeId" }); DropIndex("Web.SaleInvoiceReturnLineCharges", new[] { "LineTableId" }); DropIndex("Web.SaleInvoiceReturnLines", new[] { "DealUnitId" }); DropIndex("Web.SaleInvoiceReturnLines", new[] { "SaleDispatchReturnLineId" }); DropIndex("Web.SaleInvoiceReturnLines", new[] { "SaleInvoiceLineId" }); DropIndex("Web.SaleInvoiceReturnLines", new[] { "SaleInvoiceReturnHeaderId" }); DropIndex("Web.SaleInvoiceReturnHeaderCharges", new[] { "ParentChargeId" }); DropIndex("Web.SaleInvoiceReturnHeaderCharges", new[] { "CostCenterId" }); DropIndex("Web.SaleInvoiceReturnHeaderCharges", new[] { "ContraLedgerAccountId" }); DropIndex("Web.SaleInvoiceReturnHeaderCharges", new[] { "LedgerAccountCrId" }); DropIndex("Web.SaleInvoiceReturnHeaderCharges", new[] { "LedgerAccountDrId" }); DropIndex("Web.SaleInvoiceReturnHeaderCharges", new[] { "PersonID" }); DropIndex("Web.SaleInvoiceReturnHeaderCharges", new[] { "CalculateOnId" }); DropIndex("Web.SaleInvoiceReturnHeaderCharges", new[] { "ProductChargeId" }); DropIndex("Web.SaleInvoiceReturnHeaderCharges", new[] { "ChargeTypeId" }); DropIndex("Web.SaleInvoiceReturnHeaderCharges", new[] { "ChargeId" }); DropIndex("Web.SaleInvoiceReturnHeaderCharges", new[] { "HeaderTableId" }); DropIndex("Web.SaleInvoiceReturnHeaders", new[] { "SaleDispatchReturnHeaderId" }); DropIndex("Web.SaleInvoiceReturnHeaders", new[] { "CurrencyId" }); DropIndex("Web.SaleInvoiceReturnHeaders", new[] { "SalesTaxGroupPartyId" }); DropIndex("Web.SaleInvoiceReturnHeaders", new[] { "SalesTaxGroupId" }); DropIndex("Web.SaleInvoiceReturnHeaders", new[] { "BuyerId" }); DropIndex("Web.SaleInvoiceReturnHeaders", new[] { "LedgerHeaderId" }); DropIndex("Web.SaleInvoiceReturnHeaders", new[] { "ReasonId" }); DropIndex("Web.SaleInvoiceReturnHeaders", "IX_SaleInvoiceReturnHeader_DocID"); DropIndex("Web.SaleInvoiceLineCharges", new[] { "ParentChargeId" }); DropIndex("Web.SaleInvoiceLineCharges", new[] { "CostCenterId" }); DropIndex("Web.SaleInvoiceLineCharges", new[] { "ContraLedgerAccountId" }); DropIndex("Web.SaleInvoiceLineCharges", new[] { "LedgerAccountCrId" }); DropIndex("Web.SaleInvoiceLineCharges", new[] { "LedgerAccountDrId" }); DropIndex("Web.SaleInvoiceLineCharges", new[] { "PersonID" }); DropIndex("Web.SaleInvoiceLineCharges", new[] { "CalculateOnId" }); DropIndex("Web.SaleInvoiceLineCharges", new[] { "ChargeTypeId" }); DropIndex("Web.SaleInvoiceLineCharges", new[] { "ChargeId" }); DropIndex("Web.SaleInvoiceLineCharges", new[] { "LineTableId" }); DropIndex("Web.SaleInvoiceHeaderCharges", new[] { "ParentChargeId" }); DropIndex("Web.SaleInvoiceHeaderCharges", new[] { "CostCenterId" }); DropIndex("Web.SaleInvoiceHeaderCharges", new[] { "ContraLedgerAccountId" }); DropIndex("Web.SaleInvoiceHeaderCharges", new[] { "LedgerAccountCrId" }); DropIndex("Web.SaleInvoiceHeaderCharges", new[] { "LedgerAccountDrId" }); DropIndex("Web.SaleInvoiceHeaderCharges", new[] { "PersonID" }); DropIndex("Web.SaleInvoiceHeaderCharges", new[] { "CalculateOnId" }); DropIndex("Web.SaleInvoiceHeaderCharges", new[] { "ProductChargeId" }); DropIndex("Web.SaleInvoiceHeaderCharges", new[] { "ChargeTypeId" }); DropIndex("Web.SaleInvoiceHeaderCharges", new[] { "ChargeId" }); DropIndex("Web.SaleInvoiceHeaderCharges", new[] { "HeaderTableId" }); DropIndex("Web.SaleDispatchSettings", new[] { "GodownId" }); DropIndex("Web.SaleDispatchSettings", new[] { "ShipMethodId" }); DropIndex("Web.SaleDispatchSettings", new[] { "DeliveryTermsId" }); DropIndex("Web.SaleDispatchSettings", new[] { "ProcessId" }); DropIndex("Web.SaleDispatchSettings", new[] { "ImportMenuId" }); DropIndex("Web.SaleDispatchSettings", new[] { "DocTypeDispatchReturnId" }); DropIndex("Web.SaleDispatchSettings", new[] { "UnitConversionForId" }); DropIndex("Web.SaleDispatchSettings", new[] { "DocTypePackingHeaderId" }); DropIndex("Web.SaleDispatchSettings", new[] { "DivisionId" }); DropIndex("Web.SaleDispatchSettings", new[] { "SiteId" }); DropIndex("Web.SaleDispatchSettings", new[] { "DocTypeId" }); DropIndex("Web.SaleDispatchReturnLines", new[] { "StockId" }); DropIndex("Web.SaleDispatchReturnLines", new[] { "DealUnitId" }); DropIndex("Web.SaleDispatchReturnLines", new[] { "SaleDispatchLineId" }); DropIndex("Web.SaleDispatchReturnLines", new[] { "SaleDispatchReturnHeaderId" }); DropIndex("Web.SaleDispatchReturnHeaders", new[] { "GodownId" }); DropIndex("Web.SaleDispatchReturnHeaders", new[] { "StockHeaderId" }); DropIndex("Web.SaleDispatchReturnHeaders", new[] { "BuyerId" }); DropIndex("Web.SaleDispatchReturnHeaders", new[] { "ReasonId" }); DropIndex("Web.SaleDispatchReturnHeaders", "IX_SaleDispatchReturnHeader_DocID"); DropIndex("Web.SaleDeliveryOrderSettings", new[] { "DivisionId" }); DropIndex("Web.SaleDeliveryOrderSettings", new[] { "SiteId" }); DropIndex("Web.SaleDeliveryOrderSettings", new[] { "ImportMenuId" }); DropIndex("Web.SaleDeliveryOrderSettings", new[] { "DocTypeId" }); DropIndex("Web.SaleDeliveryOrderCancelLines", new[] { "SaleDeliveryOrderLineId" }); DropIndex("Web.SaleDeliveryOrderCancelLines", new[] { "ProductUidId" }); DropIndex("Web.SaleDeliveryOrderCancelLines", new[] { "SaleDeliveryOrderCancelHeaderId" }); DropIndex("Web.SaleDeliveryOrderCancelHeaders", new[] { "OrderById" }); DropIndex("Web.SaleDeliveryOrderCancelHeaders", new[] { "BuyerId" }); DropIndex("Web.SaleDeliveryOrderCancelHeaders", new[] { "ReasonId" }); DropIndex("Web.SaleDeliveryOrderCancelHeaders", "IX_DeliveryOrderHeader_Unique"); DropIndex("Web.RugStencils", new[] { "ProductSizeId" }); DropIndex("Web.RugStencils", new[] { "ProductDesignId" }); DropIndex("Web.RugStencils", new[] { "StencilId" }); DropIndex("Web.Rug_RetentionPercentage", "IX_Stock_DocID"); DropIndex("Web.Rug_RetentionPercentage", new[] { "ProductCategoryId" }); DropIndex("Web.RouteLines", new[] { "CityId" }); DropIndex("Web.RouteLines", new[] { "RouteId" }); DropIndex("Web.RolesSites", new[] { "SiteId" }); DropIndex("Web.RolesSites", new[] { "RoleId" }); DropIndex("Web.RolesMenus", "IX_PurchaseOrderHeader_DocID"); DropIndex("Web.RolesMenus", new[] { "MenuId" }); DropIndex("Web.RolesMenus", new[] { "RoleId" }); DropIndex("Web.RolesDivisions", new[] { "DivisionId" }); DropIndex("Web.RolesDivisions", new[] { "RoleId" }); DropIndex("Web.RolesControllerActions", new[] { "ControllerActionId" }); DropIndex("Web.RolesControllerActions", new[] { "RoleId" }); DropIndex("Web.AspNetRoles", "RoleNameIndex"); DropIndex("Web.RequisitionSettings", new[] { "DefaultReasonId" }); DropIndex("Web.RequisitionSettings", new[] { "OnApproveMenuId" }); DropIndex("Web.RequisitionSettings", new[] { "OnSubmitMenuId" }); DropIndex("Web.RequisitionSettings", new[] { "DivisionId" }); DropIndex("Web.RequisitionSettings", new[] { "SiteId" }); DropIndex("Web.RequisitionSettings", new[] { "DocTypeId" }); DropIndex("Web.RequisitionLineStatus", new[] { "RequisitionLineId" }); DropIndex("Web.RequisitionCancelLines", new[] { "RequisitionLineId" }); DropIndex("Web.RequisitionCancelLines", new[] { "RequisitionCancelHeaderId" }); DropIndex("Web.RequisitionCancelHeaders", new[] { "ReferenceDocTypeId" }); DropIndex("Web.RequisitionCancelHeaders", new[] { "ReasonId" }); DropIndex("Web.RequisitionCancelHeaders", new[] { "PersonId" }); DropIndex("Web.RequisitionCancelHeaders", "IX_RequisitionCancelHeader_DocID"); DropIndex("Web.SubReports", new[] { "ReportHeaderId" }); DropIndex("Web.ReportLines", new[] { "ReportHeaderId" }); DropIndex("Web.ReportColumns", new[] { "SubReportHeaderId" }); DropIndex("Web.ReportColumns", new[] { "SubReportId" }); DropIndex("Web.ReportColumns", new[] { "ReportHeaderId" }); DropIndex("Web.RateListProductRateGroups", new[] { "ProductRateGroupId" }); DropIndex("Web.RateListProductRateGroups", new[] { "RateListHeaderId" }); DropIndex("Web.RateListPersonRateGroups", new[] { "PersonRateGroupId" }); DropIndex("Web.RateListPersonRateGroups", new[] { "RateListHeaderId" }); DropIndex("Web.RateListLineHistories", new[] { "Dimension2Id" }); DropIndex("Web.RateListLineHistories", new[] { "Dimension1Id" }); DropIndex("Web.RateListLineHistories", new[] { "ProductId" }); DropIndex("Web.RateListLineHistories", new[] { "ProductRateGroupId" }); DropIndex("Web.RateListLineHistories", new[] { "PersonRateGroupId" }); DropIndex("Web.RateListLineHistories", new[] { "RateListHeaderId" }); DropIndex("Web.RateListLines", new[] { "Dimension2Id" }); DropIndex("Web.RateListLines", new[] { "Dimension1Id" }); DropIndex("Web.RateListLines", new[] { "ProductId" }); DropIndex("Web.RateListLines", new[] { "ProductRateGroupId" }); DropIndex("Web.RateListLines", new[] { "PersonRateGroupId" }); DropIndex("Web.RateListLines", new[] { "RateListHeaderId" }); DropIndex("Web.RateListHistories", new[] { "DealUnitId" }); DropIndex("Web.RateListHistories", new[] { "ProductId" }); DropIndex("Web.RateListHistories", new[] { "DocTypeId" }); DropIndex("Web.RateListHistories", new[] { "PersonRateGroupId" }); DropIndex("Web.RateListHistories", new[] { "ProcessId" }); DropIndex("Web.RateListHeaders", new[] { "DealUnitId" }); DropIndex("Web.RateListHeaders", "IX_RateListHeader_Name"); DropIndex("Web.RateListHeaders", "IX_RateListHeader_DocID"); DropIndex("Web.RateLists", new[] { "DealUnitId" }); DropIndex("Web.RateLists", new[] { "ProductId" }); DropIndex("Web.RateLists", new[] { "DocTypeId" }); DropIndex("Web.RateLists", new[] { "PersonRateGroupId" }); DropIndex("Web.RateLists", new[] { "ProcessId" }); DropIndex("Web.RateConversionSettings", new[] { "ProcessId" }); DropIndex("Web.RateConversionSettings", new[] { "DivisionId" }); DropIndex("Web.RateConversionSettings", new[] { "SiteId" }); DropIndex("Web.RateConversionSettings", new[] { "DocTypeId" }); DropIndex("Web.PurchaseQuotationSettings", new[] { "OnApproveMenuId" }); DropIndex("Web.PurchaseQuotationSettings", new[] { "OnSubmitMenuId" }); DropIndex("Web.PurchaseQuotationSettings", new[] { "UnitConversionForId" }); DropIndex("Web.PurchaseQuotationSettings", new[] { "CalculationId" }); DropIndex("Web.PurchaseQuotationSettings", new[] { "DivisionId" }); DropIndex("Web.PurchaseQuotationSettings", new[] { "SiteId" }); DropIndex("Web.PurchaseQuotationSettings", new[] { "DocTypeId" }); DropIndex("Web.PurchaseQuotationLineCharges", new[] { "ParentChargeId" }); DropIndex("Web.PurchaseQuotationLineCharges", new[] { "CostCenterId" }); DropIndex("Web.PurchaseQuotationLineCharges", new[] { "ContraLedgerAccountId" }); DropIndex("Web.PurchaseQuotationLineCharges", new[] { "LedgerAccountCrId" }); DropIndex("Web.PurchaseQuotationLineCharges", new[] { "LedgerAccountDrId" }); DropIndex("Web.PurchaseQuotationLineCharges", new[] { "PersonID" }); DropIndex("Web.PurchaseQuotationLineCharges", new[] { "CalculateOnId" }); DropIndex("Web.PurchaseQuotationLineCharges", new[] { "ChargeTypeId" }); DropIndex("Web.PurchaseQuotationLineCharges", new[] { "ChargeId" }); DropIndex("Web.PurchaseQuotationLineCharges", new[] { "LineTableId" }); DropIndex("Web.PurchaseQuotationHeaderCharges", new[] { "ParentChargeId" }); DropIndex("Web.PurchaseQuotationHeaderCharges", new[] { "CostCenterId" }); DropIndex("Web.PurchaseQuotationHeaderCharges", new[] { "ContraLedgerAccountId" }); DropIndex("Web.PurchaseQuotationHeaderCharges", new[] { "LedgerAccountCrId" }); DropIndex("Web.PurchaseQuotationHeaderCharges", new[] { "LedgerAccountDrId" }); DropIndex("Web.PurchaseQuotationHeaderCharges", new[] { "PersonID" }); DropIndex("Web.PurchaseQuotationHeaderCharges", new[] { "CalculateOnId" }); DropIndex("Web.PurchaseQuotationHeaderCharges", new[] { "ProductChargeId" }); DropIndex("Web.PurchaseQuotationHeaderCharges", new[] { "ChargeTypeId" }); DropIndex("Web.PurchaseQuotationHeaderCharges", new[] { "ChargeId" }); DropIndex("Web.PurchaseQuotationHeaderCharges", new[] { "HeaderTableId" }); DropIndex("Web.PurchaseQuotationLines", new[] { "DealUnitId" }); DropIndex("Web.PurchaseQuotationLines", new[] { "SalesTaxGroupId" }); DropIndex("Web.PurchaseQuotationLines", new[] { "Dimension2Id" }); DropIndex("Web.PurchaseQuotationLines", new[] { "Dimension1Id" }); DropIndex("Web.PurchaseQuotationLines", new[] { "PurchaseIndentLineId" }); DropIndex("Web.PurchaseQuotationLines", new[] { "ProductId" }); DropIndex("Web.PurchaseQuotationLines", new[] { "PurchaseQuotationHeaderId" }); DropIndex("Web.PurchaseQuotationHeaders", new[] { "ShipMethodId" }); DropIndex("Web.PurchaseQuotationHeaders", new[] { "DeliveryTermsId" }); DropIndex("Web.PurchaseQuotationHeaders", new[] { "UnitConversionForId" }); DropIndex("Web.PurchaseQuotationHeaders", new[] { "SalesTaxGroupId" }); DropIndex("Web.PurchaseQuotationHeaders", new[] { "CurrencyId" }); DropIndex("Web.PurchaseQuotationHeaders", new[] { "BillingAccountId" }); DropIndex("Web.PurchaseQuotationHeaders", new[] { "SupplierId" }); DropIndex("Web.PurchaseQuotationHeaders", "IX_PurchaseQuotationHeader_DocID"); DropIndex("Web.PurchaseOrderSettings", new[] { "OnApproveMenuId" }); DropIndex("Web.PurchaseOrderSettings", new[] { "OnSubmitMenuId" }); DropIndex("Web.PurchaseOrderSettings", new[] { "UnitConversionForId" }); DropIndex("Web.PurchaseOrderSettings", new[] { "CalculationId" }); DropIndex("Web.PurchaseOrderSettings", new[] { "DivisionId" }); DropIndex("Web.PurchaseOrderSettings", new[] { "SiteId" }); DropIndex("Web.PurchaseOrderSettings", new[] { "DocTypeId" }); DropIndex("Web.PurchaseOrderRateAmendmentLineCharges", new[] { "ParentChargeId" }); DropIndex("Web.PurchaseOrderRateAmendmentLineCharges", new[] { "CostCenterId" }); DropIndex("Web.PurchaseOrderRateAmendmentLineCharges", new[] { "ContraLedgerAccountId" }); DropIndex("Web.PurchaseOrderRateAmendmentLineCharges", new[] { "LedgerAccountCrId" }); DropIndex("Web.PurchaseOrderRateAmendmentLineCharges", new[] { "LedgerAccountDrId" }); DropIndex("Web.PurchaseOrderRateAmendmentLineCharges", new[] { "PersonID" }); DropIndex("Web.PurchaseOrderRateAmendmentLineCharges", new[] { "CalculateOnId" }); DropIndex("Web.PurchaseOrderRateAmendmentLineCharges", new[] { "ChargeTypeId" }); DropIndex("Web.PurchaseOrderRateAmendmentLineCharges", new[] { "ChargeId" }); DropIndex("Web.PurchaseOrderRateAmendmentLineCharges", new[] { "LineTableId" }); DropIndex("Web.PurchaseOrderRateAmendmentLines", new[] { "PurchaseOrderLineId" }); DropIndex("Web.PurchaseOrderRateAmendmentLines", new[] { "PurchaseOrderAmendmentHeaderId" }); DropIndex("Web.PurchaseOrderQtyAmendmentLines", new[] { "PurchaseOrderLineId" }); DropIndex("Web.PurchaseOrderQtyAmendmentLines", new[] { "PurchaseOrderAmendmentHeaderId" }); DropIndex("Web.PurchaseOrderLineStatus", new[] { "PurchaseOrderLineId" }); DropIndex("Web.PurchaseOrderLineCharges", new[] { "ParentChargeId" }); DropIndex("Web.PurchaseOrderLineCharges", new[] { "CostCenterId" }); DropIndex("Web.PurchaseOrderLineCharges", new[] { "ContraLedgerAccountId" }); DropIndex("Web.PurchaseOrderLineCharges", new[] { "LedgerAccountCrId" }); DropIndex("Web.PurchaseOrderLineCharges", new[] { "LedgerAccountDrId" }); DropIndex("Web.PurchaseOrderLineCharges", new[] { "PersonID" }); DropIndex("Web.PurchaseOrderLineCharges", new[] { "CalculateOnId" }); DropIndex("Web.PurchaseOrderLineCharges", new[] { "ChargeTypeId" }); DropIndex("Web.PurchaseOrderLineCharges", new[] { "ChargeId" }); DropIndex("Web.PurchaseOrderLineCharges", new[] { "LineTableId" }); DropIndex("Web.PurchaseOrderInspectionSettings", new[] { "DivisionId" }); DropIndex("Web.PurchaseOrderInspectionSettings", new[] { "SiteId" }); DropIndex("Web.PurchaseOrderInspectionSettings", new[] { "ProcessId" }); DropIndex("Web.PurchaseOrderInspectionSettings", new[] { "ImportMenuId" }); DropIndex("Web.PurchaseOrderInspectionSettings", new[] { "DocTypeId" }); DropIndex("Web.PurchaseOrderInspectionRequestSettings", new[] { "DivisionId" }); DropIndex("Web.PurchaseOrderInspectionRequestSettings", new[] { "SiteId" }); DropIndex("Web.PurchaseOrderInspectionRequestSettings", new[] { "ProcessId" }); DropIndex("Web.PurchaseOrderInspectionRequestSettings", new[] { "ImportMenuId" }); DropIndex("Web.PurchaseOrderInspectionRequestSettings", new[] { "DocTypeId" }); DropIndex("Web.PurchaseOrderInspectionRequestCancelLines", new[] { "PurchaseOrderInspectionRequestLineId" }); DropIndex("Web.PurchaseOrderInspectionRequestCancelLines", new[] { "ProductUidId" }); DropIndex("Web.PurchaseOrderInspectionRequestCancelLines", new[] { "PurchaseOrderInspectionRequestCancelHeaderId" }); DropIndex("Web.PurchaseOrderInspectionRequestCancelHeaders", new[] { "ReasonId" }); DropIndex("Web.PurchaseOrderInspectionRequestCancelHeaders", new[] { "SupplierId" }); DropIndex("Web.PurchaseOrderInspectionRequestCancelHeaders", new[] { "ProcessId" }); DropIndex("Web.PurchaseOrderInspectionRequestCancelHeaders", new[] { "SiteId" }); DropIndex("Web.PurchaseOrderInspectionRequestCancelHeaders", new[] { "DivisionId" }); DropIndex("Web.PurchaseOrderInspectionRequestCancelHeaders", new[] { "DocTypeId" }); DropIndex("Web.PurchaseOrderInspectionRequestHeaders", new[] { "SupplierId" }); DropIndex("Web.PurchaseOrderInspectionRequestHeaders", new[] { "ProcessId" }); DropIndex("Web.PurchaseOrderInspectionRequestHeaders", new[] { "SiteId" }); DropIndex("Web.PurchaseOrderInspectionRequestHeaders", new[] { "DivisionId" }); DropIndex("Web.PurchaseOrderInspectionRequestHeaders", new[] { "DocTypeId" }); DropIndex("Web.PurchaseOrderInspectionRequestLines", new[] { "PurchaseOrderLineId" }); DropIndex("Web.PurchaseOrderInspectionRequestLines", new[] { "ProductUidId" }); DropIndex("Web.PurchaseOrderInspectionRequestLines", new[] { "PurchaseOrderInspectionRequestHeaderId" }); DropIndex("Web.PurchaseOrderInspectionLines", new[] { "ReferenceDocTypeId" }); DropIndex("Web.PurchaseOrderInspectionLines", new[] { "PurchaseOrderLineId" }); DropIndex("Web.PurchaseOrderInspectionLines", new[] { "PurchaseOrderInspectionRequestLineId" }); DropIndex("Web.PurchaseOrderInspectionLines", new[] { "ProductUidId" }); DropIndex("Web.PurchaseOrderInspectionLines", new[] { "PurchaseOrderInspectionHeaderId" }); DropIndex("Web.PurchaseOrderInspectionHeaders", new[] { "ReferenceDocTypeId" }); DropIndex("Web.PurchaseOrderInspectionHeaders", new[] { "InspectionById" }); DropIndex("Web.PurchaseOrderInspectionHeaders", new[] { "SupplierId" }); DropIndex("Web.PurchaseOrderInspectionHeaders", new[] { "ProcessId" }); DropIndex("Web.PurchaseOrderInspectionHeaders", "IX_PurchaseOrderInspectionHeader_DocID"); DropIndex("Web.PurchaseOrderHeaderStatus", new[] { "PurchaseOrderHeaderId" }); DropIndex("Web.PurchaseOrderHeaderCharges", new[] { "ParentChargeId" }); DropIndex("Web.PurchaseOrderHeaderCharges", new[] { "CostCenterId" }); DropIndex("Web.PurchaseOrderHeaderCharges", new[] { "ContraLedgerAccountId" }); DropIndex("Web.PurchaseOrderHeaderCharges", new[] { "LedgerAccountCrId" }); DropIndex("Web.PurchaseOrderHeaderCharges", new[] { "LedgerAccountDrId" }); DropIndex("Web.PurchaseOrderHeaderCharges", new[] { "PersonID" }); DropIndex("Web.PurchaseOrderHeaderCharges", new[] { "CalculateOnId" }); DropIndex("Web.PurchaseOrderHeaderCharges", new[] { "ProductChargeId" }); DropIndex("Web.PurchaseOrderHeaderCharges", new[] { "ChargeTypeId" }); DropIndex("Web.PurchaseOrderHeaderCharges", new[] { "ChargeId" }); DropIndex("Web.PurchaseOrderHeaderCharges", new[] { "HeaderTableId" }); DropIndex("Web.PurchaseOrderAmendmentHeaderCharges", new[] { "ParentChargeId" }); DropIndex("Web.PurchaseOrderAmendmentHeaderCharges", new[] { "CostCenterId" }); DropIndex("Web.PurchaseOrderAmendmentHeaderCharges", new[] { "ContraLedgerAccountId" }); DropIndex("Web.PurchaseOrderAmendmentHeaderCharges", new[] { "LedgerAccountCrId" }); DropIndex("Web.PurchaseOrderAmendmentHeaderCharges", new[] { "LedgerAccountDrId" }); DropIndex("Web.PurchaseOrderAmendmentHeaderCharges", new[] { "PersonID" }); DropIndex("Web.PurchaseOrderAmendmentHeaderCharges", new[] { "CalculateOnId" }); DropIndex("Web.PurchaseOrderAmendmentHeaderCharges", new[] { "ProductChargeId" }); DropIndex("Web.PurchaseOrderAmendmentHeaderCharges", new[] { "ChargeTypeId" }); DropIndex("Web.PurchaseOrderAmendmentHeaderCharges", new[] { "ChargeId" }); DropIndex("Web.PurchaseOrderAmendmentHeaderCharges", new[] { "HeaderTableId" }); DropIndex("Web.PurchaseOrderAmendmentHeaders", new[] { "SupplierId" }); DropIndex("Web.PurchaseOrderAmendmentHeaders", new[] { "SiteId" }); DropIndex("Web.PurchaseOrderAmendmentHeaders", new[] { "DivisionId" }); DropIndex("Web.PurchaseOrderAmendmentHeaders", new[] { "DocTypeId" }); DropIndex("Web.PurchaseInvoiceSettings", new[] { "ImportMenuId" }); DropIndex("Web.PurchaseInvoiceSettings", new[] { "UnitConversionForId" }); DropIndex("Web.PurchaseInvoiceSettings", new[] { "CalculationId" }); DropIndex("Web.PurchaseInvoiceSettings", new[] { "PurchaseGoodsReceiptDocTypeId" }); DropIndex("Web.PurchaseInvoiceSettings", new[] { "DocTypeGoodsReturnId" }); DropIndex("Web.PurchaseInvoiceSettings", new[] { "DivisionId" }); DropIndex("Web.PurchaseInvoiceSettings", new[] { "SiteId" }); DropIndex("Web.PurchaseInvoiceSettings", new[] { "DocTypeId" }); DropIndex("Web.PurchaseInvoiceReturnLineCharges", new[] { "ParentChargeId" }); DropIndex("Web.PurchaseInvoiceReturnLineCharges", new[] { "CostCenterId" }); DropIndex("Web.PurchaseInvoiceReturnLineCharges", new[] { "ContraLedgerAccountId" }); DropIndex("Web.PurchaseInvoiceReturnLineCharges", new[] { "LedgerAccountCrId" }); DropIndex("Web.PurchaseInvoiceReturnLineCharges", new[] { "LedgerAccountDrId" }); DropIndex("Web.PurchaseInvoiceReturnLineCharges", new[] { "PersonID" }); DropIndex("Web.PurchaseInvoiceReturnLineCharges", new[] { "CalculateOnId" }); DropIndex("Web.PurchaseInvoiceReturnLineCharges", new[] { "ChargeTypeId" }); DropIndex("Web.PurchaseInvoiceReturnLineCharges", new[] { "ChargeId" }); DropIndex("Web.PurchaseInvoiceReturnLineCharges", new[] { "LineTableId" }); DropIndex("Web.PurchaseInvoiceReturnLines", new[] { "DealUnitId" }); DropIndex("Web.PurchaseInvoiceReturnLines", new[] { "PurchaseGoodsReturnLineId" }); DropIndex("Web.PurchaseInvoiceReturnLines", new[] { "PurchaseInvoiceLineId" }); DropIndex("Web.PurchaseInvoiceReturnLines", new[] { "PurchaseInvoiceReturnHeaderId" }); DropIndex("Web.PurchaseInvoiceReturnHeaderCharges", new[] { "ParentChargeId" }); DropIndex("Web.PurchaseInvoiceReturnHeaderCharges", new[] { "CostCenterId" }); DropIndex("Web.PurchaseInvoiceReturnHeaderCharges", new[] { "ContraLedgerAccountId" }); DropIndex("Web.PurchaseInvoiceReturnHeaderCharges", new[] { "LedgerAccountCrId" }); DropIndex("Web.PurchaseInvoiceReturnHeaderCharges", new[] { "LedgerAccountDrId" }); DropIndex("Web.PurchaseInvoiceReturnHeaderCharges", new[] { "PersonID" }); DropIndex("Web.PurchaseInvoiceReturnHeaderCharges", new[] { "CalculateOnId" }); DropIndex("Web.PurchaseInvoiceReturnHeaderCharges", new[] { "ProductChargeId" }); DropIndex("Web.PurchaseInvoiceReturnHeaderCharges", new[] { "ChargeTypeId" }); DropIndex("Web.PurchaseInvoiceReturnHeaderCharges", new[] { "ChargeId" }); DropIndex("Web.PurchaseInvoiceReturnHeaderCharges", new[] { "HeaderTableId" }); DropIndex("Web.PurchaseInvoiceReturnHeaders", new[] { "PurchaseGoodsReturnHeaderId" }); DropIndex("Web.PurchaseInvoiceReturnHeaders", new[] { "CurrencyId" }); DropIndex("Web.PurchaseInvoiceReturnHeaders", new[] { "SalesTaxGroupPartyId" }); DropIndex("Web.PurchaseInvoiceReturnHeaders", new[] { "SalesTaxGroupId" }); DropIndex("Web.PurchaseInvoiceReturnHeaders", new[] { "SupplierId" }); DropIndex("Web.PurchaseInvoiceReturnHeaders", new[] { "LedgerHeaderId" }); DropIndex("Web.PurchaseInvoiceReturnHeaders", new[] { "ReasonId" }); DropIndex("Web.PurchaseInvoiceReturnHeaders", "IX_PurchaseInvoiceReturnHeader_DocID"); DropIndex("Web.PurchaseInvoiceRateAmendmentLines", new[] { "PurchaseInvoiceLineId" }); DropIndex("Web.PurchaseInvoiceRateAmendmentLines", new[] { "PurchaseInvoiceAmendmentHeaderId" }); DropIndex("Web.PurchaseInvoiceLineCharges", new[] { "ParentChargeId" }); DropIndex("Web.PurchaseInvoiceLineCharges", new[] { "CostCenterId" }); DropIndex("Web.PurchaseInvoiceLineCharges", new[] { "ContraLedgerAccountId" }); DropIndex("Web.PurchaseInvoiceLineCharges", new[] { "LedgerAccountCrId" }); DropIndex("Web.PurchaseInvoiceLineCharges", new[] { "LedgerAccountDrId" }); DropIndex("Web.PurchaseInvoiceLineCharges", new[] { "PersonID" }); DropIndex("Web.PurchaseInvoiceLineCharges", new[] { "CalculateOnId" }); DropIndex("Web.PurchaseInvoiceLineCharges", new[] { "ChargeTypeId" }); DropIndex("Web.PurchaseInvoiceLineCharges", new[] { "ChargeId" }); DropIndex("Web.PurchaseInvoiceLineCharges", new[] { "LineTableId" }); DropIndex("Web.PurchaseInvoiceHeaderCharges", new[] { "ParentChargeId" }); DropIndex("Web.PurchaseInvoiceHeaderCharges", new[] { "CostCenterId" }); DropIndex("Web.PurchaseInvoiceHeaderCharges", new[] { "ContraLedgerAccountId" }); DropIndex("Web.PurchaseInvoiceHeaderCharges", new[] { "LedgerAccountCrId" }); DropIndex("Web.PurchaseInvoiceHeaderCharges", new[] { "LedgerAccountDrId" }); DropIndex("Web.PurchaseInvoiceHeaderCharges", new[] { "PersonID" }); DropIndex("Web.PurchaseInvoiceHeaderCharges", new[] { "CalculateOnId" }); DropIndex("Web.PurchaseInvoiceHeaderCharges", new[] { "ProductChargeId" }); DropIndex("Web.PurchaseInvoiceHeaderCharges", new[] { "ChargeTypeId" }); DropIndex("Web.PurchaseInvoiceHeaderCharges", new[] { "ChargeId" }); DropIndex("Web.PurchaseInvoiceHeaderCharges", new[] { "HeaderTableId" }); DropIndex("Web.PurchaseInvoiceLines", new[] { "ReferenceDocTypeId" }); DropIndex("Web.PurchaseInvoiceLines", new[] { "DealUnitId" }); DropIndex("Web.PurchaseInvoiceLines", new[] { "SalesTaxGroupId" }); DropIndex("Web.PurchaseInvoiceLines", new[] { "PurchaseGoodsReceiptLineId" }); DropIndex("Web.PurchaseInvoiceLines", new[] { "PurchaseInvoiceHeaderId" }); DropIndex("Web.PurchaseInvoiceHeaders", new[] { "ReferenceDocTypeId" }); DropIndex("Web.PurchaseInvoiceHeaders", new[] { "ShipMethodId" }); DropIndex("Web.PurchaseInvoiceHeaders", new[] { "DeliveryTermsId" }); DropIndex("Web.PurchaseInvoiceHeaders", new[] { "PurchaseGoodsReceiptHeaderId" }); DropIndex("Web.PurchaseInvoiceHeaders", new[] { "UnitConversionForId" }); DropIndex("Web.PurchaseInvoiceHeaders", new[] { "SalesTaxGroupPartyId" }); DropIndex("Web.PurchaseInvoiceHeaders", new[] { "SalesTaxGroupId" }); DropIndex("Web.PurchaseInvoiceHeaders", new[] { "BillingAccountId" }); DropIndex("Web.PurchaseInvoiceHeaders", new[] { "SupplierId" }); DropIndex("Web.PurchaseInvoiceHeaders", new[] { "CurrencyId" }); DropIndex("Web.PurchaseInvoiceHeaders", new[] { "LedgerHeaderId" }); DropIndex("Web.PurchaseInvoiceHeaders", "IX_PurchaseInvoiceHeader_DocID"); DropIndex("Web.PurchaseInvoiceAmendmentHeaders", new[] { "SupplierId" }); DropIndex("Web.PurchaseInvoiceAmendmentHeaders", new[] { "SiteId" }); DropIndex("Web.PurchaseInvoiceAmendmentHeaders", new[] { "DivisionId" }); DropIndex("Web.PurchaseInvoiceAmendmentHeaders", new[] { "DocTypeId" }); DropIndex("Web.PurchaseIndentSettings", new[] { "DivisionId" }); DropIndex("Web.PurchaseIndentSettings", new[] { "SiteId" }); DropIndex("Web.PurchaseIndentSettings", new[] { "DocTypeId" }); DropIndex("Web.PurchaseIndentLineStatus", new[] { "PurchaseIndentLineId" }); DropIndex("Web.PurchaseGoodsReturnLines", new[] { "ProductUidCurrentProcessId" }); DropIndex("Web.PurchaseGoodsReturnLines", new[] { "ProductUidCurrentGodownId" }); DropIndex("Web.PurchaseGoodsReturnLines", new[] { "ProductUidLastTransactionPersonId" }); DropIndex("Web.PurchaseGoodsReturnLines", new[] { "ProductUidLastTransactionDocTypeId" }); DropIndex("Web.PurchaseGoodsReturnLines", new[] { "StockId" }); DropIndex("Web.PurchaseGoodsReturnLines", new[] { "DealUnitId" }); DropIndex("Web.PurchaseGoodsReturnLines", new[] { "PurchaseGoodsReceiptLineId" }); DropIndex("Web.PurchaseGoodsReturnLines", new[] { "PurchaseGoodsReturnHeaderId" }); DropIndex("Web.PurchaseGoodsReturnHeaders", new[] { "GodownId" }); DropIndex("Web.PurchaseGoodsReturnHeaders", new[] { "StockHeaderId" }); DropIndex("Web.PurchaseGoodsReturnHeaders", new[] { "GatePassHeaderId" }); DropIndex("Web.PurchaseGoodsReturnHeaders", new[] { "SupplierId" }); DropIndex("Web.PurchaseGoodsReturnHeaders", new[] { "ReasonId" }); DropIndex("Web.PurchaseGoodsReturnHeaders", "IX_PurchaseGoodsReturnHeader_DocID"); DropIndex("Web.PurchaseGoodsReceiptSettings", new[] { "ImportMenuId" }); DropIndex("Web.PurchaseGoodsReceiptSettings", new[] { "UnitConversionForId" }); DropIndex("Web.PurchaseGoodsReceiptSettings", new[] { "DivisionId" }); DropIndex("Web.PurchaseGoodsReceiptSettings", new[] { "SiteId" }); DropIndex("Web.PurchaseGoodsReceiptSettings", new[] { "DocTypeId" }); DropIndex("Web.ProductUidSiteDetails", new[] { "CurrenctProcessId" }); DropIndex("Web.ProductUidSiteDetails", new[] { "CurrenctGodownId" }); DropIndex("Web.ProductUidSiteDetails", new[] { "LastTransactionPersonId" }); DropIndex("Web.ProductUidSiteDetails", new[] { "LastTransactionDocTypeId" }); DropIndex("Web.ProductUidSiteDetails", new[] { "GenPersonId" }); DropIndex("Web.ProductUidSiteDetails", new[] { "GenDocTypeId" }); DropIndex("Web.ProductUidSiteDetails", new[] { "Dimension2Id" }); DropIndex("Web.ProductUidSiteDetails", new[] { "Dimension1Id" }); DropIndex("Web.ProductUidSiteDetails", new[] { "ProductId" }); DropIndex("Web.ProductUidSiteDetails", new[] { "ProductUidHeaderId" }); DropIndex("Web.Tags", "IX_Tag_TagName"); DropIndex("Web.ProductTags", new[] { "TagId" }); DropIndex("Web.ProductTags", new[] { "ProductId" }); DropIndex("Web.ProductSiteDetails", new[] { "GodownId" }); DropIndex("Web.ProductSiteDetails", new[] { "SiteId" }); DropIndex("Web.ProductSiteDetails", new[] { "DivisionId" }); DropIndex("Web.ProductSiteDetails", new[] { "ProductId" }); DropIndex("Web.ProductShapes", "IX_ProductShape_ProductShapeName"); DropIndex("Web.ProductProcesses", new[] { "ProductRateGroupId" }); DropIndex("Web.ProductProcesses", new[] { "Dimension2Id" }); DropIndex("Web.ProductProcesses", new[] { "Dimension1Id" }); DropIndex("Web.ProductProcesses", new[] { "ProcessId" }); DropIndex("Web.ProductProcesses", new[] { "ProductId" }); DropIndex("Web.ProductionOrderSettings", new[] { "DivisionId" }); DropIndex("Web.ProductionOrderSettings", new[] { "SiteId" }); DropIndex("Web.ProductionOrderSettings", new[] { "DocTypeId" }); DropIndex("Web.ProductCustomGroupLines", new[] { "ProductId" }); DropIndex("Web.ProductCustomGroupLines", new[] { "ProductCustomGroupHeaderId" }); DropIndex("Web.ProductCustomGroupHeaders", "IX_ProductCustomGroup_ProductCustomGroupName"); DropIndex("Web.ProductAlias", new[] { "ProductId" }); DropIndex("Web.ProductAlias", "IX_ProductAlias_ProductAliasName"); DropIndex("Web.ProdOrderSettings", new[] { "DivisionId" }); DropIndex("Web.ProdOrderSettings", new[] { "SiteId" }); DropIndex("Web.ProdOrderSettings", new[] { "DocTypeId" }); DropIndex("Web.ProdOrderLineStatus", new[] { "ProdOrderLineId" }); DropIndex("Web.ProdOrderHeaderStatus", new[] { "ProdOrderHeaderId" }); DropIndex("Web.ProdOrderCancelLines", new[] { "ReferenceDocTypeId" }); DropIndex("Web.ProdOrderCancelLines", new[] { "ProdOrderLineId" }); DropIndex("Web.ProdOrderCancelLines", new[] { "ProdOrderCancelHeaderId" }); DropIndex("Web.ProdOrderCancelHeaders", new[] { "ReferenceDocTypeId" }); DropIndex("Web.ProdOrderCancelHeaders", "IX_ProdOrderCancelHeader_DocID"); DropIndex("Web.ProcessSettings", new[] { "RateListMenuId" }); DropIndex("Web.ProcessSettings", "IX_ProcessSetting_UniqueKey"); DropIndex("Web.ProductRateGroups", "IX_ProductRateGroup_ProductRateGroupName"); DropIndex("Web.ProcessSequenceLines", new[] { "ProductRateGroupId" }); DropIndex("Web.ProcessSequenceLines", new[] { "ProcessId" }); DropIndex("Web.ProcessSequenceLines", new[] { "ProcessSequenceHeaderId" }); DropIndex("Web.PersonRegistrations", new[] { "PersonId" }); DropIndex("Web.PersonProcesses", new[] { "PersonRateGroupId" }); DropIndex("Web.PersonProcesses", new[] { "ProcessId" }); DropIndex("Web.PersonProcesses", new[] { "PersonId" }); DropIndex("Web.PersonDocuments", new[] { "PersonId" }); DropIndex("Web.PersonCustomGroupLines", new[] { "PersonId" }); DropIndex("Web.PersonCustomGroupLines", new[] { "PersonCustomGroupHeaderId" }); DropIndex("Web.PersonCustomGroupHeaders", "IX_PersonCustomGroup_PersonCustomGroupName"); DropIndex("Web.PersonBankAccounts", new[] { "PersonId" }); DropIndex("Web.PerkDocumentTypes", new[] { "RateDocTypeId" }); DropIndex("Web.PerkDocumentTypes", new[] { "PerkId" }); DropIndex("Web.PerkDocumentTypes", new[] { "SiteId" }); DropIndex("Web.PerkDocumentTypes", new[] { "DivisionId" }); DropIndex("Web.PerkDocumentTypes", new[] { "DocTypeId" }); DropIndex("Web.PackingSettings", new[] { "ImportMenuId" }); DropIndex("Web.PackingSettings", new[] { "DivisionId" }); DropIndex("Web.PackingSettings", new[] { "SiteId" }); DropIndex("Web.PackingSettings", new[] { "DocTypeId" }); DropIndex("Web.Narrations", "IX_Narration_NarrationName"); DropIndex("Web.MaterialRequestSettings", new[] { "DivisionId" }); DropIndex("Web.MaterialRequestSettings", new[] { "SiteId" }); DropIndex("Web.MaterialRequestSettings", new[] { "DocTypeId" }); DropIndex("Web.MaterialReceiveSettings", new[] { "ProcessId" }); DropIndex("Web.MaterialReceiveSettings", new[] { "DivisionId" }); DropIndex("Web.MaterialReceiveSettings", new[] { "SiteId" }); DropIndex("Web.MaterialReceiveSettings", new[] { "DocTypeId" }); DropIndex("Web.MaterialPlanSettings", new[] { "GodownId" }); DropIndex("Web.MaterialPlanSettings", new[] { "DocTypeProductionOrderId" }); DropIndex("Web.MaterialPlanSettings", new[] { "DocTypePurchaseIndentId" }); DropIndex("Web.MaterialPlanSettings", new[] { "DivisionId" }); DropIndex("Web.MaterialPlanSettings", new[] { "SiteId" }); DropIndex("Web.MaterialPlanSettings", new[] { "DocTypeId" }); DropIndex("Web.MaterialPlanForSaleOrderLines", new[] { "MaterialPlanLineId" }); DropIndex("Web.MaterialPlanForSaleOrderLines", new[] { "Dimension2Id" }); DropIndex("Web.MaterialPlanForSaleOrderLines", new[] { "Dimension1Id" }); DropIndex("Web.MaterialPlanForSaleOrderLines", new[] { "ProductId" }); DropIndex("Web.MaterialPlanForSaleOrderLines", new[] { "MaterialPlanForSaleOrderId" }); DropIndex("Web.MaterialPlanForSaleOrders", new[] { "MaterialPlanLineId" }); DropIndex("Web.MaterialPlanForSaleOrders", new[] { "SaleOrderLineId" }); DropIndex("Web.MaterialPlanForSaleOrders", new[] { "MaterialPlanHeaderId" }); DropIndex("Web.MaterialPlanForProdOrderLines", new[] { "MaterialPlanLineId" }); DropIndex("Web.MaterialPlanForProdOrderLines", new[] { "ProcessId" }); DropIndex("Web.MaterialPlanForProdOrderLines", new[] { "Dimension2Id" }); DropIndex("Web.MaterialPlanForProdOrderLines", new[] { "Dimension1Id" }); DropIndex("Web.MaterialPlanForProdOrderLines", new[] { "ProductId" }); DropIndex("Web.MaterialPlanForProdOrderLines", new[] { "MaterialPlanForProdOrderId" }); DropIndex("Web.MaterialPlanForProdOrders", new[] { "ProdOrderLineId" }); DropIndex("Web.MaterialPlanForProdOrders", new[] { "MaterialPlanHeaderId" }); DropIndex("Web.MaterialPlanForJobOrderLines", new[] { "MaterialPlanLineId" }); DropIndex("Web.MaterialPlanForJobOrderLines", new[] { "Dimension2Id" }); DropIndex("Web.MaterialPlanForJobOrderLines", new[] { "Dimension1Id" }); DropIndex("Web.MaterialPlanForJobOrderLines", new[] { "ProductId" }); DropIndex("Web.MaterialPlanForJobOrderLines", new[] { "MaterialPlanForJobOrderId" }); DropIndex("Web.MaterialPlanForJobOrders", new[] { "MaterialPlanLineId" }); DropIndex("Web.MaterialPlanForJobOrders", new[] { "JobOrderLineId" }); DropIndex("Web.MaterialPlanForJobOrders", new[] { "MaterialPlanHeaderId" }); DropIndex("Web.StockHeaderSettings", new[] { "ImportMenuId" }); DropIndex("Web.StockHeaderSettings", new[] { "OnSubmitMenuId" }); DropIndex("Web.StockHeaderSettings", new[] { "ProcessId" }); DropIndex("Web.StockHeaderSettings", new[] { "DivisionId" }); DropIndex("Web.StockHeaderSettings", new[] { "SiteId" }); DropIndex("Web.StockHeaderSettings", new[] { "DocTypeId" }); DropIndex("Web.Manufacturers", new[] { "PersonID" }); DropIndex("Web.LedgerSettings", new[] { "WizardMenuId" }); DropIndex("Web.LedgerSettings", new[] { "ProcessId" }); DropIndex("Web.LedgerSettings", new[] { "DivisionId" }); DropIndex("Web.LedgerSettings", new[] { "SiteId" }); DropIndex("Web.LedgerSettings", new[] { "DocTypeId" }); DropIndex("Web.LedgerLineRefValues", new[] { "LedgerLineId" }); DropIndex("Web.LedgerAdjs", new[] { "SiteId" }); DropIndex("Web.LedgerAdjs", new[] { "CrLedgerId" }); DropIndex("Web.LedgerAdjs", new[] { "DrLedgerId" }); DropIndex("Web.LedgerAdjs", new[] { "LedgerId" }); DropIndex("Web.LedgerLines", new[] { "CostCenterId" }); DropIndex("Web.LedgerLines", new[] { "LedgerAccountId" }); DropIndex("Web.LedgerLines", new[] { "LedgerHeaderId" }); DropIndex("Web.Ledgers", new[] { "CostCenterId" }); DropIndex("Web.Ledgers", new[] { "ContraLedgerAccountId" }); DropIndex("Web.Ledgers", new[] { "LedgerAccountId" }); DropIndex("Web.Ledgers", new[] { "LedgerLineId" }); DropIndex("Web.Ledgers", new[] { "LedgerHeaderId" }); DropIndex("Web.LeaveTypes", new[] { "SiteId" }); DropIndex("Web.LeaveTypes", "IX_LeaveType_LeaveTypeName"); DropIndex("Web.JobReturnBoms", new[] { "StockProcessId" }); DropIndex("Web.JobReturnBoms", new[] { "CostCenterId" }); DropIndex("Web.JobReturnBoms", new[] { "Dimension2Id" }); DropIndex("Web.JobReturnBoms", new[] { "Dimension1Id" }); DropIndex("Web.JobReturnBoms", new[] { "ProductId" }); DropIndex("Web.JobReturnBoms", new[] { "JobReturnLineId" }); DropIndex("Web.JobReturnBoms", new[] { "JobReturnHeaderId" }); DropIndex("Web.JobReceiveSettings", new[] { "CalculationId" }); DropIndex("Web.JobReceiveSettings", new[] { "OnApproveMenuId" }); DropIndex("Web.JobReceiveSettings", new[] { "OnSubmitMenuId" }); DropIndex("Web.JobReceiveSettings", new[] { "WizardMenuId" }); DropIndex("Web.JobReceiveSettings", new[] { "ImportMenuId" }); DropIndex("Web.JobReceiveSettings", new[] { "ProcessId" }); DropIndex("Web.JobReceiveSettings", new[] { "DivisionId" }); DropIndex("Web.JobReceiveSettings", new[] { "SiteId" }); DropIndex("Web.JobReceiveSettings", new[] { "DocTypeId" }); DropIndex("Web.JobReceiveQASettings", new[] { "DivisionId" }); DropIndex("Web.JobReceiveQASettings", new[] { "SiteId" }); DropIndex("Web.JobReceiveQASettings", new[] { "ProcessId" }); DropIndex("Web.JobReceiveQASettings", new[] { "WizardMenuId" }); DropIndex("Web.JobReceiveQASettings", new[] { "ImportMenuId" }); DropIndex("Web.JobReceiveQASettings", new[] { "DocTypeId" }); DropIndex("Web.JobReceiveQALines", new[] { "ReferenceDocTypeId" }); DropIndex("Web.JobReceiveQALines", new[] { "JobReceiveLineId" }); DropIndex("Web.JobReceiveQALines", new[] { "ProductUidId" }); DropIndex("Web.JobReceiveQALines", new[] { "JobReceiveQAHeaderId" }); DropIndex("Web.JobReceiveQAHeaders", new[] { "ReferenceDocTypeId" }); DropIndex("Web.JobReceiveQAHeaders", new[] { "QAById" }); DropIndex("Web.JobReceiveQAHeaders", new[] { "JobWorkerId" }); DropIndex("Web.JobReceiveQAHeaders", new[] { "ProcessId" }); DropIndex("Web.JobReceiveQAHeaders", "IX_JobReceiveQAHeader_DocID"); DropIndex("Web.JobReceiveLineStatus", new[] { "JobReceiveLineId" }); DropIndex("Web.JobReceiveByProducts", new[] { "Dimension2Id" }); DropIndex("Web.JobReceiveByProducts", new[] { "Dimension1Id" }); DropIndex("Web.JobReceiveByProducts", new[] { "ProductId" }); DropIndex("Web.JobReceiveByProducts", new[] { "JobReceiveHeaderId" }); DropIndex("Web.JobReceiveBoms", new[] { "StockProcessId" }); DropIndex("Web.JobReceiveBoms", new[] { "CostCenterId" }); DropIndex("Web.JobReceiveBoms", new[] { "Dimension2Id" }); DropIndex("Web.JobReceiveBoms", new[] { "Dimension1Id" }); DropIndex("Web.JobReceiveBoms", new[] { "ProductId" }); DropIndex("Web.JobReceiveBoms", new[] { "JobReceiveLineId" }); DropIndex("Web.JobReceiveBoms", new[] { "JobReceiveHeaderId" }); DropIndex("Web.JobOrderSettings", new[] { "DealUnitId" }); DropIndex("Web.JobOrderSettings", new[] { "OnApproveMenuId" }); DropIndex("Web.JobOrderSettings", new[] { "OnSubmitMenuId" }); DropIndex("Web.JobOrderSettings", new[] { "JobUnitId" }); DropIndex("Web.JobOrderSettings", new[] { "WizardMenuId" }); DropIndex("Web.JobOrderSettings", new[] { "ImportMenuId" }); DropIndex("Web.JobOrderSettings", new[] { "CalculationId" }); DropIndex("Web.JobOrderSettings", new[] { "ProcessId" }); DropIndex("Web.JobOrderSettings", new[] { "UnitConversionForId" }); DropIndex("Web.JobOrderSettings", new[] { "DivisionId" }); DropIndex("Web.JobOrderSettings", new[] { "SiteId" }); DropIndex("Web.JobOrderSettings", new[] { "DocTypeId" }); DropIndex("Web.JobOrderRateAmendmentLines", new[] { "JobWorkerId" }); DropIndex("Web.JobOrderRateAmendmentLines", new[] { "JobOrderLineId" }); DropIndex("Web.JobOrderRateAmendmentLines", new[] { "JobOrderAmendmentHeaderId" }); DropIndex("Web.JobOrderQtyAmendmentLines", new[] { "JobOrderLineId" }); DropIndex("Web.JobOrderQtyAmendmentLines", new[] { "JobOrderAmendmentHeaderId" }); DropIndex("Web.Perks", "IX_Perk_Perk"); DropIndex("Web.JobOrderPerks", new[] { "PerkId" }); DropIndex("Web.JobOrderPerks", new[] { "JobOrderHeaderId" }); DropIndex("Web.JobOrderLineStatus", new[] { "JobOrderLineId" }); DropIndex("Web.JobOrderLineExtendeds", new[] { "OtherUnitId" }); DropIndex("Web.JobOrderLineExtendeds", new[] { "JobOrderLineId" }); DropIndex("Web.JobOrderLineCharges", new[] { "ParentChargeId" }); DropIndex("Web.JobOrderLineCharges", new[] { "CostCenterId" }); DropIndex("Web.JobOrderLineCharges", new[] { "ContraLedgerAccountId" }); DropIndex("Web.JobOrderLineCharges", new[] { "LedgerAccountCrId" }); DropIndex("Web.JobOrderLineCharges", new[] { "LedgerAccountDrId" }); DropIndex("Web.JobOrderLineCharges", new[] { "PersonID" }); DropIndex("Web.JobOrderLineCharges", new[] { "CalculateOnId" }); DropIndex("Web.JobOrderLineCharges", new[] { "ChargeTypeId" }); DropIndex("Web.JobOrderLineCharges", new[] { "ChargeId" }); DropIndex("Web.JobOrderLineCharges", new[] { "LineTableId" }); DropIndex("Web.JobOrderJobOrders", new[] { "GenJobOrderHeaderId" }); DropIndex("Web.JobOrderJobOrders", new[] { "JobOrderHeaderId" }); DropIndex("Web.JobOrderInspectionSettings", new[] { "DivisionId" }); DropIndex("Web.JobOrderInspectionSettings", new[] { "SiteId" }); DropIndex("Web.JobOrderInspectionSettings", new[] { "ProcessId" }); DropIndex("Web.JobOrderInspectionSettings", new[] { "ImportMenuId" }); DropIndex("Web.JobOrderInspectionSettings", new[] { "DocTypeId" }); DropIndex("Web.JobOrderInspectionRequestSettings", new[] { "DivisionId" }); DropIndex("Web.JobOrderInspectionRequestSettings", new[] { "SiteId" }); DropIndex("Web.JobOrderInspectionRequestSettings", new[] { "ProcessId" }); DropIndex("Web.JobOrderInspectionRequestSettings", new[] { "ImportMenuId" }); DropIndex("Web.JobOrderInspectionRequestSettings", new[] { "DocTypeId" }); DropIndex("Web.JobOrderInspectionRequestCancelLines", new[] { "JobOrderInspectionRequestLineId" }); DropIndex("Web.JobOrderInspectionRequestCancelLines", new[] { "ProductUidId" }); DropIndex("Web.JobOrderInspectionRequestCancelLines", new[] { "JobOrderInspectionRequestCancelHeaderId" }); DropIndex("Web.JobOrderInspectionRequestCancelHeaders", new[] { "ReasonId" }); DropIndex("Web.JobOrderInspectionRequestCancelHeaders", new[] { "JobWorkerId" }); DropIndex("Web.JobOrderInspectionRequestCancelHeaders", new[] { "ProcessId" }); DropIndex("Web.JobOrderInspectionRequestCancelHeaders", new[] { "SiteId" }); DropIndex("Web.JobOrderInspectionRequestCancelHeaders", new[] { "DivisionId" }); DropIndex("Web.JobOrderInspectionRequestCancelHeaders", new[] { "DocTypeId" }); DropIndex("Web.JobOrderInspectionRequestHeaders", new[] { "JobWorkerId" }); DropIndex("Web.JobOrderInspectionRequestHeaders", new[] { "ProcessId" }); DropIndex("Web.JobOrderInspectionRequestHeaders", new[] { "SiteId" }); DropIndex("Web.JobOrderInspectionRequestHeaders", new[] { "DivisionId" }); DropIndex("Web.JobOrderInspectionRequestHeaders", new[] { "DocTypeId" }); DropIndex("Web.JobOrderInspectionRequestLines", new[] { "JobOrderLineId" }); DropIndex("Web.JobOrderInspectionRequestLines", new[] { "ProductUidId" }); DropIndex("Web.JobOrderInspectionRequestLines", new[] { "JobOrderInspectionRequestHeaderId" }); DropIndex("Web.JobOrderInspectionLines", new[] { "ReferenceDocTypeId" }); DropIndex("Web.JobOrderInspectionLines", new[] { "JobOrderLineId" }); DropIndex("Web.JobOrderInspectionLines", new[] { "JobOrderInspectionRequestLineId" }); DropIndex("Web.JobOrderInspectionLines", new[] { "ProductUidId" }); DropIndex("Web.JobOrderInspectionLines", new[] { "JobOrderInspectionHeaderId" }); DropIndex("Web.JobOrderInspectionHeaders", new[] { "ReferenceDocTypeId" }); DropIndex("Web.JobOrderInspectionHeaders", new[] { "InspectionById" }); DropIndex("Web.JobOrderInspectionHeaders", new[] { "JobWorkerId" }); DropIndex("Web.JobOrderInspectionHeaders", new[] { "ProcessId" }); DropIndex("Web.JobOrderInspectionHeaders", "IX_JobOrderInspectionHeader_DocID"); DropIndex("Web.JobOrderHeaderStatus", new[] { "JobOrderHeaderId" }); DropIndex("Web.JobOrderHeaderCharges", new[] { "ParentChargeId" }); DropIndex("Web.JobOrderHeaderCharges", new[] { "CostCenterId" }); DropIndex("Web.JobOrderHeaderCharges", new[] { "ContraLedgerAccountId" }); DropIndex("Web.JobOrderHeaderCharges", new[] { "LedgerAccountCrId" }); DropIndex("Web.JobOrderHeaderCharges", new[] { "LedgerAccountDrId" }); DropIndex("Web.JobOrderHeaderCharges", new[] { "PersonID" }); DropIndex("Web.JobOrderHeaderCharges", new[] { "CalculateOnId" }); DropIndex("Web.JobOrderHeaderCharges", new[] { "ProductChargeId" }); DropIndex("Web.JobOrderHeaderCharges", new[] { "ChargeTypeId" }); DropIndex("Web.JobOrderHeaderCharges", new[] { "ChargeId" }); DropIndex("Web.JobOrderHeaderCharges", new[] { "HeaderTableId" }); DropIndex("Web.JobOrderCancelLines", new[] { "ProductUidCurrentProcessId" }); DropIndex("Web.JobOrderCancelLines", new[] { "ProductUidCurrentGodownId" }); DropIndex("Web.JobOrderCancelLines", new[] { "ProductUidLastTransactionPersonId" }); DropIndex("Web.JobOrderCancelLines", new[] { "ProductUidLastTransactionDocTypeId" }); DropIndex("Web.JobOrderCancelLines", new[] { "StockProcessId" }); DropIndex("Web.JobOrderCancelLines", new[] { "StockId" }); DropIndex("Web.JobOrderCancelLines", new[] { "JobOrderLineId" }); DropIndex("Web.JobOrderCancelLines", new[] { "ProductUidId" }); DropIndex("Web.JobOrderCancelLines", new[] { "JobOrderCancelHeaderId" }); DropIndex("Web.JobOrderCancelHeaders", new[] { "StockHeaderId" }); DropIndex("Web.JobOrderCancelHeaders", new[] { "GodownId" }); DropIndex("Web.JobOrderCancelHeaders", new[] { "OrderById" }); DropIndex("Web.JobOrderCancelHeaders", new[] { "JobWorkerId" }); DropIndex("Web.JobOrderCancelHeaders", new[] { "ProcessId" }); DropIndex("Web.JobOrderCancelHeaders", new[] { "SiteId" }); DropIndex("Web.JobOrderCancelHeaders", new[] { "DivisionId" }); DropIndex("Web.JobOrderCancelHeaders", new[] { "ReasonId" }); DropIndex("Web.JobOrderCancelHeaders", new[] { "DocTypeId" }); DropIndex("Web.JobOrderCancelBoms", new[] { "Dimension2Id" }); DropIndex("Web.JobOrderCancelBoms", new[] { "Dimension1Id" }); DropIndex("Web.JobOrderCancelBoms", new[] { "ProductId" }); DropIndex("Web.JobOrderCancelBoms", new[] { "JobOrderHeaderId" }); DropIndex("Web.JobOrderCancelBoms", new[] { "JobOrderCancelLineId" }); DropIndex("Web.JobOrderCancelBoms", new[] { "JobOrderCancelHeaderId" }); DropIndex("Web.JobOrderByProducts", new[] { "ProductId" }); DropIndex("Web.JobOrderByProducts", new[] { "JobOrderHeaderId" }); DropIndex("Web.JobOrderAmendmentHeaders", new[] { "LedgerHeaderId" }); DropIndex("Web.JobOrderAmendmentHeaders", new[] { "ProcessId" }); DropIndex("Web.JobOrderAmendmentHeaders", new[] { "OrderById" }); DropIndex("Web.JobOrderAmendmentHeaders", new[] { "JobWorkerId" }); DropIndex("Web.JobOrderAmendmentHeaders", new[] { "SiteId" }); DropIndex("Web.JobOrderAmendmentHeaders", new[] { "DivisionId" }); DropIndex("Web.JobOrderAmendmentHeaders", new[] { "DocTypeId" }); DropIndex("Web.JobInvoiceSettings", new[] { "JobReturnDocTypeId" }); DropIndex("Web.JobInvoiceSettings", new[] { "JobReceiveDocTypeId" }); DropIndex("Web.JobInvoiceSettings", new[] { "CalculationId" }); DropIndex("Web.JobInvoiceSettings", new[] { "WizardMenuId" }); DropIndex("Web.JobInvoiceSettings", new[] { "ImportMenuId" }); DropIndex("Web.JobInvoiceSettings", new[] { "ProcessId" }); DropIndex("Web.JobInvoiceSettings", new[] { "DivisionId" }); DropIndex("Web.JobInvoiceSettings", new[] { "SiteId" }); DropIndex("Web.JobInvoiceSettings", new[] { "DocTypeId" }); DropIndex("Web.JobInvoiceReturnLineCharges", new[] { "ParentChargeId" }); DropIndex("Web.JobInvoiceReturnLineCharges", new[] { "CostCenterId" }); DropIndex("Web.JobInvoiceReturnLineCharges", new[] { "ContraLedgerAccountId" }); DropIndex("Web.JobInvoiceReturnLineCharges", new[] { "LedgerAccountCrId" }); DropIndex("Web.JobInvoiceReturnLineCharges", new[] { "LedgerAccountDrId" }); DropIndex("Web.JobInvoiceReturnLineCharges", new[] { "PersonID" }); DropIndex("Web.JobInvoiceReturnLineCharges", new[] { "CalculateOnId" }); DropIndex("Web.JobInvoiceReturnLineCharges", new[] { "ChargeTypeId" }); DropIndex("Web.JobInvoiceReturnLineCharges", new[] { "ChargeId" }); DropIndex("Web.JobInvoiceReturnLineCharges", new[] { "LineTableId" }); DropIndex("Web.JobInvoiceReturnLines", new[] { "DealUnitId" }); DropIndex("Web.JobInvoiceReturnLines", new[] { "JobReturnLineId" }); DropIndex("Web.JobInvoiceReturnLines", new[] { "JobInvoiceLineId" }); DropIndex("Web.JobInvoiceReturnLines", new[] { "JobInvoiceReturnHeaderId" }); DropIndex("Web.JobInvoiceReturnHeaderCharges", new[] { "ParentChargeId" }); DropIndex("Web.JobInvoiceReturnHeaderCharges", new[] { "CostCenterId" }); DropIndex("Web.JobInvoiceReturnHeaderCharges", new[] { "ContraLedgerAccountId" }); DropIndex("Web.JobInvoiceReturnHeaderCharges", new[] { "LedgerAccountCrId" }); DropIndex("Web.JobInvoiceReturnHeaderCharges", new[] { "LedgerAccountDrId" }); DropIndex("Web.JobInvoiceReturnHeaderCharges", new[] { "PersonID" }); DropIndex("Web.JobInvoiceReturnHeaderCharges", new[] { "CalculateOnId" }); DropIndex("Web.JobInvoiceReturnHeaderCharges", new[] { "ProductChargeId" }); DropIndex("Web.JobInvoiceReturnHeaderCharges", new[] { "ChargeTypeId" }); DropIndex("Web.JobInvoiceReturnHeaderCharges", new[] { "ChargeId" }); DropIndex("Web.JobInvoiceReturnHeaderCharges", new[] { "HeaderTableId" }); DropIndex("Web.JobReturnLines", new[] { "ProductUidCurrentProcessId" }); DropIndex("Web.JobReturnLines", new[] { "ProductUidCurrentGodownId" }); DropIndex("Web.JobReturnLines", new[] { "ProductUidLastTransactionPersonId" }); DropIndex("Web.JobReturnLines", new[] { "ProductUidLastTransactionDocTypeId" }); DropIndex("Web.JobReturnLines", new[] { "ReferenceDocTypeId" }); DropIndex("Web.JobReturnLines", new[] { "StockProcessId" }); DropIndex("Web.JobReturnLines", new[] { "StockId" }); DropIndex("Web.JobReturnLines", new[] { "DealUnitId" }); DropIndex("Web.JobReturnLines", new[] { "JobReceiveLineId" }); DropIndex("Web.JobReturnLines", new[] { "JobReturnHeaderId" }); DropIndex("Web.JobReturnHeaders", new[] { "ReferenceDocTypeId" }); DropIndex("Web.JobReturnHeaders", new[] { "StockHeaderId" }); DropIndex("Web.JobReturnHeaders", new[] { "GatePassHeaderId" }); DropIndex("Web.JobReturnHeaders", new[] { "GodownId" }); DropIndex("Web.JobReturnHeaders", new[] { "OrderById" }); DropIndex("Web.JobReturnHeaders", new[] { "JobWorkerId" }); DropIndex("Web.JobReturnHeaders", new[] { "ProcessId" }); DropIndex("Web.JobReturnHeaders", new[] { "SiteId" }); DropIndex("Web.JobReturnHeaders", new[] { "DivisionId" }); DropIndex("Web.JobReturnHeaders", new[] { "ReasonId" }); DropIndex("Web.JobReturnHeaders", new[] { "DocTypeId" }); DropIndex("Web.JobInvoiceReturnHeaders", new[] { "JobReturnHeaderId" }); DropIndex("Web.JobInvoiceReturnHeaders", new[] { "ProcessId" }); DropIndex("Web.JobInvoiceReturnHeaders", new[] { "JobWorkerId" }); DropIndex("Web.JobInvoiceReturnHeaders", new[] { "LedgerHeaderId" }); DropIndex("Web.JobInvoiceReturnHeaders", new[] { "ReasonId" }); DropIndex("Web.JobInvoiceReturnHeaders", "IX_JobInvoiceReturnHeader_DocID"); DropIndex("Web.JobInvoiceRateAmendmentLineCharges", new[] { "ParentChargeId" }); DropIndex("Web.JobInvoiceRateAmendmentLineCharges", new[] { "CostCenterId" }); DropIndex("Web.JobInvoiceRateAmendmentLineCharges", new[] { "ContraLedgerAccountId" }); DropIndex("Web.JobInvoiceRateAmendmentLineCharges", new[] { "LedgerAccountCrId" }); DropIndex("Web.JobInvoiceRateAmendmentLineCharges", new[] { "LedgerAccountDrId" }); DropIndex("Web.JobInvoiceRateAmendmentLineCharges", new[] { "PersonID" }); DropIndex("Web.JobInvoiceRateAmendmentLineCharges", new[] { "CalculateOnId" }); DropIndex("Web.JobInvoiceRateAmendmentLineCharges", new[] { "ChargeTypeId" }); DropIndex("Web.JobInvoiceRateAmendmentLineCharges", new[] { "ChargeId" }); DropIndex("Web.JobInvoiceRateAmendmentLineCharges", new[] { "LineTableId" }); DropIndex("Web.JobInvoiceRateAmendmentLines", new[] { "JobWorkerId" }); DropIndex("Web.JobInvoiceRateAmendmentLines", new[] { "JobInvoiceLineId" }); DropIndex("Web.JobInvoiceRateAmendmentLines", new[] { "JobInvoiceAmendmentHeaderId" }); DropIndex("Web.JobInvoiceLineStatus", new[] { "JobInvoiceLineId" }); DropIndex("Web.JobInvoiceLineCharges", new[] { "ParentChargeId" }); DropIndex("Web.JobInvoiceLineCharges", new[] { "CostCenterId" }); DropIndex("Web.JobInvoiceLineCharges", new[] { "ContraLedgerAccountId" }); DropIndex("Web.JobInvoiceLineCharges", new[] { "LedgerAccountCrId" }); DropIndex("Web.JobInvoiceLineCharges", new[] { "LedgerAccountDrId" }); DropIndex("Web.JobInvoiceLineCharges", new[] { "PersonID" }); DropIndex("Web.JobInvoiceLineCharges", new[] { "CalculateOnId" }); DropIndex("Web.JobInvoiceLineCharges", new[] { "ChargeTypeId" }); DropIndex("Web.JobInvoiceLineCharges", new[] { "ChargeId" }); DropIndex("Web.JobInvoiceLineCharges", new[] { "LineTableId" }); DropIndex("Web.JobInvoiceHeaderCharges", new[] { "ParentChargeId" }); DropIndex("Web.JobInvoiceHeaderCharges", new[] { "CostCenterId" }); DropIndex("Web.JobInvoiceHeaderCharges", new[] { "ContraLedgerAccountId" }); DropIndex("Web.JobInvoiceHeaderCharges", new[] { "LedgerAccountCrId" }); DropIndex("Web.JobInvoiceHeaderCharges", new[] { "LedgerAccountDrId" }); DropIndex("Web.JobInvoiceHeaderCharges", new[] { "PersonID" }); DropIndex("Web.JobInvoiceHeaderCharges", new[] { "CalculateOnId" }); DropIndex("Web.JobInvoiceHeaderCharges", new[] { "ProductChargeId" }); DropIndex("Web.JobInvoiceHeaderCharges", new[] { "ChargeTypeId" }); DropIndex("Web.JobInvoiceHeaderCharges", new[] { "ChargeId" }); DropIndex("Web.JobInvoiceHeaderCharges", new[] { "HeaderTableId" }); DropIndex("Web.JobReceiveHeaders", new[] { "ReferenceDocTypeId" }); DropIndex("Web.JobReceiveHeaders", new[] { "StockHeaderId" }); DropIndex("Web.JobReceiveHeaders", new[] { "GodownId" }); DropIndex("Web.JobReceiveHeaders", new[] { "JobReceiveById" }); DropIndex("Web.JobReceiveHeaders", new[] { "JobWorkerId" }); DropIndex("Web.JobReceiveHeaders", new[] { "ProcessId" }); DropIndex("Web.JobReceiveHeaders", "IX_JobReceiveHeader_DocID"); DropIndex("Web.JobReceiveLines", new[] { "ProductUidCurrentProcessId" }); DropIndex("Web.JobReceiveLines", new[] { "ProductUidCurrentGodownId" }); DropIndex("Web.JobReceiveLines", new[] { "ProductUidLastTransactionPersonId" }); DropIndex("Web.JobReceiveLines", new[] { "ProductUidLastTransactionDocTypeId" }); DropIndex("Web.JobReceiveLines", new[] { "StockProcessId" }); DropIndex("Web.JobReceiveLines", new[] { "ReferenceDocTypeId" }); DropIndex("Web.JobReceiveLines", new[] { "StockId" }); DropIndex("Web.JobReceiveLines", new[] { "MachineId" }); DropIndex("Web.JobReceiveLines", new[] { "DealUnitId" }); DropIndex("Web.JobReceiveLines", new[] { "JobOrderLineId" }); DropIndex("Web.JobReceiveLines", new[] { "ProductUidId" }); DropIndex("Web.JobReceiveLines", new[] { "JobReceiveHeaderId" }); DropIndex("Web.JobInvoiceLines", new[] { "CostCenterId" }); DropIndex("Web.JobInvoiceLines", new[] { "DealUnitId" }); DropIndex("Web.JobInvoiceLines", new[] { "JobReceiveLineId" }); DropIndex("Web.JobInvoiceLines", new[] { "JobWorkerId" }); DropIndex("Web.JobInvoiceLines", new[] { "JobInvoiceHeaderId" }); DropIndex("Web.JobInvoiceHeaders", new[] { "JobReceiveHeaderId" }); DropIndex("Web.JobInvoiceHeaders", new[] { "ProcessId" }); DropIndex("Web.JobInvoiceHeaders", new[] { "JobWorkerId" }); DropIndex("Web.JobInvoiceHeaders", new[] { "LedgerHeaderId" }); DropIndex("Web.JobInvoiceHeaders", "IX_JobInvoiceHeader_DocID"); DropIndex("Web.JobInvoiceAmendmentHeaderCharges", new[] { "ParentChargeId" }); DropIndex("Web.JobInvoiceAmendmentHeaderCharges", new[] { "CostCenterId" }); DropIndex("Web.JobInvoiceAmendmentHeaderCharges", new[] { "ContraLedgerAccountId" }); DropIndex("Web.JobInvoiceAmendmentHeaderCharges", new[] { "LedgerAccountCrId" }); DropIndex("Web.JobInvoiceAmendmentHeaderCharges", new[] { "LedgerAccountDrId" }); DropIndex("Web.JobInvoiceAmendmentHeaderCharges", new[] { "PersonID" }); DropIndex("Web.JobInvoiceAmendmentHeaderCharges", new[] { "CalculateOnId" }); DropIndex("Web.JobInvoiceAmendmentHeaderCharges", new[] { "ProductChargeId" }); DropIndex("Web.JobInvoiceAmendmentHeaderCharges", new[] { "ChargeTypeId" }); DropIndex("Web.JobInvoiceAmendmentHeaderCharges", new[] { "ChargeId" }); DropIndex("Web.JobInvoiceAmendmentHeaderCharges", new[] { "HeaderTableId" }); DropIndex("Web.JobInvoiceAmendmentHeaders", new[] { "ProcessId" }); DropIndex("Web.JobInvoiceAmendmentHeaders", new[] { "OrderById" }); DropIndex("Web.JobInvoiceAmendmentHeaders", new[] { "JobWorkerId" }); DropIndex("Web.JobInvoiceAmendmentHeaders", new[] { "SiteId" }); DropIndex("Web.JobInvoiceAmendmentHeaders", new[] { "DivisionId" }); DropIndex("Web.JobInvoiceAmendmentHeaders", new[] { "DocTypeId" }); DropIndex("Web.JobInstructions", "IX_JobInstruction_JobInstructionDescription"); DropIndex("Web.JobConsumptionSettings", new[] { "ProcessId" }); DropIndex("Web.JobConsumptionSettings", new[] { "DivisionId" }); DropIndex("Web.JobConsumptionSettings", new[] { "SiteId" }); DropIndex("Web.JobConsumptionSettings", new[] { "DocTypeId" }); DropIndex("Web.ProductTypeQaAttributes", new[] { "ProductTypeId" }); DropIndex("Web.InspectionQaAttributes", new[] { "ProductTypeQaAttributeId" }); DropIndex("Web.ExcessMaterialSettings", new[] { "ImportMenuId" }); DropIndex("Web.ExcessMaterialSettings", new[] { "ProcessId" }); DropIndex("Web.ExcessMaterialSettings", new[] { "DivisionId" }); DropIndex("Web.ExcessMaterialSettings", new[] { "SiteId" }); DropIndex("Web.ExcessMaterialSettings", new[] { "DocTypeId" }); DropIndex("Web.ExcessMaterialLines", new[] { "ProductUidCurrentProcessId" }); DropIndex("Web.ExcessMaterialLines", new[] { "ProductUidCurrentGodownId" }); DropIndex("Web.ExcessMaterialLines", new[] { "ProductUidLastTransactionPersonId" }); DropIndex("Web.ExcessMaterialLines", new[] { "ProductUidLastTransactionDocTypeId" }); DropIndex("Web.ExcessMaterialLines", new[] { "Dimension2Id" }); DropIndex("Web.ExcessMaterialLines", new[] { "Dimension1Id" }); DropIndex("Web.ExcessMaterialLines", new[] { "ProcessId" }); DropIndex("Web.ExcessMaterialLines", new[] { "ProductId" }); DropIndex("Web.ExcessMaterialLines", new[] { "ProductUidId" }); DropIndex("Web.ExcessMaterialLines", new[] { "ExcessMaterialHeaderId" }); DropIndex("Web.ExcessMaterialHeaders", new[] { "GodownId" }); DropIndex("Web.ExcessMaterialHeaders", new[] { "ProcessId" }); DropIndex("Web.ExcessMaterialHeaders", new[] { "PersonId" }); DropIndex("Web.ExcessMaterialHeaders", new[] { "CurrencyId" }); DropIndex("Web.ExcessMaterialHeaders", "IX_ExcessMaterialHeader_DocID"); DropIndex("Web.DocumentTypeTimePlans", new[] { "SiteId" }); DropIndex("Web.DocumentTypeTimePlans", new[] { "DivisionId" }); DropIndex("Web.DocumentTypeTimePlans", new[] { "DocTypeId" }); DropIndex("Web.DocumentTypeTimeExtensions", new[] { "SiteId" }); DropIndex("Web.DocumentTypeTimeExtensions", new[] { "DivisionId" }); DropIndex("Web.DocumentTypeTimeExtensions", new[] { "DocTypeId" }); DropIndex("Web.DocumentTypeSites", new[] { "SiteId" }); DropIndex("Web.DocumentTypeSites", new[] { "DocumentTypeId" }); DropIndex("Web.DocumentTypeDivisions", new[] { "DivisionId" }); DropIndex("Web.DocumentTypeDivisions", new[] { "DocumentTypeId" }); DropIndex("Web.DocumentStatus", "IX_DocumentStatus_DocumentStatusName"); DropIndex("Web.DocSmsContents", new[] { "DivisionId" }); DropIndex("Web.DocSmsContents", new[] { "SiteId" }); DropIndex("Web.DocSmsContents", new[] { "DocTypeId" }); DropIndex("Web.DocNotificationContents", new[] { "DivisionId" }); DropIndex("Web.DocNotificationContents", new[] { "SiteId" }); DropIndex("Web.DocNotificationContents", new[] { "DocTypeId" }); DropIndex("Web.DocEmailContents", new[] { "DivisionId" }); DropIndex("Web.DocEmailContents", new[] { "SiteId" }); DropIndex("Web.DocEmailContents", new[] { "DocTypeId" }); DropIndex("Web.DispatchWaybillLines", new[] { "CityId" }); DropIndex("Web.DispatchWaybillLines", new[] { "DispatchWaybillHeaderId" }); DropIndex("Web.Routes", "IX_Route_RouteName"); DropIndex("Web.DispatchWaybillHeaders", new[] { "RouteId" }); DropIndex("Web.DispatchWaybillHeaders", new[] { "ToCityId" }); DropIndex("Web.DispatchWaybillHeaders", new[] { "FromCityId" }); DropIndex("Web.DispatchWaybillHeaders", new[] { "TransporterId" }); DropIndex("Web.DispatchWaybillHeaders", new[] { "SaleInvoiceHeaderId" }); DropIndex("Web.DispatchWaybillHeaders", new[] { "ShipMethodId" }); DropIndex("Web.DispatchWaybillHeaders", new[] { "ConsigneeId" }); DropIndex("Web.DispatchWaybillHeaders", "IX_DispatchWaybillHeader_DocID"); DropIndex("Web.PromoCodes", new[] { "ProductTypeId" }); DropIndex("Web.PromoCodes", new[] { "ProductCategoryId" }); DropIndex("Web.PromoCodes", new[] { "ProductGroupId" }); DropIndex("Web.PromoCodes", new[] { "ProductId" }); DropIndex("Web.PromoCodes", "IX_PromoCode_PromoCode"); DropIndex("Web.SaleInvoiceLines", new[] { "PromoCodeId" }); DropIndex("Web.SaleInvoiceLines", new[] { "DealUnitId" }); DropIndex("Web.SaleInvoiceLines", new[] { "ProductInvoiceGroupId" }); DropIndex("Web.SaleInvoiceLines", new[] { "SalesTaxGroupId" }); DropIndex("Web.SaleInvoiceLines", new[] { "Dimension2Id" }); DropIndex("Web.SaleInvoiceLines", new[] { "Dimension1Id" }); DropIndex("Web.SaleInvoiceLines", new[] { "ProductId" }); DropIndex("Web.SaleInvoiceLines", new[] { "SaleOrderLineId" }); DropIndex("Web.SaleInvoiceLines", new[] { "SaleDispatchLineId" }); DropIndex("Web.SaleInvoiceLines", new[] { "SaleInvoiceHeaderId" }); DropIndex("Web.SaleDispatchLines", new[] { "ProductUidCurrentProcessId" }); DropIndex("Web.SaleDispatchLines", new[] { "ProductUidCurrentGodownId" }); DropIndex("Web.SaleDispatchLines", new[] { "ProductUidLastTransactionPersonId" }); DropIndex("Web.SaleDispatchLines", new[] { "ProductUidLastTransactionDocTypeId" }); DropIndex("Web.SaleDispatchLines", new[] { "StockInId" }); DropIndex("Web.SaleDispatchLines", new[] { "StockId" }); DropIndex("Web.SaleDispatchLines", new[] { "GodownId" }); DropIndex("Web.SaleDispatchLines", new[] { "PackingLineId" }); DropIndex("Web.SaleDispatchLines", new[] { "SaleDispatchHeaderId" }); DropIndex("Web.SaleDispatchHeaders", new[] { "PackingHeaderId" }); DropIndex("Web.SaleDispatchHeaders", new[] { "StockHeaderId" }); DropIndex("Web.SaleDispatchHeaders", new[] { "GatePassHeaderId" }); DropIndex("Web.SaleDispatchHeaders", new[] { "ShipMethodId" }); DropIndex("Web.SaleDispatchHeaders", new[] { "DeliveryTermsId" }); DropIndex("Web.SaleDispatchHeaders", new[] { "SaleToBuyerId" }); DropIndex("Web.SaleDispatchHeaders", "IX_SaleDispatchHeader_DocID"); DropIndex("Web.SaleInvoiceHeaders", new[] { "SaleDispatchHeaderId" }); DropIndex("Web.SaleInvoiceHeaders", new[] { "CurrencyId" }); DropIndex("Web.SaleInvoiceHeaders", new[] { "AgentId" }); DropIndex("Web.SaleInvoiceHeaders", new[] { "BillToBuyerId" }); DropIndex("Web.SaleInvoiceHeaders", new[] { "SaleToBuyerId" }); DropIndex("Web.SaleInvoiceHeaders", new[] { "LedgerHeaderId" }); DropIndex("Web.SaleInvoiceHeaders", "IX_SaleInvoiceHeader_DocID"); DropIndex("Web.CustomDetails", new[] { "TRCourierId" }); DropIndex("Web.CustomDetails", new[] { "SaleInvoiceHeaderId" }); DropIndex("Web.CustomDetails", "IX_CustomDetail_DocID"); DropIndex("Web.CurrencyConversions", new[] { "ToCurrencyId" }); DropIndex("Web.CurrencyConversions", new[] { "FromCurrencyId" }); DropIndex("Web.Couriers", new[] { "PersonID" }); DropIndex("Web.CostCenterStatusExtendeds", new[] { "CostCenterId" }); DropIndex("Web.CostCenterStatus", new[] { "ProductId" }); DropIndex("Web.CostCenterStatus", new[] { "CostCenterId" }); DropIndex("Web.Companies", new[] { "CurrencyId" }); DropIndex("Web.Companies", new[] { "CityId" }); DropIndex("Web.Companies", "IX_Company_Company"); DropIndex("Web.ChargeGroupProducts", new[] { "ChargeTypeId" }); DropIndex("Web.ChargeGroupProducts", "IX_ChargeGroupProduct_ChargeGroupProductName"); DropIndex("Web.CalculationProducts", new[] { "PersonId" }); DropIndex("Web.CalculationProducts", new[] { "LedgerAccountCrId" }); DropIndex("Web.CalculationProducts", new[] { "LedgerAccountDrId" }); DropIndex("Web.CalculationProducts", new[] { "ParentChargeId" }); DropIndex("Web.CalculationProducts", new[] { "CostCenterId" }); DropIndex("Web.CalculationProducts", new[] { "CalculateOnId" }); DropIndex("Web.CalculationProducts", new[] { "ChargeTypeId" }); DropIndex("Web.CalculationProducts", "IX_CalculationProduct_CalculationProductName"); DropIndex("Web.CalculationLineLedgerAccounts", new[] { "SiteId" }); DropIndex("Web.CalculationLineLedgerAccounts", new[] { "DivisionId" }); DropIndex("Web.CalculationLineLedgerAccounts", new[] { "CostCenterId" }); DropIndex("Web.CalculationLineLedgerAccounts", new[] { "ContraLedgerAccountId" }); DropIndex("Web.CalculationLineLedgerAccounts", new[] { "LedgerAccountCrId" }); DropIndex("Web.CalculationLineLedgerAccounts", new[] { "LedgerAccountDrId" }); DropIndex("Web.CalculationLineLedgerAccounts", "IX_CalculationLineLedgerAccount_UniqueRow"); DropIndex("Web.CalculationLineLedgerAccounts", new[] { "CalculationId" }); DropIndex("Web.CalculationHeaderLedgerAccounts", new[] { "SiteId" }); DropIndex("Web.CalculationHeaderLedgerAccounts", new[] { "DivisionId" }); DropIndex("Web.CalculationHeaderLedgerAccounts", new[] { "CostCenterId" }); DropIndex("Web.CalculationHeaderLedgerAccounts", new[] { "ContraLedgerAccountId" }); DropIndex("Web.CalculationHeaderLedgerAccounts", new[] { "LedgerAccountCrId" }); DropIndex("Web.CalculationHeaderLedgerAccounts", new[] { "LedgerAccountDrId" }); DropIndex("Web.CalculationHeaderLedgerAccounts", "IX_CalculationHeaderLedgerAccount_UniqueRow"); DropIndex("Web.CalculationHeaderLedgerAccounts", new[] { "CalculationId" }); DropIndex("Web.Charges", "IX_Charge_ChargeCode"); DropIndex("Web.Charges", "IX_Charge_Charge"); DropIndex("Web.CalculationFooters", new[] { "LedgerAccountCrId" }); DropIndex("Web.CalculationFooters", new[] { "LedgerAccountDrId" }); DropIndex("Web.CalculationFooters", new[] { "ParentChargeId" }); DropIndex("Web.CalculationFooters", new[] { "PersonId" }); DropIndex("Web.CalculationFooters", new[] { "CostCenterId" }); DropIndex("Web.CalculationFooters", new[] { "ProductChargeId" }); DropIndex("Web.CalculationFooters", new[] { "CalculateOnId" }); DropIndex("Web.CalculationFooters", new[] { "ChargeTypeId" }); DropIndex("Web.CalculationFooters", "IX_CalculationLine_CalculationLineName"); DropIndex("Web.Calculations", "IX_Calculation_Calculation"); DropIndex("Web.BusinessSessions", new[] { "DocTypeId" }); DropIndex("Web.TdsGroups", "IX_TdsGroup_TdsGroupName"); DropIndex("Web.TdsCategories", "IX_TdsCategory_TdsCategoryName"); DropIndex("Web.ServiceTaxCategories", "IX_ServiceTaxCategory_ServiceTaxCategoryName"); DropIndex("Web.PersonRateGroups", "IX_PersonRateGroup_PersonRateGroupName"); DropIndex("Web.BusinessEntities", new[] { "Buyer_PersonID" }); DropIndex("Web.BusinessEntities", new[] { "ServiceTaxCategoryId" }); DropIndex("Web.BusinessEntities", new[] { "PersonRateGroupId" }); DropIndex("Web.BusinessEntities", new[] { "SalesTaxGroupPartyId" }); DropIndex("Web.BusinessEntities", new[] { "GuarantorId" }); DropIndex("Web.BusinessEntities", new[] { "TdsGroupId" }); DropIndex("Web.BusinessEntities", new[] { "TdsCategoryId" }); DropIndex("Web.BusinessEntities", new[] { "ParentId" }); DropIndex("Web.BusinessEntities", new[] { "PersonID" }); DropIndex("Web.ProductStyles", "IX_ProductStyle_ProductStyleName"); DropIndex("Web.ProductQualities", new[] { "ProductTypeId" }); DropIndex("Web.ProductQualities", "IX_ProductQuality_ProductQualityName"); DropIndex("Web.ProductInvoiceGroups", new[] { "DescriptionOfGoodsId" }); DropIndex("Web.ProductInvoiceGroups", new[] { "DivisionId" }); DropIndex("Web.ProductInvoiceGroups", "IX_ProductInvoiceGroup_ProductInvoiceGroupName"); DropIndex("Web.ProductDesignPatterns", new[] { "ProductTypeId" }); DropIndex("Web.ProductDesignPatterns", "IX_ProductDesignPattern_ProductDesignName"); DropIndex("Web.ProductCollections", new[] { "ProductTypeId" }); DropIndex("Web.ProductCollections", "IX_ProductCollection_ProductCollectionName"); DropIndex("Web.ProcessSequenceHeaders", new[] { "ReferenceDocTypeId" }); DropIndex("Web.ProcessSequenceHeaders", "IX_ProcessSequence_ProcessSequenceHeaderName"); DropIndex("Web.DescriptionOfGoods", "IX_DescriptionOfGoods_DescriptionOfGoodsName"); DropIndex("Web.ProductContentLines", new[] { "ProductGroupId" }); DropIndex("Web.ProductContentLines", new[] { "ProductContentHeaderId" }); DropIndex("Web.ProductContentHeaders", "IX_ProductContent_ProductContentName"); DropIndex("Web.Colours", "IX_Colour_ColourName"); DropIndex("Web.SalesTaxGroupProducts", "IX_SalesTaxGroupProduct_SalesTaxGroupProductName"); DropIndex("Web.SalesTaxGroups", new[] { "SalesTaxGroupPartyId" }); DropIndex("Web.SalesTaxGroups", new[] { "SalesTaxGroupProductId" }); DropIndex("Web.ChargeTypes", "IX_Charges_ChargesName"); DropIndex("Web.ChargeGroupPersons", new[] { "ChargeTypeId" }); DropIndex("Web.ChargeGroupPersons", "IX_ChargeGroupPerson_ChargeGroupPersonName"); DropIndex("Web.PurchaseOrderHeaders", new[] { "UnitConversionForId" }); DropIndex("Web.PurchaseOrderHeaders", new[] { "SalesTaxGroupPersonId" }); DropIndex("Web.PurchaseOrderHeaders", new[] { "CurrencyId" }); DropIndex("Web.PurchaseOrderHeaders", new[] { "DeliveryTermsId" }); DropIndex("Web.PurchaseOrderHeaders", new[] { "ShipMethodId" }); DropIndex("Web.PurchaseOrderHeaders", "IX_PurchaseOrderHeader_DocID"); DropIndex("Web.PurchaseOrderCancelHeaders", new[] { "SupplierId" }); DropIndex("Web.PurchaseOrderCancelHeaders", new[] { "ReasonId" }); DropIndex("Web.PurchaseOrderCancelHeaders", "IX_PurchaseOrderCancelHeader_DocID"); DropIndex("Web.PurchaseOrderCancelLines", new[] { "PurchaseOrderLineId" }); DropIndex("Web.PurchaseOrderCancelLines", new[] { "PurchaseOrderCancelHeaderId" }); DropIndex("Web.PurchaseOrderLines", new[] { "ProductUidHeaderId" }); DropIndex("Web.PurchaseOrderLines", new[] { "DealUnitId" }); DropIndex("Web.PurchaseOrderLines", new[] { "SalesTaxGroupId" }); DropIndex("Web.PurchaseOrderLines", new[] { "Dimension2Id" }); DropIndex("Web.PurchaseOrderLines", new[] { "Dimension1Id" }); DropIndex("Web.PurchaseOrderLines", new[] { "ProductId" }); DropIndex("Web.PurchaseOrderLines", new[] { "PurchaseIndentLineId" }); DropIndex("Web.PurchaseOrderLines", new[] { "PurchaseOrderHeaderId" }); DropIndex("Web.PurchaseIndentHeaders", new[] { "MaterialPlanHeaderId" }); DropIndex("Web.PurchaseIndentHeaders", new[] { "ReasonId" }); DropIndex("Web.PurchaseIndentHeaders", new[] { "DepartmentId" }); DropIndex("Web.PurchaseIndentHeaders", "IX_PurchaseIndentHeader_DocID"); DropIndex("Web.PurchaseIndentCancelHeaders", new[] { "ReasonId" }); DropIndex("Web.PurchaseIndentCancelHeaders", "IX_PurchaseIndentCancelHeader_DocID"); DropIndex("Web.PurchaseIndentCancelLines", new[] { "PurchaseIndentLineId" }); DropIndex("Web.PurchaseIndentCancelLines", new[] { "PurchaseIndentCancelHeaderId" }); DropIndex("Web.PurchaseIndentLines", new[] { "Dimension2Id" }); DropIndex("Web.PurchaseIndentLines", new[] { "Dimension1Id" }); DropIndex("Web.PurchaseIndentLines", new[] { "ProductId" }); DropIndex("Web.PurchaseIndentLines", new[] { "MaterialPlanLineId" }); DropIndex("Web.PurchaseIndentLines", new[] { "PurchaseIndentHeaderId" }); DropIndex("Web.Transporters", new[] { "PersonID" }); DropIndex("Web.PurchaseWaybills", new[] { "ToCityId" }); DropIndex("Web.PurchaseWaybills", new[] { "FromCityId" }); DropIndex("Web.PurchaseWaybills", new[] { "ShipMethodId" }); DropIndex("Web.PurchaseWaybills", "IX_PurchaseTransportGR_DocID"); DropIndex("Web.PurchaseWaybills", new[] { "ConsignerId" }); DropIndex("Web.PurchaseWaybills", new[] { "TransporterId" }); DropIndex("Web.PurchaseWaybills", "IX_PurchaseWaybill_EntryNo"); DropIndex("Web.PurchaseWaybills", "IX_PurchaseWaybill_DocID"); DropIndex("Web.GateIns", "IX_GateIn_DocID"); DropIndex("Web.PurchaseGoodsReceiptHeaders", new[] { "UnitConversionForId" }); DropIndex("Web.PurchaseGoodsReceiptHeaders", new[] { "ReferenceDocTypeId" }); DropIndex("Web.PurchaseGoodsReceiptHeaders", new[] { "StockHeaderId" }); DropIndex("Web.PurchaseGoodsReceiptHeaders", new[] { "RoadPermitFormId" }); DropIndex("Web.PurchaseGoodsReceiptHeaders", new[] { "GateInId" }); DropIndex("Web.PurchaseGoodsReceiptHeaders", new[] { "PurchaseWaybillId" }); DropIndex("Web.PurchaseGoodsReceiptHeaders", new[] { "GodownId" }); DropIndex("Web.PurchaseGoodsReceiptHeaders", new[] { "SupplierId" }); DropIndex("Web.PurchaseGoodsReceiptHeaders", "IX_PurchaseGoodsReceiptHeader_DocID"); DropIndex("Web.PurchaseGoodsReceiptLines", new[] { "ProductUidCurrentProcessId" }); DropIndex("Web.PurchaseGoodsReceiptLines", new[] { "ProductUidCurrentGodownId" }); DropIndex("Web.PurchaseGoodsReceiptLines", new[] { "ProductUidLastTransactionPersonId" }); DropIndex("Web.PurchaseGoodsReceiptLines", new[] { "ProductUidLastTransactionDocTypeId" }); DropIndex("Web.PurchaseGoodsReceiptLines", new[] { "ReferenceDocTypeId" }); DropIndex("Web.PurchaseGoodsReceiptLines", new[] { "StockId" }); DropIndex("Web.PurchaseGoodsReceiptLines", new[] { "DealUnitId" }); DropIndex("Web.PurchaseGoodsReceiptLines", new[] { "Dimension2Id" }); DropIndex("Web.PurchaseGoodsReceiptLines", new[] { "Dimension1Id" }); DropIndex("Web.PurchaseGoodsReceiptLines", new[] { "ProductId" }); DropIndex("Web.PurchaseGoodsReceiptLines", new[] { "ProductUidId" }); DropIndex("Web.PurchaseGoodsReceiptLines", new[] { "PurchaseIndentLineId" }); DropIndex("Web.PurchaseGoodsReceiptLines", new[] { "PurchaseOrderLineId" }); DropIndex("Web.PurchaseGoodsReceiptLines", new[] { "PurchaseGoodsReceiptHeaderId" }); DropIndex("Web.SalesTaxGroupParties", "IX_SalesTaxGroupParty_SalesTaxGroupPartyName"); DropIndex("Web.Suppliers", new[] { "SalesTaxGroupPartyId" }); DropIndex("Web.Suppliers", new[] { "PersonID" }); DropIndex("Web.ProductSuppliers", new[] { "SupplierId" }); DropIndex("Web.ProductSuppliers", new[] { "ProductId" }); DropIndex("Web.Sizes", new[] { "UnitId" }); DropIndex("Web.Sizes", new[] { "ProductShapeId" }); DropIndex("Web.Sizes", "IX_Size_SizeName"); DropIndex("Web.Sizes", new[] { "DocTypeId" }); DropIndex("Web.ProductSizeTypes", "IX_ProductSizeType_ProductSizeTypeName"); DropIndex("Web.ProductSizes", new[] { "SizeId" }); DropIndex("Web.ProductSizes", new[] { "ProductId" }); DropIndex("Web.ProductSizes", new[] { "ProductSizeTypeId" }); DropIndex("Web.ProductRelatedAccessories", new[] { "Product_ProductId" }); DropIndex("Web.ProductRelatedAccessories", "IX_ProductRelatedAccessories_AccessoryId"); DropIndex("Web.ProductRelatedAccessories", "IX_ProductRelatedAccessories_ProductId"); DropIndex("Web.ProductIncludedAccessories", new[] { "Product_ProductId" }); DropIndex("Web.ProductIncludedAccessories", "IX_ProductIncludedAccessories_AccessoryId"); DropIndex("Web.ProductIncludedAccessories", "IX_ProductIncludedAccessories_ProductId"); DropIndex("Web.ProductBuyers", new[] { "BuyerId" }); DropIndex("Web.ProductBuyers", new[] { "ProductId" }); DropIndex("Web.ProductAttributes", new[] { "ProductId" }); DropIndex("Web.Designations", "IX_Designation_DesignationName"); DropIndex("Web.Departments", "IX_Department_DepartmentName"); DropIndex("Web.Employees", new[] { "DepartmentID" }); DropIndex("Web.Employees", new[] { "DesignationID" }); DropIndex("Web.Employees", new[] { "PersonID" }); DropIndex("Web.ProductUidHeaders", new[] { "GenPersonId" }); DropIndex("Web.ProductUidHeaders", new[] { "GenDocTypeId" }); DropIndex("Web.ProductUidHeaders", new[] { "Dimension2Id" }); DropIndex("Web.ProductUidHeaders", new[] { "Dimension1Id" }); DropIndex("Web.ProductUidHeaders", new[] { "ProductId" }); DropIndex("Web.DeliveryTerms", "IX_DeliveryTerms_DeliveryTermsName"); DropIndex("Web.SaleOrderHeaders", new[] { "UnitConversionForId" }); DropIndex("Web.SaleOrderHeaders", new[] { "LedgerHeaderId" }); DropIndex("Web.SaleOrderHeaders", new[] { "DeliveryTermsId" }); DropIndex("Web.SaleOrderHeaders", new[] { "ShipMethodId" }); DropIndex("Web.SaleOrderHeaders", new[] { "CurrencyId" }); DropIndex("Web.SaleOrderHeaders", new[] { "BillToBuyerId" }); DropIndex("Web.SaleOrderHeaders", new[] { "SaleToBuyerId" }); DropIndex("Web.SaleOrderHeaders", new[] { "SiteId" }); DropIndex("Web.SaleOrderHeaders", new[] { "DivisionId" }); DropIndex("Web.SaleOrderHeaders", new[] { "DocTypeId" }); DropIndex("Web.SaleOrderLines", new[] { "ReferenceDocTypeId" }); DropIndex("Web.SaleOrderLines", new[] { "DealUnitId" }); DropIndex("Web.SaleOrderLines", new[] { "Dimension2Id" }); DropIndex("Web.SaleOrderLines", new[] { "Dimension1Id" }); DropIndex("Web.SaleOrderLines", "IX_SaleOrderLine_SaleOrdeHeaderProductDueDate"); DropIndex("Web.SaleDeliveryOrderHeaders", new[] { "ShipMethodId" }); DropIndex("Web.SaleDeliveryOrderHeaders", new[] { "BuyerId" }); DropIndex("Web.SaleDeliveryOrderHeaders", new[] { "SiteId" }); DropIndex("Web.SaleDeliveryOrderHeaders", new[] { "DivisionId" }); DropIndex("Web.SaleDeliveryOrderHeaders", new[] { "DocTypeId" }); DropIndex("Web.SaleDeliveryOrderLines", new[] { "SaleDeliveryOrderHeaderId" }); DropIndex("Web.SaleDeliveryOrderLines", new[] { "SaleOrderLineId" }); DropIndex("Web.Reasons", "IX_Reason_ReasonName"); DropIndex("Web.RequisitionHeaders", new[] { "ReferenceDocTypeId" }); DropIndex("Web.RequisitionHeaders", new[] { "ReasonId" }); DropIndex("Web.RequisitionHeaders", new[] { "CostCenterId" }); DropIndex("Web.RequisitionHeaders", new[] { "PersonId" }); DropIndex("Web.RequisitionHeaders", "IX_RequisitionHeader_DocID"); DropIndex("Web.RequisitionLines", new[] { "ProcessId" }); DropIndex("Web.RequisitionLines", new[] { "Dimension2Id" }); DropIndex("Web.RequisitionLines", new[] { "Dimension1Id" }); DropIndex("Web.RequisitionLines", new[] { "ProductId" }); DropIndex("Web.RequisitionLines", new[] { "RequisitionHeaderId" }); DropIndex("Web.StockProcesses", new[] { "ReferenceDocTypeId" }); DropIndex("Web.StockProcesses", new[] { "Dimension2Id" }); DropIndex("Web.StockProcesses", new[] { "Dimension1Id" }); DropIndex("Web.StockProcesses", new[] { "CostCenterId" }); DropIndex("Web.StockProcesses", new[] { "GodownId" }); DropIndex("Web.StockProcesses", new[] { "ProcessId" }); DropIndex("Web.StockProcesses", new[] { "ProductUidId" }); DropIndex("Web.StockProcesses", new[] { "ProductId" }); DropIndex("Web.StockProcesses", new[] { "StockHeaderId" }); DropIndex("Web.Stocks", new[] { "ReferenceDocTypeId" }); DropIndex("Web.Stocks", new[] { "Dimension2Id" }); DropIndex("Web.Stocks", new[] { "Dimension1Id" }); DropIndex("Web.Stocks", new[] { "CostCenterId" }); DropIndex("Web.Stocks", new[] { "GodownId" }); DropIndex("Web.Stocks", new[] { "ProcessId" }); DropIndex("Web.Stocks", new[] { "ProductId" }); DropIndex("Web.Stocks", new[] { "ProductUidId" }); DropIndex("Web.Stocks", new[] { "StockHeaderId" }); DropIndex("Web.StockLines", new[] { "ProductUidCurrentProcessId" }); DropIndex("Web.StockLines", new[] { "ProductUidCurrentGodownId" }); DropIndex("Web.StockLines", new[] { "ProductUidLastTransactionPersonId" }); DropIndex("Web.StockLines", new[] { "ProductUidLastTransactionDocTypeId" }); DropIndex("Web.StockLines", new[] { "CostCenterId" }); DropIndex("Web.StockLines", new[] { "Dimension2Id" }); DropIndex("Web.StockLines", new[] { "Dimension1Id" }); DropIndex("Web.StockLines", new[] { "FromStockProcessId" }); DropIndex("Web.StockLines", new[] { "StockProcessId" }); DropIndex("Web.StockLines", new[] { "StockId" }); DropIndex("Web.StockLines", new[] { "FromStockId" }); DropIndex("Web.StockLines", new[] { "FromProcessId" }); DropIndex("Web.StockLines", new[] { "ProductId" }); DropIndex("Web.StockLines", new[] { "RequisitionLineId" }); DropIndex("Web.StockLines", new[] { "ProductUidId" }); DropIndex("Web.StockLines", new[] { "StockHeaderId" }); DropIndex("Web.Machines", "IX_Machine_MachineName"); DropIndex("Web.LedgerHeaders", new[] { "GodownId" }); DropIndex("Web.LedgerHeaders", new[] { "CostCenterId" }); DropIndex("Web.LedgerHeaders", new[] { "ProcessId" }); DropIndex("Web.LedgerHeaders", new[] { "LedgerAccountId" }); DropIndex("Web.LedgerHeaders", "IX_LedgerHeader_DocID"); DropIndex("Web.Currencies", "IX_Currency_Name"); DropIndex("Web.StockHeaders", new[] { "ReferenceDocTypeId" }); DropIndex("Web.StockHeaders", new[] { "LedgerAccountId" }); DropIndex("Web.StockHeaders", new[] { "ContraLedgerAccountId" }); DropIndex("Web.StockHeaders", new[] { "LedgerHeaderId" }); DropIndex("Web.StockHeaders", new[] { "MachineId" }); DropIndex("Web.StockHeaders", new[] { "CostCenterId" }); DropIndex("Web.StockHeaders", new[] { "GatePassHeaderId" }); DropIndex("Web.StockHeaders", new[] { "GodownId" }); DropIndex("Web.StockHeaders", new[] { "FromGodownId" }); DropIndex("Web.StockHeaders", new[] { "ProcessId" }); DropIndex("Web.StockHeaders", new[] { "PersonId" }); DropIndex("Web.StockHeaders", new[] { "CurrencyId" }); DropIndex("Web.StockHeaders", "IX_StockHeader_DocID"); DropIndex("Web.ShipMethods", "IX_ShipMethod_ShipMethodName"); DropIndex("Web.PackingHeaders", new[] { "DealUnitId" }); DropIndex("Web.PackingHeaders", new[] { "ShipMethodId" }); DropIndex("Web.PackingHeaders", new[] { "GodownId" }); DropIndex("Web.PackingHeaders", new[] { "JobWorkerId" }); DropIndex("Web.PackingHeaders", new[] { "BuyerId" }); DropIndex("Web.PackingHeaders", new[] { "StockHeaderId" }); DropIndex("Web.PackingHeaders", "IX_PackingHeader_DocID"); DropIndex("Web.PackingLines", new[] { "ProductUidCurrentProcessId" }); DropIndex("Web.PackingLines", new[] { "ProductUidCurrentGodownId" }); DropIndex("Web.PackingLines", new[] { "ProductUidLastTransactionPersonId" }); DropIndex("Web.PackingLines", new[] { "ProductUidLastTransactionDocTypeId" }); DropIndex("Web.PackingLines", new[] { "StockReceiveId" }); DropIndex("Web.PackingLines", new[] { "StockIssueId" }); DropIndex("Web.PackingLines", new[] { "DealUnitId" }); DropIndex("Web.PackingLines", new[] { "FromProcessId" }); DropIndex("Web.PackingLines", new[] { "SaleDeliveryOrderLineId" }); DropIndex("Web.PackingLines", new[] { "SaleOrderLineId" }); DropIndex("Web.PackingLines", new[] { "Dimension2Id" }); DropIndex("Web.PackingLines", new[] { "Dimension1Id" }); DropIndex("Web.PackingLines", new[] { "ProductId" }); DropIndex("Web.PackingLines", new[] { "ProductUidId" }); DropIndex("Web.PackingLines", new[] { "PackingHeaderId" }); DropIndex("Web.ProductUids", new[] { "CurrenctProcessId" }); DropIndex("Web.ProductUids", new[] { "CurrenctGodownId" }); DropIndex("Web.ProductUids", new[] { "LastTransactionPersonId" }); DropIndex("Web.ProductUids", new[] { "LastTransactionDocTypeId" }); DropIndex("Web.ProductUids", new[] { "GenPersonId" }); DropIndex("Web.ProductUids", new[] { "GenDocTypeId" }); DropIndex("Web.ProductUids", new[] { "Dimension2Id" }); DropIndex("Web.ProductUids", new[] { "Dimension1Id" }); DropIndex("Web.ProductUids", new[] { "ProductId" }); DropIndex("Web.ProductUids", new[] { "ProductUidHeaderId" }); DropIndex("Web.ProductUids", "IX_ProductUid_ProductUidName"); DropIndex("Web.ProdOrderHeaders", new[] { "MaterialPlanHeaderId" }); DropIndex("Web.ProdOrderHeaders", new[] { "BuyerId" }); DropIndex("Web.ProdOrderHeaders", new[] { "ReferenceDocTypeId" }); DropIndex("Web.ProdOrderHeaders", new[] { "SiteId" }); DropIndex("Web.ProdOrderHeaders", new[] { "DivisionId" }); DropIndex("Web.ProdOrderHeaders", new[] { "DocTypeId" }); DropIndex("Web.Buyers", new[] { "PersonID" }); DropIndex("Web.MaterialPlanHeaders", new[] { "ReferenceDocTypeId" }); DropIndex("Web.MaterialPlanHeaders", new[] { "GodownId" }); DropIndex("Web.MaterialPlanHeaders", new[] { "SiteId" }); DropIndex("Web.MaterialPlanHeaders", new[] { "DivisionId" }); DropIndex("Web.MaterialPlanHeaders", new[] { "BuyerId" }); DropIndex("Web.MaterialPlanHeaders", new[] { "DocTypeId" }); DropIndex("Web.MaterialPlanLines", new[] { "Dimension2Id" }); DropIndex("Web.MaterialPlanLines", new[] { "Dimension1Id" }); DropIndex("Web.MaterialPlanLines", new[] { "ProcessId" }); DropIndex("Web.MaterialPlanLines", new[] { "ProductId" }); DropIndex("Web.MaterialPlanLines", new[] { "MaterialPlanHeaderId" }); DropIndex("Web.ProdOrderLines", new[] { "ReferenceDocTypeId" }); DropIndex("Web.ProdOrderLines", new[] { "MaterialPlanLineId" }); DropIndex("Web.ProdOrderLines", new[] { "ProcessId" }); DropIndex("Web.ProdOrderLines", new[] { "Dimension2Id" }); DropIndex("Web.ProdOrderLines", new[] { "Dimension1Id" }); DropIndex("Web.ProdOrderLines", new[] { "ProductId" }); DropIndex("Web.ProdOrderLines", new[] { "ProdOrderHeaderId" }); DropIndex("Web.JobOrderLines", new[] { "ProductUidCurrentProcessId" }); DropIndex("Web.JobOrderLines", new[] { "ProductUidCurrentGodownId" }); DropIndex("Web.JobOrderLines", new[] { "ProductUidLastTransactionPersonId" }); DropIndex("Web.JobOrderLines", new[] { "ProductUidLastTransactionDocTypeId" }); DropIndex("Web.JobOrderLines", new[] { "ProductUidHeaderId" }); DropIndex("Web.JobOrderLines", new[] { "StockProcessId" }); DropIndex("Web.JobOrderLines", new[] { "StockId" }); DropIndex("Web.JobOrderLines", new[] { "DealUnitId" }); DropIndex("Web.JobOrderLines", new[] { "UnitId" }); DropIndex("Web.JobOrderLines", new[] { "FromProcessId" }); DropIndex("Web.JobOrderLines", new[] { "Dimension2Id" }); DropIndex("Web.JobOrderLines", new[] { "Dimension1Id" }); DropIndex("Web.JobOrderLines", new[] { "ProdOrderLineId" }); DropIndex("Web.JobOrderLines", new[] { "ProductId" }); DropIndex("Web.JobOrderLines", new[] { "ProductUidId" }); DropIndex("Web.JobOrderLines", new[] { "JobOrderHeaderId" }); DropIndex("Web.Units", "IX_Unit_UnitName"); DropIndex("Web.GatePassLines", new[] { "UnitId" }); DropIndex("Web.GatePassLines", new[] { "GatePassHeaderId" }); DropIndex("Web.GatePassHeaders", new[] { "ReferenceDocTypeId" }); DropIndex("Web.GatePassHeaders", new[] { "GodownId" }); DropIndex("Web.GatePassHeaders", new[] { "PersonId" }); DropIndex("Web.GatePassHeaders", new[] { "SiteId" }); DropIndex("Web.GatePassHeaders", "IX_GatePassHeader_DocID"); DropIndex("Web.Gates", new[] { "SiteId" }); DropIndex("Web.Gates", "IX_Gate_GateName"); DropIndex("Web.Godowns", new[] { "GateId" }); DropIndex("Web.Godowns", new[] { "SiteId" }); DropIndex("Web.Godowns", "IX_Godown_GodownName"); DropIndex("Web.Sites", new[] { "DefaultDivisionId" }); DropIndex("Web.Sites", new[] { "DefaultGodownId" }); DropIndex("Web.Sites", new[] { "PersonId" }); DropIndex("Web.Sites", new[] { "CityId" }); DropIndex("Web.Processes", new[] { "CostCenterId" }); DropIndex("Web.Processes", new[] { "AccountId" }); DropIndex("Web.Processes", new[] { "ParentProcessId" }); DropIndex("Web.Processes", "IX_Process_ProcessName"); DropIndex("Web.Processes", "IX_Process_ProcessCode"); DropIndex("Web.LedgerAccountGroups", "IX_LedgerAccountGroup_LedgerAccountGroupName"); DropIndex("Web.LedgerAccounts", new[] { "LedgerAccountGroupId" }); DropIndex("Web.LedgerAccounts", new[] { "PersonId" }); DropIndex("Web.LedgerAccounts", "IX_LedgerAccount_LedgerAccountName"); DropIndex("Web.CostCenters", new[] { "ReferenceDocTypeId" }); DropIndex("Web.CostCenters", new[] { "ProcessId" }); DropIndex("Web.CostCenters", new[] { "ParentCostCenterId" }); DropIndex("Web.CostCenters", new[] { "LedgerAccountId" }); DropIndex("Web.CostCenters", new[] { "SiteId" }); DropIndex("Web.CostCenters", new[] { "DivisionId" }); DropIndex("Web.CostCenters", new[] { "DocTypeId" }); DropIndex("Web.CostCenters", "IX_CostCenter_CostCenterName"); DropIndex("Web.JobWorkers", new[] { "PersonID" }); DropIndex("Web.JobOrderHeaders", new[] { "UnitConversionForId" }); DropIndex("Web.JobOrderHeaders", new[] { "StockHeaderId" }); DropIndex("Web.JobOrderHeaders", new[] { "GatePassHeaderId" }); DropIndex("Web.JobOrderHeaders", new[] { "MachineId" }); DropIndex("Web.JobOrderHeaders", new[] { "CostCenterId" }); DropIndex("Web.JobOrderHeaders", new[] { "ProcessId" }); DropIndex("Web.JobOrderHeaders", new[] { "GodownId" }); DropIndex("Web.JobOrderHeaders", new[] { "OrderById" }); DropIndex("Web.JobOrderHeaders", new[] { "BillToPartyId" }); DropIndex("Web.JobOrderHeaders", new[] { "JobWorkerId" }); DropIndex("Web.JobOrderHeaders", new[] { "SiteId" }); DropIndex("Web.JobOrderHeaders", new[] { "DivisionId" }); DropIndex("Web.JobOrderHeaders", new[] { "DocTypeId" }); DropIndex("Web.Dimension2", new[] { "ReferenceDocTypeId" }); DropIndex("Web.Dimension2", new[] { "ProductTypeId" }); DropIndex("Web.Dimension2", "IX_Dimension2_Dimension2Name"); DropIndex("Web.ProductTypeAttributes", new[] { "ProductType_ProductTypeId" }); DropIndex("Web.ProductNatures", "IX_ProductNature_ProductNatureName"); DropIndex("Web.ProductGroups", new[] { "ProductTypeId" }); DropIndex("Web.ProductGroups", "IX_ProductGroup_ProductGroupName"); DropIndex("Web.ProductDesigns", new[] { "ProductTypeId" }); DropIndex("Web.ProductDesigns", "IX_ProductDesign_ProductDesignName"); DropIndex("Web.ProductCategories", new[] { "ProductTypeId" }); DropIndex("Web.ProductCategories", "IX_ProductCategory_ProductCategoryName"); DropIndex("Web.Dimension2Types", "IX_Dimension2Type_Dimension2TypeName"); DropIndex("Web.Dimension1Types", "IX_Dimension1Type_Dimension1TypeName"); DropIndex("Web.ProductTypes", new[] { "Dimension2TypeId" }); DropIndex("Web.ProductTypes", new[] { "Dimension1TypeId" }); DropIndex("Web.ProductTypes", new[] { "ProductNatureId" }); DropIndex("Web.ProductTypes", "IX_ProductType_ProductTypeName"); DropIndex("Web.Dimension1", new[] { "ReferenceDocTypeId" }); DropIndex("Web.Dimension1", new[] { "ProductTypeId" }); DropIndex("Web.Dimension1", "IX_Dimension1_Dimension1Name"); DropIndex("Web.JobOrderBoms", new[] { "Dimension2Id" }); DropIndex("Web.JobOrderBoms", new[] { "Dimension1Id" }); DropIndex("Web.JobOrderBoms", new[] { "ProductId" }); DropIndex("Web.JobOrderBoms", new[] { "JobOrderLineId" }); DropIndex("Web.JobOrderBoms", new[] { "JobOrderHeaderId" }); DropIndex("Web.DrawBackTariffHeads", "IX_DrawBackTariffHead_DrawBackTariffHeadName"); DropIndex("Web.Divisions", "IX_Division_Division"); DropIndex("Web.Products", new[] { "ReferenceDocTypeId" }); DropIndex("Web.Products", new[] { "DivisionId" }); DropIndex("Web.Products", new[] { "UnitId" }); DropIndex("Web.Products", new[] { "DrawBackTariffHeadId" }); DropIndex("Web.Products", new[] { "SalesTaxGroupProductId" }); DropIndex("Web.Products", new[] { "ProductGroupId" }); DropIndex("Web.Products", "IX_Product_ProductName"); DropIndex("Web.Products", "IX_Product_ProductCode"); DropIndex("Web.BomDetails", new[] { "Dimension2Id" }); DropIndex("Web.BomDetails", new[] { "Dimension1Id" }); DropIndex("Web.BomDetails", new[] { "ProcessId" }); DropIndex("Web.BomDetails", new[] { "ProductId" }); DropIndex("Web.BomDetails", new[] { "BaseProductId" }); DropIndex("Web.AspNetUserRoles1", new[] { "RoleId" }); DropIndex("Web.PersonContactTypes", "IX_PersonContactType_PersonContactTypeName"); DropIndex("Web.PersonContacts", new[] { "Person_PersonID" }); DropIndex("Web.PersonContacts", new[] { "ContactId" }); DropIndex("Web.PersonContacts", new[] { "PersonContactTypeId" }); DropIndex("Web.PersonContacts", new[] { "PersonId" }); DropIndex("Web.Countries", "IX_Country_Country"); DropIndex("Web.States", new[] { "Charge_ChargeId" }); DropIndex("Web.States", new[] { "Calculation_CalculationId" }); DropIndex("Web.States", new[] { "CountryId" }); DropIndex("Web.States", "IX_State_StateName"); DropIndex("Web.Cities", new[] { "StateId" }); DropIndex("Web.Cities", "IX_City_CityName"); DropIndex("Web.Areas", "IX_Area_AreaName"); DropIndex("Web.PersonAddresses", new[] { "AreaId" }); DropIndex("Web.PersonAddresses", new[] { "CityId" }); DropIndex("Web.PersonAddresses", new[] { "PersonId" }); DropIndex("Web.AspNetUserRoles", new[] { "IdentityUser_Id" }); DropIndex("Web.AspNetUserRoles", new[] { "RoleId" }); DropIndex("Web.AspNetUserLogins", new[] { "IdentityUser_Id" }); DropIndex("Web.AspNetUserClaims", new[] { "IdentityUser_Id" }); DropIndex("Web.Users", "UserNameIndex"); DropIndex("Web.People", new[] { "ApplicationUser_Id" }); DropIndex("Web.People", "IX_Person_Code"); DropIndex("Web.Agents", new[] { "PersonID" }); DropIndex("Web.MenuSubModules", "IX_SubModule_SubModuleName"); DropIndex("Web.MenuModules", "IX_Module_ModuleName"); DropIndex("Web.Menus", new[] { "ControllerActionId" }); DropIndex("Web.Menus", "IX_Menu_MenuName"); DropIndex("Web.DocumentCategories", "IX_DocumentCategory_DocumentCategoryName"); DropIndex("Web.MvcControllers", new[] { "ParentControllerId" }); DropIndex("Web.MvcControllers", "IX_Controller_ControllerName"); DropIndex("Web.ControllerActions", "IX_ControllerAction_ControllerName"); DropIndex("Web.ControllerActions", new[] { "ControllerId" }); DropIndex("Web.DocumentTypes", new[] { "ReportMenuId" }); DropIndex("Web.DocumentTypes", new[] { "ControllerActionId" }); DropIndex("Web.DocumentTypes", new[] { "DocumentCategoryId" }); DropIndex("Web.DocumentTypes", "IX_DocumentType_DocumentTypeName"); DropIndex("Web.DocumentTypes", "IX_DocumentType_DocumentTypeShortName"); DropIndex("Web.ActivityTypes", "IX_ActivityType_ActivityTypeName"); DropIndex("Web.ActivityLogs", new[] { "ActivityType" }); DropIndex("Web.ActivityLogs", new[] { "DocTypeId" }); DropTable("Web.ProductManufacturer"); DropTable("Web.SaleInvoiceHeaderDetail"); DropTable("Web.FinishedProduct"); DropTable("Web.WeavingRetensions"); DropTable("Web.ViewStockInBalance"); DropTable("Web.ViewSaleOrderLine"); DropTable("Web.ViewSaleOrderHeader"); DropTable("Web.ViewSaleOrderBalanceForCancellation"); DropTable("Web.ViewSaleOrderBalance"); DropTable("Web.ViewSaleInvoiceLine"); DropTable("Web.ViewSaleInvoiceBalance"); DropTable("Web.ViewSaleDispatchBalance"); DropTable("Web.ViewSaleDeliveryOrderBalance"); DropTable("Web.ViewRugSize"); DropTable("Web.ViewRugArea"); DropTable("Web._Roles"); DropTable("Web.ViewRequisitionBalance"); DropTable("Web.ViewPurchaseOrderLine"); DropTable("Web.ViewPurchaseOrderHeader"); DropTable("Web.ViewPurchaseOrderBalanceForInvoice"); DropTable("Web.ViewPurchaseOrderBalance"); DropTable("Web.ViewPurchaseInvoiceBalance"); DropTable("Web.ViewPurchaseIndentLine"); DropTable("Web.ViewPurchaseIndentHeader"); DropTable("Web.ViewPurchaseIndentBalance"); DropTable("Web.ViewPurchaseGoodsReceiptLine"); DropTable("Web.ViewPurchaseGoodsReceiptBalance"); DropTable("Web.ViewProdOrderLine"); DropTable("Web.ViewProdOrderHeader"); DropTable("Web.ViewProdOrderBalanceForMPlan"); DropTable("Web.ViewProdOrderBalance"); DropTable("Web.ViewMaterialRequestBalance"); DropTable("Web.ViewMaterialPlanBalance"); DropTable("Web.ViewJobReceiveBalanceForQA"); DropTable("Web.ViewJobReceiveBalanceForInvoice"); DropTable("Web.ViewJobReceiveBalance"); DropTable("Web.ViewJobOrderLine"); DropTable("Web.ViewJobOrderInspectionRequestBalance"); DropTable("Web.ViewJobOrderHeader"); DropTable("Web.ViewJobOrderBalanceFromStatus"); DropTable("Web.ViewJobOrderBalanceForInvoice"); DropTable("Web.ViewJobOrderBalanceForInspectionRequest"); DropTable("Web.ViewJobOrderBalanceForInspection"); DropTable("Web.ViewJobOrderBalance"); DropTable("Web.ViewJobInvoiceBalanceForRateAmendment"); DropTable("Web.ViewJobInvoiceBalance"); DropTable("Web.UserRoles"); DropTable("Web.UserPersons"); DropTable("Web.UserInfoes"); DropTable("Web.UserBookMarks"); DropTable("Web.UrgentLists"); DropTable("Web.UnitConversions"); DropTable("Web.TrialBalanceSettings"); DropTable("Web.TempUserStores"); DropTable("Web.TdsRates"); DropTable("Web.StockVirtual"); DropTable("Web.StockUid"); DropTable("Web.StockProcessBalances"); DropTable("Web.StockInOuts"); DropTable("Web.StockInHandSettings"); DropTable("Web.StockBalances"); DropTable("Web.StockAdjs"); DropTable("Web.SchemeRateDetails"); DropTable("Web.SchemeHeaders"); DropTable("Web.SchemeDateDetails"); DropTable("Web.SaleOrderSettings"); DropTable("Web.SaleOrderRateAmendmentLines"); DropTable("Web.SaleOrderQtyAmendmentLines"); DropTable("Web.SaleOrderLineStatus"); DropTable("Web.SaleOrderCancelLines"); DropTable("Web.SaleOrderCancelHeaders"); DropTable("Web.SaleOrderAmendmentHeaders"); DropTable("Web.SaleInvoiceSettings"); DropTable("Web.SaleInvoiceReturnLineCharges"); DropTable("Web.SaleInvoiceReturnLines"); DropTable("Web.SaleInvoiceReturnHeaderCharges"); DropTable("Web.SaleInvoiceReturnHeaders"); DropTable("Web.SaleInvoiceLineCharges"); DropTable("Web.SaleInvoiceHeaderCharges"); DropTable("Web.SaleDispatchSettings"); DropTable("Web.SaleDispatchReturnLines"); DropTable("Web.SaleDispatchReturnHeaders"); DropTable("Web.SaleDeliveryOrderSettings"); DropTable("Web.SaleDeliveryOrderCancelLines"); DropTable("Web.SaleDeliveryOrderCancelHeaders"); DropTable("Web.RugStencils"); DropTable("Web.Rug_RetentionPercentage"); DropTable("Web.RouteLines"); DropTable("Web.RolesSites"); DropTable("Web.RolesMenus"); DropTable("Web.RolesDivisions"); DropTable("Web.RolesControllerActions"); DropTable("Web.AspNetRoles"); DropTable("Web.RequisitionSettings"); DropTable("Web.RequisitionLineStatus"); DropTable("Web.RequisitionCancelLines"); DropTable("Web.RequisitionCancelHeaders"); DropTable("Web.ReportUIDValues"); DropTable("Web.SubReports"); DropTable("Web.ReportLines"); DropTable("Web.ReportHeaders"); DropTable("Web.ReportColumns"); DropTable("Web.RateListProductRateGroups"); DropTable("Web.RateListPersonRateGroups"); DropTable("Web.RateListLineHistories"); DropTable("Web.RateListLines"); DropTable("Web.RateListHistories"); DropTable("Web.RateListHeaders"); DropTable("Web.RateLists"); DropTable("Web.RateConversionSettings"); DropTable("Web.PurchaseQuotationSettings"); DropTable("Web.PurchaseQuotationLineCharges"); DropTable("Web.PurchaseQuotationHeaderCharges"); DropTable("Web.PurchaseQuotationLines"); DropTable("Web.PurchaseQuotationHeaders"); DropTable("Web.PurchaseOrderSettings"); DropTable("Web.PurchaseOrderRateAmendmentLineCharges"); DropTable("Web.PurchaseOrderRateAmendmentLines"); DropTable("Web.PurchaseOrderQtyAmendmentLines"); DropTable("Web.PurchaseOrderLineStatus"); DropTable("Web.PurchaseOrderLineCharges"); DropTable("Web.PurchaseOrderInspectionSettings"); DropTable("Web.PurchaseOrderInspectionRequestSettings"); DropTable("Web.PurchaseOrderInspectionRequestCancelLines"); DropTable("Web.PurchaseOrderInspectionRequestCancelHeaders"); DropTable("Web.PurchaseOrderInspectionRequestHeaders"); DropTable("Web.PurchaseOrderInspectionRequestLines"); DropTable("Web.PurchaseOrderInspectionLines"); DropTable("Web.PurchaseOrderInspectionHeaders"); DropTable("Web.PurchaseOrderHeaderStatus"); DropTable("Web.PurchaseOrderHeaderCharges"); DropTable("Web.PurchaseOrderAmendmentHeaderCharges"); DropTable("Web.PurchaseOrderAmendmentHeaders"); DropTable("Web.PurchaseInvoiceSettings"); DropTable("Web.PurchaseInvoiceReturnLineCharges"); DropTable("Web.PurchaseInvoiceReturnLines"); DropTable("Web.PurchaseInvoiceReturnHeaderCharges"); DropTable("Web.PurchaseInvoiceReturnHeaders"); DropTable("Web.PurchaseInvoiceRateAmendmentLines"); DropTable("Web.PurchaseInvoiceLineCharges"); DropTable("Web.PurchaseInvoiceHeaderCharges"); DropTable("Web.PurchaseInvoiceLines"); DropTable("Web.PurchaseInvoiceHeaders"); DropTable("Web.PurchaseInvoiceAmendmentHeaders"); DropTable("Web.PurchaseIndentSettings"); DropTable("Web.PurchaseIndentLineStatus"); DropTable("Web.PurchaseGoodsReturnLines"); DropTable("Web.PurchaseGoodsReturnHeaders"); DropTable("Web.PurchaseGoodsReceiptSettings"); DropTable("Web.ProductUidSiteDetails"); DropTable("Web.Tags"); DropTable("Web.ProductTags"); DropTable("Web.ProductSiteDetails"); DropTable("Web.ProductShapes"); DropTable("Web.ProductProcesses"); DropTable("Web.ProductionOrderSettings"); DropTable("Web.ProductCustomGroupLines"); DropTable("Web.ProductCustomGroupHeaders"); DropTable("Web.ProductAlias"); DropTable("Web.ProdOrderSettings"); DropTable("Web.ProdOrderLineStatus"); DropTable("Web.ProdOrderHeaderStatus"); DropTable("Web.ProdOrderCancelLines"); DropTable("Web.ProdOrderCancelHeaders"); DropTable("Web.ProcessSettings"); DropTable("Web.ProductRateGroups"); DropTable("Web.ProcessSequenceLines"); DropTable("Web.PersonRegistrations"); DropTable("Web.PersonProcesses"); DropTable("Web.PersonDocuments"); DropTable("Web.PersonCustomGroupLines"); DropTable("Web.PersonCustomGroupHeaders"); DropTable("Web.PersonBankAccounts"); DropTable("Web.PerkDocumentTypes"); DropTable("Web.PackingSettings"); DropTable("Web.Narrations"); DropTable("Web.MaterialRequestSettings"); DropTable("Web.MaterialReceiveSettings"); DropTable("Web.MaterialPlanSettings"); DropTable("Web.MaterialPlanForSaleOrderLines"); DropTable("Web.MaterialPlanForSaleOrders"); DropTable("Web.MaterialPlanForProdOrderLines"); DropTable("Web.MaterialPlanForProdOrders"); DropTable("Web.MaterialPlanForJobOrderLines"); DropTable("Web.MaterialPlanForJobOrders"); DropTable("Web.StockHeaderSettings"); DropTable("Web.Manufacturers"); DropTable("Web.LedgerSettings"); DropTable("Web.LedgerLineRefValues"); DropTable("Web.LedgerAdjs"); DropTable("Web.LedgerLines"); DropTable("Web.Ledgers"); DropTable("Web.LeaveTypes"); DropTable("Web.JobReturnBoms"); DropTable("Web.JobReceiveSettings"); DropTable("Web.JobReceiveQASettings"); DropTable("Web.JobReceiveQALines"); DropTable("Web.JobReceiveQAHeaders"); DropTable("Web.JobReceiveLineStatus"); DropTable("Web.JobReceiveByProducts"); DropTable("Web.JobReceiveBoms"); DropTable("Web.JobOrderSettings"); DropTable("Web.JobOrderRateAmendmentLines"); DropTable("Web.JobOrderQtyAmendmentLines"); DropTable("Web.Perks"); DropTable("Web.JobOrderPerks"); DropTable("Web.JobOrderLineStatus"); DropTable("Web.JobOrderLineExtendeds"); DropTable("Web.JobOrderLineCharges"); DropTable("Web.JobOrderJobOrders"); DropTable("Web.JobOrderInspectionSettings"); DropTable("Web.JobOrderInspectionRequestSettings"); DropTable("Web.JobOrderInspectionRequestCancelLines"); DropTable("Web.JobOrderInspectionRequestCancelHeaders"); DropTable("Web.JobOrderInspectionRequestHeaders"); DropTable("Web.JobOrderInspectionRequestLines"); DropTable("Web.JobOrderInspectionLines"); DropTable("Web.JobOrderInspectionHeaders"); DropTable("Web.JobOrderHeaderStatus"); DropTable("Web.JobOrderHeaderCharges"); DropTable("Web.JobOrderCancelLines"); DropTable("Web.JobOrderCancelHeaders"); DropTable("Web.JobOrderCancelBoms"); DropTable("Web.JobOrderByProducts"); DropTable("Web.JobOrderAmendmentHeaders"); DropTable("Web.JobInvoiceSettings"); DropTable("Web.JobInvoiceReturnLineCharges"); DropTable("Web.JobInvoiceReturnLines"); DropTable("Web.JobInvoiceReturnHeaderCharges"); DropTable("Web.JobReturnLines"); DropTable("Web.JobReturnHeaders"); DropTable("Web.JobInvoiceReturnHeaders"); DropTable("Web.JobInvoiceRateAmendmentLineCharges"); DropTable("Web.JobInvoiceRateAmendmentLines"); DropTable("Web.JobInvoiceLineStatus"); DropTable("Web.JobInvoiceLineCharges"); DropTable("Web.JobInvoiceHeaderCharges"); DropTable("Web.JobReceiveHeaders"); DropTable("Web.JobReceiveLines"); DropTable("Web.JobInvoiceLines"); DropTable("Web.JobInvoiceHeaders"); DropTable("Web.JobInvoiceAmendmentHeaderCharges"); DropTable("Web.JobInvoiceAmendmentHeaders"); DropTable("Web.JobInstructions"); DropTable("Web.JobConsumptionSettings"); DropTable("Web.ProductTypeQaAttributes"); DropTable("Web.InspectionQaAttributes"); DropTable("Web.ExcessMaterialSettings"); DropTable("Web.ExcessMaterialLines"); DropTable("Web.ExcessMaterialHeaders"); DropTable("Web.DocumentTypeTimePlans"); DropTable("Web.DocumentTypeTimeExtensions"); DropTable("Web.DocumentTypeSites"); DropTable("Web.DocumentTypeDivisions"); DropTable("Web.DocumentStatus"); DropTable("Web.DocumentAttachments"); DropTable("Web.DocSmsContents"); DropTable("Web.DocNotificationContents"); DropTable("Web.DocEmailContents"); DropTable("Web.DispatchWaybillLines"); DropTable("Web.Routes"); DropTable("Web.DispatchWaybillHeaders"); DropTable("Web.PromoCodes"); DropTable("Web.SaleInvoiceLines"); DropTable("Web.SaleDispatchLines"); DropTable("Web.SaleDispatchHeaders"); DropTable("Web.SaleInvoiceHeaders"); DropTable("Web.CustomDetails"); DropTable("Web.CurrencyConversions"); DropTable("Web.Couriers"); DropTable("Web.Counters"); DropTable("Web.CostCenterStatusExtendeds"); DropTable("Web.CostCenterStatus"); DropTable("Web.Companies"); DropTable("Web.ChargeGroupProducts"); DropTable("Web.CalculationProducts"); DropTable("Web.CalculationLineLedgerAccounts"); DropTable("Web.CalculationHeaderLedgerAccounts"); DropTable("Web.Charges"); DropTable("Web.CalculationFooters"); DropTable("Web.Calculations"); DropTable("Web.BusinessSessions"); DropTable("Web.TdsGroups"); DropTable("Web.TdsCategories"); DropTable("Web.ServiceTaxCategories"); DropTable("Web.PersonRateGroups"); DropTable("Web.BusinessEntities"); DropTable("Web.ProductStyles"); DropTable("Web.ProductQualities"); DropTable("Web.ProductInvoiceGroups"); DropTable("Web.ProductDesignPatterns"); DropTable("Web.ProductCollections"); DropTable("Web.ProcessSequenceHeaders"); DropTable("Web.DescriptionOfGoods"); DropTable("Web.ProductContentLines"); DropTable("Web.ProductContentHeaders"); DropTable("Web.Colours"); DropTable("Web.SalesTaxGroupProducts"); DropTable("Web.SalesTaxGroups"); DropTable("Web.ChargeTypes"); DropTable("Web.ChargeGroupPersons"); DropTable("Web.PurchaseOrderHeaders"); DropTable("Web.PurchaseOrderCancelHeaders"); DropTable("Web.PurchaseOrderCancelLines"); DropTable("Web.PurchaseOrderLines"); DropTable("Web.PurchaseIndentHeaders"); DropTable("Web.PurchaseIndentCancelHeaders"); DropTable("Web.PurchaseIndentCancelLines"); DropTable("Web.PurchaseIndentLines"); DropTable("Web.Transporters"); DropTable("Web.PurchaseWaybills"); DropTable("Web.GateIns"); DropTable("Web.PurchaseGoodsReceiptHeaders"); DropTable("Web.PurchaseGoodsReceiptLines"); DropTable("Web.SalesTaxGroupParties"); DropTable("Web.Suppliers"); DropTable("Web.ProductSuppliers"); DropTable("Web.Sizes"); DropTable("Web.ProductSizeTypes"); DropTable("Web.ProductSizes"); DropTable("Web.ProductRelatedAccessories"); DropTable("Web.ProductIncludedAccessories"); DropTable("Web.ProductBuyers"); DropTable("Web.ProductAttributes"); DropTable("Web.Designations"); DropTable("Web.Departments"); DropTable("Web.Employees"); DropTable("Web.ProductUidHeaders"); DropTable("Web.UnitConversionFors"); DropTable("Web.DeliveryTerms"); DropTable("Web.SaleOrderHeaders"); DropTable("Web.SaleOrderLines"); DropTable("Web.SaleDeliveryOrderHeaders"); DropTable("Web.SaleDeliveryOrderLines"); DropTable("Web.Reasons"); DropTable("Web.RequisitionHeaders"); DropTable("Web.RequisitionLines"); DropTable("Web.StockProcesses"); DropTable("Web.Stocks"); DropTable("Web.StockLines"); DropTable("Web.Machines"); DropTable("Web.LedgerHeaders"); DropTable("Web.Currencies"); DropTable("Web.StockHeaders"); DropTable("Web.ShipMethods"); DropTable("Web.PackingHeaders"); DropTable("Web.PackingLines"); DropTable("Web.ProductUids"); DropTable("Web.ProdOrderHeaders"); DropTable("Web.Buyers"); DropTable("Web.MaterialPlanHeaders"); DropTable("Web.MaterialPlanLines"); DropTable("Web.ProdOrderLines"); DropTable("Web.JobOrderLines"); DropTable("Web.Units"); DropTable("Web.GatePassLines"); DropTable("Web.GatePassHeaders"); DropTable("Web.Gates"); DropTable("Web.Godowns"); DropTable("Web.Sites"); DropTable("Web.Processes"); DropTable("Web.LedgerAccountGroups"); DropTable("Web.LedgerAccounts"); DropTable("Web.CostCenters"); DropTable("Web.JobWorkers"); DropTable("Web.JobOrderHeaders"); DropTable("Web.Dimension2"); DropTable("Web.ProductTypeAttributes"); DropTable("Web.ProductNatures"); DropTable("Web.ProductGroups"); DropTable("Web.ProductDesigns"); DropTable("Web.ProductCategories"); DropTable("Web.Dimension2Types"); DropTable("Web.Dimension1Types"); DropTable("Web.ProductTypes"); DropTable("Web.Dimension1"); DropTable("Web.JobOrderBoms"); DropTable("Web.DrawBackTariffHeads"); DropTable("Web.Divisions"); DropTable("Web.Products"); DropTable("Web.BomDetails"); DropTable("Web.AspNetUserRoles1"); DropTable("Web.AspNetRoles1"); DropTable("Web.PersonContactTypes"); DropTable("Web.PersonContacts"); DropTable("Web.Countries"); DropTable("Web.States"); DropTable("Web.Cities"); DropTable("Web.Areas"); DropTable("Web.PersonAddresses"); DropTable("Web.AspNetUserRoles"); DropTable("Web.AspNetUserLogins"); DropTable("Web.AspNetUserClaims"); DropTable("Web.Users"); DropTable("Web.People"); DropTable("Web.Agents"); DropTable("Web.MenuSubModules"); DropTable("Web.MenuModules"); DropTable("Web.Menus"); DropTable("Web.DocumentCategories"); DropTable("Web.MvcControllers"); DropTable("Web.ControllerActions"); DropTable("Web.DocumentTypes"); DropTable("Web.ActivityTypes"); DropTable("Web.ActivityLogs"); DropTable("Web._Users"); } } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace VideoGameDependencyInjectionDemo { class Grenade : IWeapon { public Grenade(string weaponName) { WeaponName = weaponName; } public string WeaponName { get; set; } public void AttackWithMe() { Console.WriteLine(WeaponName + " sizzles for a moment, then explodes into a shower of deadly metal fragments."); } } }
using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.Xml.Linq; namespace BibleBrowserUWP { /// <summary> /// Represents XML Bible with all its metadata, and exposes the capacity to retrieve both meta information /// and content from those Bibles. /// </summary> static class BibleLoader { #region Properties /// <summary> /// Maintains a list of the XML Bible names and book names in the versions' languages. /// </summary> public static Dictionary<string, BibleVersion> LoadedBibles { get; private set; } = new Dictionary<string, BibleVersion>(); /// <summary> /// The <c>BibleVersion</c>s available to read from. /// </summary> public static ObservableCollection<BibleVersion> Bibles { get { ObservableCollection<BibleVersion> bibles = new ObservableCollection<BibleVersion>(); foreach (var bible in LoadedBibles) { bibles.Add(bible.Value); } return bibles; } } /// <summary> /// A list of all the local files that contain Bibles we want to read from. /// </summary> public static readonly List<string> m_BibleFileNames = new List<string>() { "dby.xml", "kjv.xml", "ylt.xml", "lsg.xml" }; /// <summary> /// The app folder in which Bible versions are stored. /// </summary> public const string BIBLE_PATH = "Bibles"; #endregion #region Methods /// <summary> /// Static constructor. /// Add each Bible in the app directory to the list of Bibles. /// </summary> static BibleLoader() { // Create a new meta object for each Bible for fast retrieval. foreach (string fileName in m_BibleFileNames) { LoadedBibles.Add(fileName, new BibleVersion(fileName)); } } /// <summary> /// Get the <c>BibleVersion</c> loaded into memory that matches a file name. /// </summary> /// <param name="fileName">The file name of a version</param> /// <returns>A <c>BibleVersion</c></returns> public static BibleVersion Version(string fileName) { return LoadedBibles[fileName]; } /// <summary> /// Get the tag name of XML /// May return null... /// Ajithsz, How to get Tag name of Xml by using XDocument /// </summary> /// <param name="doc">The XML document</param> /// <param name="elementName">The tag name</param> /// <returns></returns> private static XElement GetElement(XDocument doc, string elementName) { foreach(XNode node in doc.DescendantNodes()) { if(node is XElement) { XElement element = (XElement)node; if(element.Name.LocalName.Equals(elementName)) return element; } } return null; } #endregion #region Tests public static String TestInformation() { string info = null; foreach(KeyValuePair<string, BibleVersion> bible in LoadedBibles) { info = bible.Value.Language + ", " + bible.Value.Abbreviation + ", " + bible.Value.Title; } return info; } /// <summary> /// Show all the loaded book names from every available Bibles concatenated together. /// </summary> /// <returns></returns> public static String TestBookNames() { string bookNames = string.Empty; foreach(KeyValuePair<string, BibleVersion> bible in LoadedBibles) { List<String> bknames = bible.Value.BookNames; foreach(String name in bknames) { bookNames += name + "\n"; } } return bookNames; } #endregion } }
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections.Generic; using System.Linq; using Xunit; namespace System.Buffers.Tests { public class BufferEqualityTests { [Fact] public void BuffersCanBeBoxed() { var buffer = Buffer<byte>.Empty; object bufferAsObject = buffer; Assert.True(buffer.Equals(bufferAsObject)); var readOnlyBuffer = ReadOnlyBuffer<byte>.Empty; object readOnlyBufferAsObject = readOnlyBuffer; Assert.True(readOnlyBuffer.Equals(readOnlyBufferAsObject)); Assert.False(buffer.Equals(new object())); Assert.False(readOnlyBuffer.Equals(new object())); Assert.False(buffer.Equals((object)(new Buffer<byte>(new byte[] { 1, 2 })))); Assert.False(readOnlyBuffer.Equals((object)(new ReadOnlyBuffer<byte>(new byte[] { 1, 2 })))); Assert.True(buffer.Equals(readOnlyBufferAsObject)); Assert.True(readOnlyBuffer.Equals(bufferAsObject)); } [Theory] [MemberData(nameof(ValidArraySegments))] public void BuffersReferencingSameMemoryAreEqualInEveryAspect(byte[] bytes, int start, int length) { var buffer = new Buffer<byte>(bytes, start, length); var pointingToSameMemory = new Buffer<byte>(bytes, start, length); Buffer<byte> structCopy = buffer; BuffersReferencingSameMemoryAreEqualInEveryAspect(buffer, pointingToSameMemory); BuffersReferencingSameMemoryAreEqualInEveryAspect(buffer, structCopy); } [Theory] [MemberData(nameof(ValidArraySegments))] public void ReadOnlyBuffersReferencingSameMemoryAreEqualInEveryAspect(byte[] bytes, int start, int length) { var buffer = new ReadOnlyBuffer<byte>(bytes, start, length); var pointingToSameMemory = new ReadOnlyBuffer<byte>(bytes, start, length); var structCopy = buffer; BuffersReferencingSameMemoryAreEqualInEveryAspect(ref buffer, ref pointingToSameMemory); BuffersReferencingSameMemoryAreEqualInEveryAspect(ref buffer, ref structCopy); } [Theory] [MemberData(nameof(FullArraySegments))] public void BufferArrayEquivalenceAndImplicitCastsAreEqual(byte[] bytes) { var buffer = new Buffer<byte>(bytes); var readOnlyBuffer = new ReadOnlyBuffer<byte>(bytes); ReadOnlyBuffer<byte> implicitReadOnlyBuffer = buffer; Buffer<byte> implicitBufferArray = bytes; ReadOnlyBuffer<byte> implicitReadOnlyBufferArray = bytes; Assert.True(buffer.Equals(bytes)); Assert.True(readOnlyBuffer.Equals(bytes)); Assert.True(implicitReadOnlyBuffer.Equals(bytes)); Assert.True(implicitBufferArray.Equals(bytes)); Assert.True(implicitReadOnlyBufferArray.Equals(bytes)); Assert.True(readOnlyBuffer.Equals(buffer)); Assert.True(implicitReadOnlyBuffer.Equals(buffer)); Assert.True(implicitBufferArray.Equals(buffer)); Assert.True(implicitReadOnlyBufferArray.Equals(buffer)); Assert.True(buffer.Equals(readOnlyBuffer)); Assert.True(implicitReadOnlyBuffer.Equals(readOnlyBuffer)); Assert.True(implicitBufferArray.Equals(readOnlyBuffer)); Assert.True(implicitReadOnlyBufferArray.Equals(readOnlyBuffer)); Assert.True(buffer.Equals(implicitBufferArray)); Assert.True(readOnlyBuffer.Equals(implicitBufferArray)); Assert.True(implicitReadOnlyBuffer.Equals(implicitBufferArray)); Assert.True(implicitReadOnlyBufferArray.Equals(implicitBufferArray)); Assert.True(buffer.Equals(implicitReadOnlyBuffer)); Assert.True(readOnlyBuffer.Equals(implicitReadOnlyBuffer)); Assert.True(implicitBufferArray.Equals(implicitReadOnlyBuffer)); Assert.True(implicitReadOnlyBufferArray.Equals(implicitReadOnlyBuffer)); Assert.True(buffer.Equals(implicitReadOnlyBufferArray)); Assert.True(readOnlyBuffer.Equals(implicitReadOnlyBufferArray)); Assert.True(implicitReadOnlyBuffer.Equals(implicitReadOnlyBufferArray)); Assert.True(implicitBufferArray.Equals(implicitReadOnlyBufferArray)); } [Theory] [MemberData(nameof(ValidArraySegments))] public void RangedBufferEquivalenceAndImplicitCastsAreEqual(byte[] bytes, int start, int length) { var buffer = new Buffer<byte>(bytes, start, length); var readOnlyBuffer = new ReadOnlyBuffer<byte>(bytes, start, length); ReadOnlyBuffer<byte> implicitReadOnlyBuffer = buffer; Assert.True(readOnlyBuffer.Equals(buffer)); Assert.True(implicitReadOnlyBuffer.Equals(buffer)); Assert.True(buffer.Equals(readOnlyBuffer)); Assert.True(implicitReadOnlyBuffer.Equals(readOnlyBuffer)); Assert.True(buffer.Equals(implicitReadOnlyBuffer)); Assert.True(readOnlyBuffer.Equals(implicitReadOnlyBuffer)); } private static void BuffersReferencingSameMemoryAreEqualInEveryAspect(Buffer<byte> buffer, Buffer<byte> pointingToSameMemory) { Assert.True(buffer.Equals(pointingToSameMemory)); Assert.True(pointingToSameMemory.Equals(buffer)); Assert.True(buffer.SequenceEqual(pointingToSameMemory)); Assert.True(pointingToSameMemory.SequenceEqual(buffer)); Assert.True(buffer.SequenceEqual(pointingToSameMemory)); Assert.True(pointingToSameMemory.SequenceEqual(buffer)); } private static void BuffersReferencingSameMemoryAreEqualInEveryAspect(ref ReadOnlyBuffer<byte> buffer, ref ReadOnlyBuffer<byte> pointingToSameMemory) { Assert.True(buffer.Equals(pointingToSameMemory)); Assert.True(pointingToSameMemory.Equals(buffer)); Assert.True(buffer.SequenceEqual(pointingToSameMemory)); Assert.True(pointingToSameMemory.SequenceEqual(buffer)); Assert.True(buffer.SequenceEqual(pointingToSameMemory)); Assert.True(pointingToSameMemory.SequenceEqual(buffer)); } [Fact] public void EmptyBuffersAreSequentiallyAndStructurallyEqual() { var emptyBuffer = new Buffer<int>(Array.Empty<int>()); var otherEmptyBuffer = new Buffer<int>(Array.Empty<int>()); Assert.True(emptyBuffer.SequenceEqual(otherEmptyBuffer)); Assert.True(otherEmptyBuffer.SequenceEqual(emptyBuffer)); var bufferFromNonEmptyArrayButWithZeroLength = new Buffer<int>(new int[1] { 123 }).Slice(0, 0); Assert.True(emptyBuffer.SequenceEqual(bufferFromNonEmptyArrayButWithZeroLength)); Assert.True(bufferFromNonEmptyArrayButWithZeroLength.SequenceEqual(emptyBuffer)); } [Theory] [MemberData(nameof(ValidArraySegments))] public void BuffersOfEqualValuesInSameOrderAreSequentiallyAndStructurallyEqual(byte[] bytes, int start, int length) { var bytesCopy = bytes.ToArray(); var buffer = new Buffer<byte>(bytes, start, length); var ofSameValues = new Buffer<byte>(bytesCopy, start, length); Assert.True(buffer.SequenceEqual(ofSameValues)); Assert.True(ofSameValues.SequenceEqual(buffer)); Assert.True(buffer.SequenceEqual(ofSameValues)); Assert.True(ofSameValues.SequenceEqual(buffer)); Assert.False(buffer.Equals(ofSameValues)); Assert.False(ofSameValues.Equals(buffer)); } [Theory] [MemberData(nameof(ValidArraySegments))] public void ReadOnlyBuffersOfEqualValuesInSameOrderAreSequentiallyAndStructurallyEqual(byte[] bytes, int start, int length) { var bytesCopy = bytes.ToArray(); var buffer = new ReadOnlyBuffer<byte>(bytes, start, length); var ofSameValues = new ReadOnlyBuffer<byte>(bytesCopy, start, length); Assert.True(buffer.SequenceEqual(ofSameValues)); Assert.True(ofSameValues.SequenceEqual(buffer)); Assert.True(buffer.SequenceEqual(ofSameValues)); Assert.True(ofSameValues.SequenceEqual(buffer)); Assert.False(buffer.Equals(ofSameValues)); Assert.False(ofSameValues.Equals(buffer)); } [Theory] [MemberData(nameof(ValidArraySegments))] public void BuffersOfDifferentValuesAreNotEqual(byte[] bytes, int start, int length) { var differentBytes = bytes.Select(value => ++value).ToArray(); var buffer = new Buffer<byte>(bytes, start, length); var ofDifferentValues = new Buffer<byte>(differentBytes, start, length); Assert.False(buffer.SequenceEqual(ofDifferentValues)); Assert.False(ofDifferentValues.SequenceEqual(buffer)); Assert.False(buffer.SequenceEqual(ofDifferentValues)); Assert.False(ofDifferentValues.SequenceEqual(buffer)); Assert.False(buffer.Equals(ofDifferentValues)); Assert.False(ofDifferentValues.Equals(buffer)); } [Theory] [MemberData(nameof(ValidArraySegments))] public void ReadOnlyBuffersOfDifferentValuesAreNotEqual(byte[] bytes, int start, int length) { var differentBytes = bytes.Select(value => ++value).ToArray(); var buffer = new ReadOnlyBuffer<byte>(bytes, start, length); var ofDifferentValues = new ReadOnlyBuffer<byte>(differentBytes, start, length); Assert.False(buffer.SequenceEqual(ofDifferentValues)); Assert.False(ofDifferentValues.SequenceEqual(buffer)); Assert.False(buffer.SequenceEqual(ofDifferentValues)); Assert.False(ofDifferentValues.SequenceEqual(buffer)); Assert.False(buffer.Equals(ofDifferentValues)); Assert.False(ofDifferentValues.Equals(buffer)); } [Fact] public void SequentialEqualityOfBuffersOfFloatingPointTypesDoesNotUseBitwiseComparison() { SequentialEqualityOfBuffersOfFloatingPointTypesDoesNotUseBitwiseComparison( double.NegativeInfinity, double.PositiveInfinity, -0.0, +0.0, double.NaN); SequentialEqualityOfBuffersOfFloatingPointTypesDoesNotUseBitwiseComparison( float.NegativeInfinity, float.PositiveInfinity, -0.0, +0.0, float.NaN); } private static void SequentialEqualityOfBuffersOfFloatingPointTypesDoesNotUseBitwiseComparison<T>( T negativeInfinity, T positiveInfinity, //.Equals => false T negativeZero, T positiveZero, //.Equals => TRUE T NaN) //.Equals => True where T : struct, IEquatable<T> { const int elementsCountThatNormallyWouldInvolveMemCmp = 1000; var negativeInfinities = new Buffer<T>(Enumerable.Repeat(negativeInfinity, elementsCountThatNormallyWouldInvolveMemCmp).ToArray()); var positiveInfinities = new Buffer<T>(Enumerable.Repeat(positiveInfinity, elementsCountThatNormallyWouldInvolveMemCmp).ToArray()); Assert.Equal(positiveInfinity.Equals(negativeInfinity), positiveInfinities.SequenceEqual(negativeInfinities)); Assert.False(negativeInfinities.SequenceEqual(positiveInfinities)); var negativeZeroes = new Buffer<T>(Enumerable.Repeat(negativeZero, elementsCountThatNormallyWouldInvolveMemCmp).ToArray()); var positiveZeroes = new Buffer<T>(Enumerable.Repeat(positiveZero, elementsCountThatNormallyWouldInvolveMemCmp).ToArray()); Assert.Equal(negativeZero.Equals(positiveZero), negativeZeroes.SequenceEqual(positiveZeroes)); Assert.False(positiveInfinities.SequenceEqual(negativeInfinities)); var nans = new Buffer<T>(Enumerable.Repeat(NaN, elementsCountThatNormallyWouldInvolveMemCmp).ToArray()); Assert.Equal(NaN.Equals(NaN), nans.SequenceEqual(nans)); Assert.True(nans.SequenceEqual(nans)); } [Theory] [InlineData(1)] [InlineData(7)] [InlineData(537)] // odd bytes count [InlineData(1024)] [InlineData(20 * 100)] public void AllBytesAreTakenUnderConsideration(int bytesCount) { var buffer = new Buffer<byte>(Enumerable.Range(0, bytesCount).Select(index => (byte)index).ToArray()); var slice = buffer.Span; var copy = new Buffer<byte>(slice.ToArray()).Span; for (int i = 0; i < bytesCount; i++) { Assert.True(slice.SequenceEqual(copy)); // it is equal var valueCopy = slice[i]; slice[i] = (byte)(valueCopy + 1); // lets just change single value Assert.False(slice.SequenceEqual(copy)); // it is not equal anymore slice[i] = valueCopy; } } public static IEnumerable<object[]> ValidArraySegments { get { return new List<object[]> { new object[] { new byte[1] { 0 }, 0, 1}, new object[] { new byte[2] { 0, 0 }, 0, 2}, new object[] { new byte[2] { 0, 0 }, 0, 1}, new object[] { new byte[2] { 0, 0 }, 1, 1}, new object[] { new byte[3] { 0, 0, 0 }, 0, 3}, new object[] { new byte[3] { 0, 0, 0 }, 0, 2}, new object[] { new byte[3] { 0, 0, 0 }, 1, 2}, new object[] { new byte[3] { 0, 0, 0 }, 1, 1}, new object[] { Enumerable.Range(0, 100000).Select(i => (byte)i).ToArray(), 0, 100000 } }; } } public static IEnumerable<object[]> FullArraySegments { get { return new List<object[]> { new object[] { new byte[1] { 0 } }, new object[] { new byte[2] { 0, 0 } }, new object[] { new byte[3] { 0, 0, 0 } }, new object[] { Enumerable.Range(0, 100000).Select(i => (byte)i).ToArray() } }; } } } }
using System; using UnityEngine; using UnityEngine.SceneManagement; public class BreakoutGameManager : MonoBehaviour { // UI [Header("UI")] public GameObject titleCanvas; public GameObject victoryCanvas; public GameObject gameOverCanvas; // Game objects [Header("Game objects")] public PlayerController playerController; public BallController ballController; public BrickWallController brickWallController; [Header("Game parameters")] public int lives; private int currentLives; private bool isGameRunning; void Start() { SetupTitleScreen(); currentLives = lives; isGameRunning = false; } void Update() { if (Input.GetKeyDown(KeyCode.Return)) { if (!isGameRunning) { titleCanvas.SetActive(false); isGameRunning = true; playerController.isGameRunning = true; ballController.isGameRunning = true; } else { SceneManager.LoadScene(0); } } // Detect if ball passed the bottom of the screen if (ballController.transform.position.y < ballController.bottomScreenLimit) { ballController.ResetBallPosition(); currentLives -= 1; } // Defeat condition if(currentLives == 0) { playerController.isGameRunning = false; ballController.isGameRunning = false; SetupGameOverScreen(); } // Victory condition if(ballController.destroyedBricks == brickWallController.brickCount) { playerController.isGameRunning = false; ballController.isGameRunning = false; SetupVictoryScreen(); } } private void SetupVictoryScreen() { titleCanvas.SetActive(false); victoryCanvas.SetActive(true); gameOverCanvas.SetActive(false); } private void SetupTitleScreen() { titleCanvas.SetActive(true); victoryCanvas.SetActive(false); gameOverCanvas.SetActive(false); } private void SetupGameOverScreen() { titleCanvas.SetActive(false); victoryCanvas.SetActive(false); gameOverCanvas.SetActive(true); } }
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; namespace cstrike2d { class Camera2D { public Matrix Transform { get; private set; } public Vector2 Position; public Camera2D() { Position = Vector2.Zero; } public Matrix GetTransform(GraphicsDevice graphics) { Transform = Matrix.CreateTranslation(new Vector3(-Position.X, -Position.Y, 0))* Matrix.CreateRotationX(0)* Matrix.CreateScale(new Vector3(1, 1, 0))* Matrix.CreateTranslation(new Vector3(graphics.Viewport.Width*0.5f, graphics.Viewport.Height*0.5f, 0)); return Transform; } public int Row() { return (int) (Position.Y/64); } public int Col() { return (int) (Position.X/64); } } }
using System; namespace UsingOut { class MainApp { static void Divide(int a, int b, out int quotient, // int a와 b, quotient, remainder를 지역적으로 선언하면서 목과 나머지를 구하는 나눗셈 메소드를 구현 out int remainder) // out 형식은 출력전용 변수라는 표시, 원래 메소드에 들어가면 값을 끌고 들어가는게 아니지만, out이 붙으면 메인함수의 변수를 끌고 들어가서 메인함수의 변수값 자체를 바꿔준다. { quotient = a / b; // 몫 remainder = a % b; // 나머지 } static void Main(string[] args) //메인 함수 돌기 시작 { int a = 20; // 메인 함수에서 int a를 선언하고, int a의 값에 20을 삽입 int b = 3; // int b의 값에 3을 삽입 int c; // int c와 d를 선언 int d; Divide(a, b, out c, out d); // Divide메소드를 사용해 (a와 b를 집어넣고 out명령을 이용해 c에 quotient값을, d에 remainder를 집어넣는다. Console.WriteLine("a:{0}, b:{1}:, a/b:{2}, a%b:{3}", a, b, c, d); // 결과값 출력. } } }
using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Windows; using System.Windows.Controls; using System.Windows.Threading; using ThinNeo; namespace NeoSpider { /// <summary> /// MainWindow.xaml 的交互逻辑 /// </summary> public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); } List<Transaction> txList = new List<Transaction>(); List<Transaction> txShow = new List<Transaction>(); private void Button_Click(object sender, RoutedEventArgs e) { Button btn = sender as Button; btn.IsEnabled = false; var address = AddressTextBox.Text; var startTime = StartTimeDatePicker.SelectedDate; try { Helper_NEO.GetScriptHash_FromAddress(address); } catch (Exception) { MessageBox.Show("Address Error"); return; } finally { btn.IsEnabled = true; } StateTextBlock.Text = $"Starting…"; DoEvents(); var totalEntries = 0; using (var web = new WebClient()) { var json = web.DownloadJson(address, 1); var totalPages = (int)json["total_pages"]; totalEntries = (int)json["total_entries"]; var pageSize = (int)json["page_size"]; txList.Clear(); var stop = false; for (int i = 1; i <= totalPages; i++) { json = web.DownloadJson(address, i); foreach (var item in json["entries"]) { var tx = Transaction.FromJson(item); if (tx != null) { if (startTime != null && tx.Time < startTime) { stop = true; break; } txList.Add(tx); } } if (stop) break; if(startTime == null) StateTextBlock.Text = $"{Math.Min(i * pageSize, totalEntries)}/{totalEntries}"; else StateTextBlock.Text = $"{Math.Min(i * pageSize, totalEntries)}"; DoEvents(); } } StateTextBlock.Text = $"Calculating…"; DoEvents(); ProcessData(); StateTextBlock.Text = $"Completed."; btn.IsEnabled = true; } public void DoEvents() { var frame = new DispatcherFrame(); Dispatcher.CurrentDispatcher.BeginInvoke(DispatcherPriority.Background, new DispatcherOperationCallback(ExitFrames), frame); try { Dispatcher.PushFrame(frame); } catch (InvalidOperationException) { } } private object ExitFrames(object frame) { ((DispatcherFrame)frame).Continue = false; return null; } private void AssetComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { ProcessData(); } private void ProcessData() { if (txList.Count == 0) return; var networkFees = new List<Transaction>(); txList.ForEach(p => networkFees.Add(p)); txList.RemoveAll(p => p.AddressFrom == "network_fees"); networkFees = networkFees.Where(p => p.AddressFrom == "network_fees").GroupBy(p => p.Time.Year + p.Time.Month) .Select(g => new Transaction { TxId = "", Time = new DateTime(g.First().Time.Year, g.First().Time.Month, 1), Asset = g.First().Asset, Amount = g.Sum(p => p.Amount), AddressFrom = g.First().AddressFrom, AddressTo = g.First().AddressTo }).ToList(); txList = txList.Concat(networkFees).ToList(); var asset = (AssetComboBox.SelectedItem as ComboBoxItem).Content.ToString(); if (asset != "All") txShow = txList.Where(p => p.Asset == asset).ToList(); else txShow = txList; TxDataGrid.ItemsSource = txShow; } private void Window_Closed(object sender, EventArgs e) { Environment.Exit(0); } } }
using System; using System.Collections.Generic; using System.Linq.Expressions; using System.Threading.Tasks; namespace OnboardingSIGDB1.Domain.Interfaces { public interface IRepository<T> where T : class { Task<IEnumerable<T>> Get(); Task<IEnumerable<T>> Get(Predicate<T> predicate); Task Add(T entity); Task Delete(long id); Task Update(T entity); } }
using Backend.Model; using FeedbackAndSurveyService.CustomException; using FeedbackAndSurveyService.SurveyService.Model; using System; using System.Collections.Generic; using System.Linq; namespace FeedbackAndSurveyService.SurveyService.Repository { public class MedicalStaffSurveyResponseGeneratorRepository : IMedicalStaffSurveyResponseGeneratorRepository { private readonly MyDbContext _context; public MedicalStaffSurveyResponseGeneratorRepository(MyDbContext context) { _context = context; } public SurveyReportGenerator Get() { try { List<SurveyReportGeneratorItem> items = new List<SurveyReportGeneratorItem>(); if (_context.SurveysAboutMedicalStaff.Count() == 0) throw new NotFoundException("No information available."); var behavoir = _context.SurveysAboutMedicalStaff.Select(s => new Grade(s.BehaviorOfMedicalStaff)); items.Add(new SurveyReportGeneratorItem("Behavior", behavoir)); var professionalism = _context.SurveysAboutMedicalStaff.Select(s => new Grade(s.MedicalStaffProfessionalism)); items.Add(new SurveyReportGeneratorItem("Professionalism", professionalism)); var advice = _context.SurveysAboutMedicalStaff.Select(s => new Grade(s.GettingAdviceByMedicalStaff)); items.Add(new SurveyReportGeneratorItem("Getting advice or help when " + "needed from medical staff", advice)); var followup = _context.SurveysAboutMedicalStaff.Select(s => new Grade(s.EaseInObtainingFollowUpInformation)); items.Add(new SurveyReportGeneratorItem("Ease in obtaining follow " + "up information and care", followup)); return new SurveyReportGenerator(items); } catch (FeedbackAndSurveyServiceException) { throw; } catch (Exception e) { throw new DataStorageException(e.Message); } } } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; using NUnit.Framework; namespace SomeTask.Test { [TestFixture] public class BootstrapTest { [SetUp] public void SetUp() { Bootstrap.Init(); } [Test] public void GetTaskManager_Is_Instanciated() { // Arrange // Act var actual = Bootstrap.GetTaskManager(); // Assert Assert.IsInstanceOf<ITaskManager>(actual); } [Test] public void GetTaskManager_Tasks_Is_Instanciated() { // Arrange // Act var actual = Bootstrap.GetTaskManager(); // Assert Assert.IsNotNull(actual.Tasks); } } }
using UnityEngine; using System.Collections; public class ThrobForEffect : MonoBehaviour { bool throbbing; float startThrobTime; public float throbPeriod = 0.3f; public float throbScale = 1f; public Transform thingToScale; private Vector3 originalScale; // Use this for initialization void Start () { throbbing = false; originalScale = thingToScale.localScale; } public void SetThrobbing(bool throbbing) { if (this.throbbing == throbbing) { return; } if (throbbing) { this.throbbing = true; startThrobTime = Time.time; } else { this.throbbing = false; thingToScale.localScale = originalScale; } } // Update is called once per frame void Update () { if (!throbbing) { return; } float timeNow = Time.time; float timeDelta = timeNow - startThrobTime; float phase = Mathf.Sin (timeDelta * Mathf.PI / throbPeriod); if ( phase < 0.0f) { phase = 0.0f; } float scale = 1.0f + phase * throbScale; thingToScale.localScale = new Vector3 (scale * originalScale.x, scale * originalScale.y, scale * originalScale.z); } }
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using Saato.DAL; using Saato.Repository; namespace Saato.Controllers { public class HomeController : Controller { public ActionResult Index() { return View(); } public ActionResult About() { ViewBag.Message = "Your application description page."; return View(); } public ActionResult Contact() { ViewBag.Message = "Your contact page."; return View(); } private readonly CarRepository carRepo = new CarRepository(); public ActionResult Car(int id) { return View(carRepo.GetCarById(id)); } public ActionResult CreateCar() { //UserProfile up = udao.GetUserById(WebSecurity.CurrentUserId); //var model = new CreateCarViewModel(); //var val = Enum.GetValues(typeof(Sprockets)); //SelectList test = new SelectList(val); var model = new SomethingViewModel(); List<Maker> makersList = carRepo.GetAllMakers(); ViewBag.Makers = new SelectList(makersList.AsEnumerable<Maker>(), "Id", "Name"); // Redo GetAllModels List<Model> modelsList = carRepo.GetAllModelsForMaker(1); ViewBag.Models = new SelectList(modelsList.AsEnumerable<Model>(), "Id", "Name"); var geartypesList = Enum.GetValues(typeof(Geartypes)); var geartypes = new SelectList(geartypesList); ViewBag.GearTypes = geartypes; var test = new SelectListItem { Text = "Vælg", Selected = true, Value = "" }; //model.car.MakerId = 0; //model.car.ModelId = 0; return View(model); } [HttpPost] public ActionResult CreateCar(SomethingViewModel model) { if (ModelState.IsValid) { Car car = new Car(); //= WebSecurity.CurrentUserId; car.CreatedDate = DateTime.Now; car.UserId = WebSecurity.CurrentUserId; try { carRepo.Add(car); } catch { ModelState.AddModelError("", "Noget gik galt!"); List<Maker> makersList = carRepo.GetAllMakers(); ViewBag.Makers = new SelectList(makersList.AsEnumerable<Maker>(), "Id", "Name"); // Redo GetAllModels List<Model> modelsList = carRepo.GetAllModelsForMaker(1); ViewBag.Models = new SelectList(modelsList.AsEnumerable<Model>(), "Id", "Name"); return View(model); } return RedirectToAction("Index"); } else { List<Maker> makers = carRepo.GetAllMakers(); ViewBag.Makers = new SelectList(makers.AsEnumerable<Maker>(), "Id", "Name"); // Redo GetAllModels List<Model> models = carRepo.GetAllModelsForMaker(1); ViewBag.Models = new SelectList(models.AsEnumerable<Model>(), "Id", "Name"); var geartypesList = Enum.GetValues(typeof(Geartypes)); var geartypes = new SelectList(geartypesList); ViewBag.GearTypes = geartypes; return View(model); } } [HttpPost] public ActionResult GetModelsByMakerId(int makerId) { try { List<Model> models = carRepo.GetAllModelsForMaker(makerId); return Json(models); } catch (Exception e) { return Json("Unable to retrieve models"); } } public ActionResult Cars() { var model = carRepo.GetAllCars(); //Establish userId //var userId = WebSecurity.CurrentUserId; model = carRepo.GetAllCars(); return View(model); } public ActionResult CarsFiltered(string querystring) { var model = new List<Car>(); //model = carRepo.GetCarsFiltered(querystring); return View(model); } public ActionResult AdvancedSearch() { AdvancedSearchViewModel model = new AdvancedSearchViewModel(); List<Maker> makersList = carRepo.GetAllMakers(); model.makers = new SelectList(makersList, "Id", "Name"); // Redo GetAllModels List<Model> modelsList = carRepo.GetAllModelsForMaker(1); model.models = new SelectList(modelsList, "Id", "Name"); return View(model); } [HttpPost] public ActionResult AdvancedSearch(AdvancedSearchViewModel model) { // TODO: Get FilteredCarsModel list var filteredCars = carRepo.GetCarsFiltered(model); return RedirectToAction("Cars", filteredCars); } public ActionResult Design() { return View(); } public object Makers { get; set; } private string CreateSearchQuery(Car model) { string query = String.Empty; Car car = new Car(); // int i = 0; // foreach(Object o in model) // { // if(o{i}) //i++; // } //if(model.AbsBrakes != car.AbsBrakes) //{ // query += CreateSubQuery(model.AbsBrakes.CompareTo, //} return query; } } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Welic.Dominio.Models.Menu.Enums; using Welic.Dominio.Models.Menu.Mapeamentos; using Welic.Dominio.Patterns.Pattern.Ef6; namespace Welic.Dominio.Models.Menu.Dtos { public class MenuDto : Entity { public int Id { get; set; } public string Title { get; set; } public string IconMenu { get; set; } public string Descricao => $"{Nivel}-{Title}"; public int? MenuDadId { get; set; } public string Action { get; set; } public string Controller { get; set; } //public int? GroupAcess { get; set; } public static Func<MenuMap, MenuDto> Map() { return m => new MenuDto { Id = m.Id, MenuDadId = m.DadId, Title = m.Title, Action = m.Action, Controller = m.Controller, IconMenu = m.IconMenu, Nivel = m.Nivel }; } public static Func<Entidades.Menu, MenuDto> MapEntity() { return m => new MenuDto { Id = m.Id, MenuDadId = m.MenuDadId, Title = m.Title, Action = m.Action, Controller = m.Controller, IconMenu = m.IconMenu, Nivel = m.Nivel }; } public string Nivel { get; set; } } }
using Abp.Application.Services.Dto; using Abp.AutoMapper; namespace HRIS.Setup.PublicHolidayDetails.Dto { [AutoMap(typeof(Entities.Setup.PublicHolidayDetails))] public class PublicHolidayDetailsDto : EntityDto { public int PublicHolidayId{ get; set; } public DateTime? StartDate{ get; set; } public DateTime? EndDate{ get; set; } public bool? IsLunarDependent{ get; set; } public int? NoOfDaysForLunarAdjustment{ get; set; } public bool? IsActive{ get; set; } public bool? IsDefault{ get; set; } public PublicHolidayDetailsDto () { IsActive = false; IsDefault = false; } } }
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace APIWeb.Models { public class hardware { public long Id { get; set; } public string HardwareName { get; set; } } }
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using Nemiro.OAuth; using Nemiro.OAuth.LoginForms; using System.IO; using ExactOnline.Client.Models; using ExactOnline.Client.Sdk; using ExactOnline.Client.Sdk.Controllers; using DotNetOpenAuth.OAuth2; namespace DropBox { public partial class Form1 : Form { private string CurrentPath = "/"; public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { if (String.IsNullOrEmpty(Properties.Settings.Default.AccessToken1)) { this.GetAccessToken(); } } private void GetAccessToken() { var login = new DropboxLogin("k10o7ajlmmtp8qj","3g69wza3v700xw0"); login.Owner = this; login.ShowDialog(); if (login.IsSuccessfully) { Properties.Settings.Default.AccessToken1 = login.AccessToken.Value; Properties.Settings.Default.Save(); } else { MessageBox.Show("error.."); } } private void GetFiles() { OAuthUtility.GetAsync ( "https://api.dropbox.com/1/metadata/auto/", new HttpParameterCollection { {"path",Path.Combine(this.CurrentPath, Path.GetFileName(ofd.FileName)).Replace("\\", "/")}, {"access_token",Properties.Settings.Default.AccessToken1 } }, callback: GetFiles_Result ); } private void GetFiles_Result(RequestResult result) { if (this.InvokeRequired) { this.Invoke(new Action<RequestResult>(GetFiles_Result), result); return; } if (result.StatusCode == 200) { } else { MessageBox.Show("Error.."); } } private void button1_Click(object sender, EventArgs e) { OAuthUtility.PutAsync ( "https://content.dropboxapi.com/1/files_put/auto/", new HttpParameterCollection { {"access_token",Properties.Settings.Default.AccessToken1}, {"path",Path.Combine(this.CurrentPath,Path.GetFileName(ofd.FileName)).Replace("\\","/")}, {"overwrite", "true"}, {"autorename","true"}, {ofd.OpenFile()} }, callback: Upload_Result ); } private static Guid GetCategoryId(ExactOnlineClient client) { var categories = client.For<DocumentCategory>().Select("ID").Where("Description+eq+'General'").Get(); var category = categories.First().ID; return category; } private void Upload_Result(RequestResult result) { if (this.InvokeRequired) { this.Invoke(new Action<RequestResult>(Upload_Result),result); return; } if (result.StatusCode == 200) { string line; string filePath = ofd.FileName; string body = ""; if (File.Exists(filePath)) { // Read the file and display it line by line. StreamReader file = new StreamReader(filePath); while ((line = file.ReadLine()) != null) { body = line; } file.Close(); } this.GetFiles(); const string clientId = "42942aa2-aa89-4d72-9a21-21bad8f8a29c"; const string clientSecret = "z0UR3MWZ43wp"; // This can be any url as long as it is identical to the callback url you specified for your app in the App Center. var callbackUrl = new Uri("https://YOUR_AUTH0_DOMAIN/login/callback"); var connector = new Connector(clientId, clientSecret, callbackUrl); var client = new ExactOnlineClient(connector.EndPoint, connector.GetAccessToken); string subject = Path.Combine(this.CurrentPath, Path.GetFileName(ofd.FileName)).Replace("/", ""); Document document = new Document { Subject = subject, //StreamReader reader = new StreamReader(stream, Encoding.UTF8) Body = body, Category = GetCategoryId(client),/*Guid.Parse("3b6d3833-b31b-423d-bc3c-39c62b8f2b12")*/ Type = 55, //Miscellaneous DocumentDate = DateTime.Now.Date, }; bool created = client.For<Document>().Insert(ref document); Application.Exit(); } else { if (result["error"].HasValue) { MessageBox.Show(result["error"].ToString()); } else { MessageBox.Show(result.ToString()); } } } OpenFileDialog ofd = new OpenFileDialog(); private void button2_Click(object sender, EventArgs e) { if (ofd.ShowDialog() == DialogResult.OK) { textBox1.Text = ofd.FileName; } } } }
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Amazon.Lambda.Core; using Amazon.DynamoDBv2.DocumentModel; using Newtonsoft.Json; using Amazon.DynamoDBv2.Model; using Amazon.DynamoDBv2; using Amazon.Lambda.DynamoDBEvents; // Assembly attribute to enable the Lambda function's JSON input to be converted into a .NET class. [assembly: LambdaSerializer(typeof(Amazon.Lambda.Serialization.Json.JsonSerializer))] namespace Assignment7 { public class Item { public string itemId; public string description; public int rating; public string type; public string company; public string lastInstanceOfWord; } public class Rating { public string type; public int count = 0; public double average = 0; } public class Function { private static AmazonDynamoDBClient client = new AmazonDynamoDBClient(); /// <summary> /// A simple function that takes a string and does a ToUpper /// </summary> /// <param name="input"></param> /// <param name="context"></param> /// <returns></returns> public async Task<List<Item>> FunctionHandler(DynamoDBEvent input, ILambdaContext context) { Table table = Table.LoadTable(client, "items"); List<Item> ratings = new List<Item>(); List<DynamoDBEvent.DynamodbStreamRecord> records = (List<DynamoDBEvent.DynamodbStreamRecord>)input.Records; if(records.Count > 0) { DynamoDBEvent.DynamodbStreamRecord record = records[0]; if (record.EventName.Equals("INSERT")) { Document myDoc = Document.FromAttributeMap(record.Dynamodb.NewImage); Item myBook = JsonConvert.DeserializeObject<Item>(myDoc.ToJson()); GetItemResponse res = await client.GetItemAsync("RatingsByType", new Dictionary<string, AttributeValue> { {"type", new AttributeValue { S = myBook.type} } } ); Document getDoc = Document.FromAttributeMap(res.Item); Rating myItem = JsonConvert.DeserializeObject<Rating>(getDoc.ToJson()); double average = myBook.rating; if (myItem.count.Equals("0")) { if(myBook.company.ToUpper() == "B") { average = myBook.rating / 2; } else { average = myBook.rating; } } else { if (myBook.company.ToUpper() == "B") { myBook.rating = myBook.rating / 2; average = ((myItem.count * myItem.average) + myBook.rating) / (myItem.count + 1); } else { average = ((myItem.count * myItem.average) + myBook.rating) / (myItem.count + 1); } } //double average = 10; var request = new UpdateItemRequest { TableName = "RatingsByType", Key = new Dictionary<string, AttributeValue> { { "type", new AttributeValue { S = myBook.type } } }, AttributeUpdates = new Dictionary<string, AttributeValueUpdate>() { { "count", new AttributeValueUpdate { Action = "ADD", Value = new AttributeValue { N = "1" } } }, { "average", new AttributeValueUpdate { Action = "PUT", Value = new AttributeValue { N = average.ToString("0.#") } } } } }; await client.UpdateItemAsync(request); } } return ratings; }/** "itemId": { "S": "101" }, "description": { "S": "101" }, "rating": { "N": "10" }, "type": { "S": "finalTest" }, "company": { "S": "B" }, "lastInstanceOfWord": { "S": "yes" },*/ } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace PADIbookCommonLib { [Serializable] public class SignedQueryByFile : SignedMessage { public QueryByFile Query { get; set; } public SignedQueryByFile(QueryByFile query, byte[] signature) : base(signature) { Query = query; } } }
using PizzaBezorgApp.Models; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.InteropServices.WindowsRuntime; using Windows.Foundation; using Windows.Foundation.Collections; using Windows.UI.Core; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Controls.Primitives; using Windows.UI.Xaml.Data; using Windows.UI.Xaml.Input; using Windows.UI.Xaml.Media; using Windows.UI.Xaml.Navigation; // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238 namespace PizzaBezorgApp.Views { /// <summary> /// An empty page that can be used on its own or navigated to within a Frame. /// </summary> public sealed partial class PizzaPopup : Page { public PizzaPopup() { this.InitializeComponent(); Naam.Text = "Naam: "+AppGlobal.Instance._CurrentSession.CurrentBestelling.besteller; Soort.Text = "Soort: "+AppGlobal.Instance._CurrentSession.CurrentBestelling.soort; Aantal.Text = "Aantal: "+AppGlobal.Instance._CurrentSession.CurrentBestelling.aantal.ToString(); Adres.Text = "Adres: "+AppGlobal.Instance._CurrentSession.CurrentBestelling.adres; } protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = AppViewBackButtonVisibility.Visible; } } }
using System; using System.Threading; using System.Threading.Tasks; using CronScheduler.Extensions.StartupInitializer; using Microsoft.Extensions.Logging; namespace CronSchedulerApp.Jobs.Startup { public class TestStartupJob : IStartupJob { private readonly ILogger<TestStartupJob> _logger; public TestStartupJob(ILogger<TestStartupJob> logger) { _logger = logger; } public async Task ExecuteAsync(CancellationToken cancellationToken = default) { _logger.LogInformation("{job} started", nameof(TestStartupJob)); await Task.Delay(TimeSpan.FromSeconds(3)); _logger.LogInformation("{job} ended", nameof(TestStartupJob)); } } }
using CommandLine; namespace Common { public class Options { [Option('c', "connection", Required = true)] public string ConnectionString { get; set; } [Option('d', "database", Required = true)] public string Database { get; set; } } }
using System; using System.Collections.Generic; using System.Linq; using System.Security.Claims; using System.Threading.Tasks; using Mapster; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Configuration; using Newtonsoft.Json; using Parcha.Data; using Parcha.Data.Models; using Parcha.ViewModels; namespace Parcha.Controllers { [ApiController] public class QuizController : BaseApiController { #region Private Fields #endregion #region Constructor public QuizController( ApplicationDbContext context, RoleManager<IdentityRole> roleManager, UserManager<ApplicationUser> userManager, IConfiguration configuration ) : base(context,roleManager,userManager,configuration) { } #endregion Constructor [HttpGet("{id}")] public IActionResult Get(int id) { var quiz = DbContext.Quizzes.Where(i => i.Id == id).FirstOrDefault(); // handle requests asking for non-existing quizzes if (quiz == null) { return NotFound(new { Error = String.Format("Quiz ID {0} has not been found", id) }); } return new JsonResult( quiz, JsonSettings); } [HttpPut] [Authorize] public IActionResult Put([FromBody] QuizViewModel model) { if (model == null) return new StatusCodeResult(500); var quiz = new Quiz(); quiz.Title = model.Title; quiz.Description = model.Description; quiz.Text = model.Text; quiz.Notes = model.Notes; quiz.CreatedDate = DateTime.Now; quiz.LastModifiedDate = quiz.CreatedDate; quiz.UserId = User.FindFirst(ClaimTypes.NameIdentifier).Value; DbContext.Quizzes.Add(quiz); DbContext.SaveChanges(); //return new JsonResult(quiz.Adapt<QuizViewModel>(), return new JsonResult(quiz, JsonSettings); } [HttpPost] [Authorize] public IActionResult Post(QuizViewModel model) { if (model == null) return new StatusCodeResult(500); var quiz = DbContext.Quizzes.Where(q => q.Id == model.Id).FirstOrDefault(); if (quiz == null) { return NotFound(new { Error = String.Format("Quiz ID {0} has not been found", model.Id) }); } quiz.Title = model.Title; quiz.Description = model.Description; quiz.Text = model.Text; quiz.Notes = model.Notes; quiz.LastModifiedDate = quiz.CreatedDate; DbContext.SaveChanges(); return new JsonResult(quiz.Adapt<QuizViewModel>(), JsonSettings); } [HttpDelete("{id}")] [Authorize] public IActionResult Delete(int id) { var quiz = DbContext.Quizzes.Where(i => i.Id == id) .FirstOrDefault(); if (quiz == null) { return NotFound(new { Error = String.Format("Quiz ID {0} has not been found", id) }); } DbContext.Quizzes.Remove(quiz); DbContext.SaveChanges(); return new OkResult(); } [HttpGet("Latest/{num:int?}")] public IActionResult Latest(int num = 10) { var latest = DbContext.Quizzes .OrderByDescending(q => q.CreatedDate) .Take(num) .ToArray(); //var j = latest.Adapt<QuizViewModel[]>(); return new JsonResult( latest, JsonSettings); } [HttpGet("ByTitle/{num:int?}")] public IActionResult ByTitle(int num = 10) { var byTitle = DbContext.Quizzes .OrderBy(q => q.Title) .Take(num) .ToArray(); //var j = byTitle.Adapt<QuizViewModel[]>(); return new JsonResult( byTitle, JsonSettings); } [HttpGet("Random/{num:int?}")] public IActionResult Random(int num = 10) { var random = DbContext.Quizzes .OrderBy(q => Guid.NewGuid()) .Take(num) .ToArray(); return new JsonResult( random, JsonSettings); } [HttpGet("Search")] public IActionResult Search(string text) { var random = DbContext.Quizzes.Where(x => x.Title.Contains(text)) .OrderBy(q => Guid.NewGuid()) .ToArray(); return new JsonResult( random, JsonSettings); } } }