本文整理汇总了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);
}
示例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.;*/
}