示例#1
0
 public void Add(mRA section)
 {
     using (DefaultCS db = new DefaultCS())
     {
         db.mRAs.MergeOption = MergeOption.NoTracking;
         db.mRAs.AddObject(section);
         db.SaveChanges();
     }
 }
示例#2
0
        public void Update(mRA section)
        {
            using (DefaultCS db = new DefaultCS())
            {
                var d = db.mRAs.Where(i => i.RASST_ID == section.RASST_ID).First();
                d.RANGEASST_ENAME = section.RANGEASST_ENAME;
                d.RANGE_ID = section.RANGE_ID;
                //d.OfficerName = section.OfficerName;
                d.Std = section.Std;
                d.Phoneno = section.Phoneno;
                d.faxno = section.faxno;
                d.Mobileno = section.Mobileno;
                d.UpdateOn = section.UpdateOn;

                db.SaveChanges();
            }
        }
示例#3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the mRAs EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTomRAs(mRA mRA)
 {
     base.AddObject("mRAs", mRA);
 }
示例#4
0
 /// <summary>
 /// Create a new mRA object.
 /// </summary>
 /// <param name="rASST_ID">Initial value of the RASST_ID property.</param>
 /// <param name="rANGE_ID">Initial value of the RANGE_ID property.</param>
 public static mRA CreatemRA(global::System.Int64 rASST_ID, global::System.Int32 rANGE_ID)
 {
     mRA mRA = new mRA();
     mRA.RASST_ID = rASST_ID;
     mRA.RANGE_ID = rANGE_ID;
     return mRA;
 }