Beispiel #1
0
 public void Add(mSUBDIV division)
 {
     using (DefaultCS db = new DefaultCS())
     {
         db.mSUBDIVs.MergeOption = MergeOption.NoTracking;
         db.mSUBDIVs.AddObject(division);
         db.SaveChanges();
     }
 }
Beispiel #2
0
        public void Update(mSUBDIV subDivision)
        {
            using (DefaultCS db = new DefaultCS())
            {
                var d = db.mSUBDIVs.Where(i => i.SUBDIV_ID == subDivision.SUBDIV_ID).First();
                d.SUBDIV_ENAME = subDivision.SUBDIV_ENAME;
                d.DIV_ID = subDivision.DIV_ID;
                d.officername = subDivision.officername;
                d.Std = subDivision.Std;
                d.Phoneno = subDivision.Phoneno;
                d.faxno = subDivision.faxno;
                d.Mobileno = subDivision.Mobileno;
                d.UpdateOn = subDivision.UpdateOn;
                d.Lastupdatedon = subDivision.Lastupdatedon;

                db.SaveChanges();
            }
        }
Beispiel #3
0
 /// <summary>
 /// Create a new mSUBDIV object.
 /// </summary>
 /// <param name="sUBDIV_ID">Initial value of the SUBDIV_ID property.</param>
 /// <param name="dIV_ID">Initial value of the DIV_ID property.</param>
 /// <param name="sUBDIV_ENAME">Initial value of the SUBDIV_ENAME property.</param>
 public static mSUBDIV CreatemSUBDIV(global::System.Int32 sUBDIV_ID, global::System.Int32 dIV_ID, global::System.String sUBDIV_ENAME)
 {
     mSUBDIV mSUBDIV = new mSUBDIV();
     mSUBDIV.SUBDIV_ID = sUBDIV_ID;
     mSUBDIV.DIV_ID = dIV_ID;
     mSUBDIV.SUBDIV_ENAME = sUBDIV_ENAME;
     return mSUBDIV;
 }
Beispiel #4
0
 /// <summary>
 /// Deprecated Method for adding a new object to the mSUBDIVs EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTomSUBDIVs(mSUBDIV mSUBDIV)
 {
     base.AddObject("mSUBDIVs", mSUBDIV);
 }