本文整理汇总了C#中Recog.Data.pBaseEntities.SaveChanges方法的典型用法代码示例。如果您正苦于以下问题:C# pBaseEntities.SaveChanges方法的具体用法?C# pBaseEntities.SaveChanges怎么用?C# pBaseEntities.SaveChanges使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Recog.Data.pBaseEntities
的用法示例。
在下文中一共展示了pBaseEntities.SaveChanges方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: cmd_editans_Click
private void cmd_editans_Click(object sender, EventArgs e)
{
pBaseEntities pb = new pBaseEntities();
IEnumerable<answersparam> answers = pb.answersparams.Where(a => a.ida == this.IDA);
foreach (answersparam ap in answers)
{
ap.description = this.tb_desc.Text;
ap.cellswidth = (int)this.nu_width.Value;
ap.cellshight = (int)this.nu_hight.Value;
ap.intercellswidth = (int)this.nu_intercells.Value;
}
pb.SaveChanges();
this.Close();
}
示例2: button1_Click
private void button1_Click(object sender, EventArgs e)
{
// это необходимо менять
double startx =58.8;
double starty = 197;
int rowscount = 31;
int colscount = 9;
double colsinterval = 86.6;
double rowsinterval = 27.5;
//
pBaseEntities pb = new pBaseEntities();
testsparam t = pb.testsparams.First(tp => tp.idt == (int)EnumPTests.NPNA);
t.answersparams.Load();
int curransverindex = 0;
double x = startx;
for(int col=0;col<colscount;col++)
{
double y = starty;
for (int row = 0; row < rowscount;row++ )
{
if (curransverindex <= t.answerscount-1)
{
Distances _distances = new Distances();
_distances.Add(_canvas.TopLeftMarker, (int)x, (int)y);
_distances.Add(_canvas.TopRightMarker, (int)x, (int)y);
_distances.Add(_canvas.BottomLeftMarker, (int)x, (int)y);
_distances.Add(_canvas.BottomRightMarker, (int)x, (int)y);
_canvas.Answers[curransverindex].Clear();
_canvas.Answers[curransverindex].Cells.ReMeasure(_distances, _canvas.Answers[curransverindex].InterCentresDistX, _canvas.Answers[curransverindex].CellsWidth, _canvas.Answers[curransverindex].CellsHeight);
_canvas.Answers[curransverindex].Select();
pb_img.Refresh();
//это комментить при подгонке
answersparam a = t.answersparams.First(ap => ap.num == curransverindex + 1);
a.toplx = (int)_distances[0].OnX;
a.toply = (int)_distances[0].OnY;
a.toprx = (int)_distances[1].OnX;
a.topry = (int)_distances[1].OnY;
a.blx = (int)_distances[2].OnX;
a.bly = (int)_distances[2].OnY;
a.brx = (int)_distances[3].OnX;
a.bry = (int)_distances[3].OnY;
pb.SaveChanges();
y += rowsinterval;
curransverindex++;
}
}
x += colsinterval;
}
}