本文整理匯總了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.;*/
}