当前位置: 首页>>代码示例>>C#>>正文


C# DataManager.SprintAddNewSprint方法代码示例

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


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

示例1: SprintAddNewSprintTest

 public void SprintAddNewSprintTest()
 {
     DataManager target = new DataManager(); // TODO: Initialize to an appropriate value
     int expected = 0; // TODO: Initialize to an appropriate value
     DateTime start = DateTime.Parse("14.4.13");
     DateTime end = DateTime.Parse("14.5.13");
     int actual;
     actual = target.SprintAddNewSprint(start, end);
     Assert.AreEqual(expected, actual);
 }
开发者ID:AntonLitovka,项目名称:Backlog,代码行数:10,代码来源:DataManagerTest.cs

示例2: button1_Click

        private void button1_Click(object sender, EventArgs e)
        {
            DataManager dm = new DataManager();

            DateTime start = sprint_Beginning_DayDateTimePicker.Value.Date;
            DateTime end = sprint_Finish_DayDateTimePicker.Value.Date;

            MessageBox.Show(start.ToString("dd.MM.yy\n") + end.ToString("dd.MM.yy\n"));

            Settings1.Default.startCurrentSprint = start;
            Settings1.Default.endCurrentSprint = end;

            Form1Tasks Ftasks = Form1Tasks.getInstance(null);

            long comRes = end.Ticks -  start.Ticks;
            if ( comRes <= 0)
            {
                MessageBox.Show("start date mast be before the end date");
                throw new Exception();
            }

            try
            {
                // add to sprint table
                if (dm.SprintAddNewSprint(start, end) == -1)
                    throw new Exception();

                this.sprintTableAdapter.Update(this.database1DataSet1.Sprint);

                this.sprintTableAdapter.Fill(this.database1DataSet1.Sprint);

                Ftasks.Form1TasksUpdate(start, end);
            }
            catch
            {
                MessageBox.Show("exeption this.sprintTableAdapter.Insert(start, end);");
            }
            string str = "";

            try
            {
                for (int i = 0; (DateTime.Compare(start.AddDays(i), end) != 0) && (i < MAX_DAYS_IN_SPRINT); i++)
                {
                    this.dateTableAdapter.Insert(1, start.AddDays(i));

                    str += (start.ToString("dd.MM.YY")+ "was add\n");

                    dateDataGridView.Update();

                    dateBindingNavigatorSaveItem_Click(sender, e);

                    this.dateTableAdapter.Update(this.database1DataSet1.Date);

                    this.dateTableAdapter.Fill(this.database1DataSet1.Date);

                    this.Update();
                }
            }
            catch(Exception)
            {
                MessageBox.Show("exeption " + str);
            }

            dateDataGridView.Update();

            dateBindingNavigatorSaveItem_Click(sender, e);

            this.sprintTableAdapter.Update(this.database1DataSet1.Sprint);//??

            this.dateTableAdapter.Update(this.database1DataSet1.Date);//??

            this.dateTableAdapter.Fill(this.database1DataSet1.Date);

            this.Update();

            //DataManager dm = new DataManager();

            dm.SprintAddNewSprint(start, end);

            //Properties.Settings.Default.;*/
        }
开发者ID:AntonLitovka,项目名称:Backlog,代码行数:81,代码来源:NewSprint.cs


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