Ejemplo n.º 1
0
        //**********************************************************
        //* Добавление новой Vm
        //**********************************************************
        public static void AddVm(String name, Int32 type, Int32 system, Int32 userId, Int32 envType, String description = "null")
        {
            using (SandBoxDataContext db = new SandBoxDataContext())
            {
                Vm vm = new Vm
                {
                    Name = name,
                    Type = type,
                    System = system,
                    State = 1,
                    CreatedBy = userId,
                    CreatedDate = DateTime.Now,
                    EnvId = 0,
                    EnvType = envType,
                    EnvMac = "null",
                    EnvIp = "null",
                    Description = description
                };

                db.Vms.InsertOnSubmit(vm);
                db.SubmitChanges();
            }
            //TableUpdated(Table.VMS);
        }
Ejemplo n.º 2
0
 partial void UpdateVm(Vm instance);
Ejemplo n.º 3
0
 partial void DeleteVm(Vm instance);
Ejemplo n.º 4
0
 partial void InsertVm(Vm instance);