Ejemplo n.º 1
0
 /// <summary>
 /// Create a new CUSTOMER object.
 /// </summary>
 /// <param name="cUSTOMERID">Initial value of the CUSTOMERID property.</param>
 /// <param name="nAME">Initial value of the NAME property.</param>
 public static CUSTOMER CreateCUSTOMER(global::System.Int16 cUSTOMERID, global::System.String nAME)
 {
     CUSTOMER cUSTOMER = new CUSTOMER();
     cUSTOMER.CUSTOMERID = cUSTOMERID;
     cUSTOMER.NAME = nAME;
     return cUSTOMER;
 }
Ejemplo n.º 2
0
 //insert c
 private void button2_Click(object sender, EventArgs e)
 {
     CUSTOMER addc = new CUSTOMER();
     addc.CUSTOMERID = Convert.ToInt16(context.CUSTOMERs.ToList().Last().CUSTOMERID + 1);
     addc.NAME = textcname.Text;
     addc.ADRESA = textcadresa.Text;
     context.AddToCUSTOMERs(addc);
     int rowsAffected = context.SaveChanges(false);
     textCh.Text=rowsAffected.ToString() + " changes made to the customers (insert)";
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the CUSTOMERs EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToCUSTOMERs(CUSTOMER cUSTOMER)
 {
     base.AddObject("CUSTOMERs", cUSTOMER);
 }