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


C# pBaseEntities.SaveChanges方法代码示例

本文整理汇总了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();
        }
开发者ID:ondister,项目名称:Recog,代码行数:15,代码来源:AnwerEdit.cs

示例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;
            }
        }
开发者ID:ondister,项目名称:Recog,代码行数:63,代码来源:TestAdd.cs


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