Exemplo n.º 1
0
        public MainWindow()
        {
            InitializeComponent();
            using ( Model.dbEntities ctx = new Model.dbEntities())
            {
                var dbS = new SchemaDb();
                dbS.Ctx = ctx;

                //First Table
                dbS.AddTable("PrinterMachines");
                dbS.AddColumnToTable("PrinterMachines", "IdPrinterMachine", SchemaDb.IntPK, "10");
                dbS.AddColumnToTable("PrinterMachines", "PrinterName", SchemaDb.String, "100");
                
                //Index
                dbS.AddIndex("PrinterMachines", "PrinterName");
                dbS.AddColumnToTable("PrinterMachines", "PrinterName", SchemaDb.String, "100");
                dbS.AddColumnToTable("PrinterMachines", "Percent", SchemaDb.Double, "0");

                //Second Table
                dbS.AddTable("SecondTable");
                dbS.AddColumnToTable("SecondTable", "IdSecondTable", SchemaDb.IntPK, "0");

                //Unsigned Int to implement Foreign Key
                dbS.AddColumnToTable("SecondTable", "IdPrinterMachine", SchemaDb.IntUS, "0");
                dbS.AddForeignKey("SecondTable", "IdPrinterMachine", "PrinterMachines", "IdPrinterMachine");

                //Change String length
                dbS.ChangeStringColumnLegth("PrinterMachines", "PrinterName", "160");

            }
        }
Exemplo n.º 2
0
 public ProductsDDL(string dbName)
 {
     dbS = new SchemaDb();
     dbS.DatabaseName = dbName;
 }
Exemplo n.º 3
0
 public CustomerSupplierDLL(string dbName)
 {
     dbS = new SchemaDb();
     dbS.DatabaseName = dbName;
 }
Exemplo n.º 4
0
 public DocumentsDDL(string dbName)
 {
     dbS = new SchemaDb();
     dbS.DatabaseName = dbName;
 }
Exemplo n.º 5
0
 public TaskExecutorsDDL(string dbName)
 {
     dbS = new SchemaDb();
     dbS.DatabaseName = dbName;
 }
Exemplo n.º 6
0
 public CostDetailDDL(string dbName)
 {
     dbS = new SchemaDb();
     dbS.DatabaseName = dbName;
 }
Exemplo n.º 7
0
 public TaskCentersDDL(string dbName)
 {
     dbS = new SchemaDb();
     dbS.DatabaseName = dbName;
 }
Exemplo n.º 8
0
 public DataBaseDDL(string dbName)
 {
     dbS = new SchemaDb();
     dbS.DatabaseName = dbName;
 }
Exemplo n.º 9
0
 public ArticlesDDL(string dbName)
 {
     dbS = new SchemaDb();
     dbS.DatabaseName = dbName;
 }