コード例 #1
0
        /// <summary>
        /// Create a new zivotinja object.
        /// </summary>
        /// <param name="id">Initial value of the id property.</param>
        /// <param name="ime">Initial value of the ime property.</param>
        /// <param name="vrsta">Initial value of the vrsta property.</param>
        /// <param name="zooId">Initial value of the zooId property.</param>
        public static zivotinja Createzivotinja(global::System.Int32 id, global::System.String ime, global::System.String vrsta, global::System.Int32 zooId)
        {
            zivotinja zivotinja = new zivotinja();

            zivotinja.id    = id;
            zivotinja.ime   = ime;
            zivotinja.vrsta = vrsta;
            zivotinja.zooId = zooId;
            return(zivotinja);
        }
コード例 #2
0
ファイル: Default.aspx.cs プロジェクト: vsite-prog/PIN
    DatabaseEntities db; //neka bude global za klasu

    #endregion Fields

    #region Methods

    protected void Button1_Click(object sender, EventArgs e)
    {
        //kreiraj novi objekt životinja
        zivotinja z = new zivotinja();
        //POstavo property iz TB-a
        z.ime = tb_ime.Text;
        z.vrsta = tb_vrsta.Text;
        //uzmi iz DDL vrijednost ZOO-a
        z.zooId = Int32.Parse(ddl_zoo.SelectedValue);
        //dodaj u memoriji servera novi objekt u životinje
        db.AddObject("zivotinja", z);
        //preko ADO.NET-a spremi u Bazu
        db.SaveChanges();
        postavi_grid();
    }
コード例 #3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the zivotinja EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTozivotinja(zivotinja zivotinja)
 {
     base.AddObject("zivotinja", zivotinja);
 }
コード例 #4
0
ファイル: Model.Designer.cs プロジェクト: vsite-prog/PIN
 /// <summary>
 /// Create a new zivotinja object.
 /// </summary>
 /// <param name="id">Initial value of the id property.</param>
 /// <param name="ime">Initial value of the ime property.</param>
 /// <param name="vrsta">Initial value of the vrsta property.</param>
 /// <param name="zooId">Initial value of the zooId property.</param>
 public static zivotinja Createzivotinja(global::System.Int32 id, global::System.String ime, global::System.String vrsta, global::System.Int32 zooId)
 {
     zivotinja zivotinja = new zivotinja();
     zivotinja.id = id;
     zivotinja.ime = ime;
     zivotinja.vrsta = vrsta;
     zivotinja.zooId = zooId;
     return zivotinja;
 }
コード例 #5
0
ファイル: Model.Designer.cs プロジェクト: vsite-prog/PIN
 /// <summary>
 /// Deprecated Method for adding a new object to the zivotinja EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTozivotinja(zivotinja zivotinja)
 {
     base.AddObject("zivotinja", zivotinja);
 }