當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。