• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# DataManager类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中DataManager的典型用法代码示例。如果您正苦于以下问题:C# DataManager类的具体用法?C# DataManager怎么用?C# DataManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



DataManager类属于命名空间,在下文中一共展示了DataManager类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Test_TwoWayReference_RemoveOnDelete

        // TODO: Remove or reimplement
        //[Test]
        public void Test_TwoWayReference_RemoveOnDelete()
        {
            Console.WriteLine ("");
            Console.WriteLine ("Preparing test...");
            Console.WriteLine ("");

            var data = new DataManager();
            data.Settings.IsVerbose = true;

            data.WriteSummary ();

            var invoiceItem = new ExampleInvoiceItem ();
            var invoice = new ExampleInvoice (invoiceItem);

            data.Save(invoice, true);

            data.WriteSummary ();

            Console.WriteLine ("");
            Console.WriteLine ("Executing test code...");
            Console.WriteLine ("");

            data.Delete(invoice);

            data.WriteSummary ();

            var newInvoice = data.Get<ExampleInvoice> (invoice.Id);

            Assert.AreEqual(0, newInvoice.Items.Length, "Linker failed to remove the link.");
        }
开发者ID:CompulsiveCoder,项目名称:datamanager,代码行数:32,代码来源:DataLinkerIntegrationTestFixture.cs


示例2: ExpeditePage

 public ExpeditePage()
 {
     this.InitializeComponent();
     DataManager thisDataManager = new DataManager();
     int x;
     x = 0;
 }
开发者ID:albatross666,项目名称:xaml-beginner,代码行数:7,代码来源:ExpeditePage.xaml.cs


示例3: GetUser

 public User GetUser(int id)
 {
     using (var manager = new DataManager())
     {
         return manager.Context.Users.SingleOrDefault(u => u.UserId == id);
     }
 }
开发者ID:RashitL,项目名称:TeamStudio,代码行数:7,代码来源:UsersService.cs


示例4: Start

    public void Start()
    {
        dataManager = DataManager.instance;
        infiniteObjectManager = InfiniteObjectManager.instance;
        infiniteObjectManager.init();
        infiniteObjectHistory = InfiniteObjectHistory.instance;
        infiniteObjectHistory.init(infiniteObjectManager.getTotalObjectCount());
        sectionSelection = SectionSelection.instance;
        chaseController = ChaseController.instance;

        moveDirection = Vector3.forward;
        spawnDirection = Vector3.forward;
        turnPlatform = new PlatformObject[(int)ObjectLocation.Last];

        infiniteObjectManager.getObjectSizes(out platformSizes, out sceneSizes, out largestSceneLength);
        infiniteObjectManager.getObjectStartPositions(out platformStartPosition, out sceneStartPosition);

        stopObjectSpawns = false;
        spawnData = new ObjectSpawnData();
        spawnData.largestScene = largestSceneLength;
        spawnData.useWidthBuffer = true;
        spawnData.section = 0;
        spawnData.sectionTransition = false;

        noCollidableProbability.init();

        showStartupObjects(GameManager.instance.showTutorial);

        spawnObjectRun(true);
    }
开发者ID:Blavtes,项目名称:RunInto,代码行数:30,代码来源:InfiniteObjectGenerator.cs


示例5: GetVersion

 public InoSoft.TeamStudio.Core.Entities.Version GetVersion(string VersionNum)
 {
     using (var Manager = new DataManager())
     {
         return Manager.Context.Versions.SingleOrDefault(v => v.VersionNum == VersionNum);
     }
 }
开发者ID:RashitL,项目名称:TeamStudio,代码行数:7,代码来源:VersionService.cs


示例6: GetAllUsers

 public List<User> GetAllUsers()
 {
     using (var manager = new DataManager())
     {
         return manager.Context.Users.ToList();
     }
 }
开发者ID:RashitL,项目名称:TeamStudio,代码行数:7,代码来源:UsersService.cs


示例7: DoSave

 // public DsMaster.STOREMASTRow StoremastRow;
 public string DoSave()
 {
     string retval="0";
     SqlTransaction tran = null;
     var isnew = false;
     try
     {
         var cn = new SqlConnection {ConnectionString = _constr};
         cn.Open();
         tran = cn.BeginTransaction(IsolationLevel.ReadUncommitted);
         var dt = new DsMaster().STOREMAST;
         var ta = new DsMasterTableAdapters.STOREMASTTableAdapter();
         ta.Connection.ConnectionString = _constr;
         ta.Fill(dt);
         ta.AssignConnection(cn, tran);
         var dr = dt.FindBySTORECODE(storecode);
         if (dr != null)
         {
             dr.BeginEdit();
             dr.EditedBy = Utils.Userid;
         }
         else
         {
             dr = (DsMaster.STOREMASTRow) dt.NewRow();
             isnew = true;
             var autoid = new DataManager().GetAutoId(9);
             autoid++;
             storecode = String.Format("{0,-2:D2}", autoid);
             dr.CREATEDBY = Utils.Userid;
             dr.CREATEDATE = System.DateTime.Now.Date;
         }
         dr.STORECODE = storecode;
         dr.STORETYPE = storetype;
         dr.STORENAME = storename;
         dr.ADDRESSS = address;
         dr.PHONENO = phono;
         dr.FAXNO = fax;
         dr.COMM = communicationtype;
         dr.COMPANY = COMPANY;
         if (isnew)
         {
             dt.Rows.Add(dr);
             ta.Update(dt);
         }
         else
         {
             dr.EndEdit();
             ta.Update(dt);
         }
         new DataManager().UpdateAutoNum(9);
         tran.Commit();
         retval = "1";
     }
     catch (Exception ex)
     {
         retval = ex.ToString();
         if (tran != null) tran.Rollback();
     }
     return retval;
 }
开发者ID:rehman922,项目名称:VIRETAIL,代码行数:61,代码来源:Masters.cs


示例8: SetUp

        public void SetUp()
        {
            this.dataManager = new DataManager(null, null, 0, 0, 10);
            this.dataManager.CompactionConfiguration = this.defaultCompactionConfig;

            foreach (var d in AnyKeys.Dimensions) AnyDimensions[d.Name] = AnyDimValue;
        }
开发者ID:darting,项目名称:MetricSystem,代码行数:7,代码来源:DataManagerTests.cs


示例9: GetTasksAboutUser

 public List<Task> GetTasksAboutUser(int UserID)
 {
     using (var Manager = new DataManager())
     {
         return Manager.Context.Tasks.Where(u => u.AssigneeId == UserID).ToList();
     }
 }
开发者ID:RashitL,项目名称:TeamStudio,代码行数:7,代码来源:TasksService.cs


示例10: GetTasksAboutProject

 public List<Task> GetTasksAboutProject(int ProjectId, int UserId)
 {
     using (var Manager = new DataManager())
     {
         return Manager.Context.Tasks.Where(u => u.ProjectId == ProjectId && u.AssigneeId == UserId).ToList();
     }
 }
开发者ID:RashitL,项目名称:TeamStudio,代码行数:7,代码来源:TasksService.cs


示例11: GetTask

 public Task GetTask(int TaskId)
 {
     using (var Manager = new DataManager())
     {
         return Manager.Context.Tasks.SingleOrDefault(u => u.TaskId == TaskId);
     }
 }
开发者ID:RashitL,项目名称:TeamStudio,代码行数:7,代码来源:TasksService.cs


示例12: GetAllChildrenTasks

 public List<Task> GetAllChildrenTasks(int TaskId)
 {
     using (var Manager = new DataManager())
     {
         return Manager.Context.Tasks.Where(u => u.ParentTaskId == TaskId).ToList();
     }
 }
开发者ID:RashitL,项目名称:TeamStudio,代码行数:7,代码来源:TasksService.cs


示例13: Start

    private void Start()
    {
        if(!Startup.dataInitialized)
        {
            directorData = Resources.Load ("DirectorData") as DirectorData;
            dataManager = new DataManager();

            SetDirectorDataForThisScene();
            directorData.totalSceneTime = 0f;
            directorData.totalDuration = (float)dataManager.script.totalSpan.TotalSeconds;
            Startup.dataInitialized = true;
        }

        directorData.elapsedSceneTime = 0f;
        directorData.nextSceneMomentID = GetNextSceneMomentID();
        directorData.totalSceneTime = (float)currentScene.startTime.TotalSeconds;
        selectedMomentButtonID = directorData.currentMomentID;

        LoadButtons();

        timeSlider.minValue = 0;
        timeSlider.maxValue = directorData.totalDuration;

        primaryInfoText.text = "";
        secondaryInfoText.text = "";
        timeTextB.text = dataManager.script.totalSpan.ToString ();

        SetMomentButtons(directorData.currentAct, directorData.currentScene);
        SetDirectorMode (DirectorMode.MOMENT);
    }
开发者ID:JeffreyMJohnson,项目名称:ProjectKansas,代码行数:30,代码来源:Director.cs


示例14: OrderPage

        public OrderPage()
        {
            this.InitializeComponent();
            var dM = new DataManager();

            LV.ItemsSource = dM.OrderItems;
        }
开发者ID:mknight9090,项目名称:xaml-beginner,代码行数:7,代码来源:OrderPage.xaml.cs


示例15: GetAllVersion

 public List<InoSoft.TeamStudio.Core.Entities.Version> GetAllVersion()
 {
     using (var manager = new DataManager())
     {
         return manager.Context.Versions.ToList();
     }
 }
开发者ID:RashitL,项目名称:TeamStudio,代码行数:7,代码来源:VersionService.cs


示例16: RestoreDefaultValues

 public void RestoreDefaultValues(DataManager.UowSchuleDB UnitofWork)
 {
     SelectedOperators = new List<GrundrechenArten> ()
     {
       GrundrechenArten.Plus, GrundrechenArten.Minus, GrundrechenArten.Mal, GrundrechenArten.Geteilt
     }
 }
开发者ID:Nelvin73,项目名称:Schule,代码行数:7,代码来源:GrundrechnenÜbungConfig.cs


示例17: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.Main);

            m_dataManager = DataManager.GetDataManager();

            m_connectionButton = FindViewById<Button>(Resource.Id.connectButton);
            m_login = FindViewById<EditText>(Resource.Id.loginField);
            m_password = FindViewById<EditText>(Resource.Id.passwordField);
            m_checkBox = FindViewById<CheckBox>(Resource.Id.rememberPass);

            // Store user data
            if (m_dataManager.RetreiveData<bool>("loginCheckBox") == true)
            {
                m_login.Text = m_dataManager.RetreiveData<string>("login");
                m_password.Text = m_dataManager.RetreiveData<string>("password");
                m_checkBox.Checked = m_dataManager.RetreiveData<bool>("loginCheckBox");
            }

            StartService(new Intent(this, typeof(NetworkService)));
            BindService(new Intent(this, typeof(NetworkService)), this, Bind.AutoCreate);

            m_connectionButton.Click += delegate {
                m_netwokService.SetLoginInfo(m_login.Text, m_password.Text);
                m_netwokService.LoginEvent += OnLogin;
                m_netwokService.Login();
            };
        }
开发者ID:Naphtaline,项目名称:EpiMessenger,代码行数:29,代码来源:MainActivity.cs


示例18: GetDataManager

 public DataManager GetDataManager()
 {
     var data = new DataManager ();
     data.Settings.Prefix = "Test-" + Guid.NewGuid ().ToString ().Substring (0, 8);
     data.Client = new MockRedisClientWrapper ();
     return data;
 }
开发者ID:CompulsiveCoder,项目名称:datamanager,代码行数:7,代码来源:BaseDataTestFixture.cs


示例19: GetAspUser

 public aspnet_Users GetAspUser(string userName)
 {
     using (var manager = new DataManager())
     {
         return manager.Context.aspnet_Users.SingleOrDefault(u => u.UserName == userName);
     }
 }
开发者ID:RashitL,项目名称:TeamStudio,代码行数:7,代码来源:UsersService.cs


示例20: MainForm

        public MainForm()
        {
            InitializeComponent();

            // TODO: Add constructor code after the InitializeComponent() call.
            dataManager = DataManager.Singleton;
            dataManager.Initialize();

            headers = new ColumnHeaders();
            headers.Read();

            fixtures = new FieldFixtures();
            fixtures.Read();

            columnSelectionForm = new ColumnSelectionForm(headers, dataManager);

            personelGridView.AutoGenerateColumns = false;

            foreach(string colName in headers.headers.Keys)
            {
                int colidx = personelGridView.Columns.Add(colName, headers.Get(colName));
                personelGridView.Columns[colidx].DataPropertyName = colName;
                personelGridView.Columns[colidx].SortMode = DataGridViewColumnSortMode.Automatic;
            }

            SyncVisibleColumns();

            List<SoldierRecord> soldierList = dataManager.ReadSoldiers();
            soldiersBindingList = new SortableBindingList<SoldierRecord>(soldierList);
            bindingSource1.DataSource = soldiersBindingList;
        }
开发者ID:Exploraton,项目名称:ArmIT,代码行数:31,代码来源:MainForm.cs



注:本文中的DataManager类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# DataModel类代码示例发布时间:2022-05-24
下一篇:
C# DataLoadOptions类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap