Example #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);
        }
Example #2
0
 partial void UpdateVm(Vm instance);
Example #3
0
 partial void DeleteVm(Vm instance);
Example #4
0
 partial void InsertVm(Vm instance);