public listviewer(Model.otherexpitem otherexpitem, int sn) { for (int i = 1; i <= 5; i++) { SubItems.Add(new ListViewSubItem()); } SubItems[0].Text = sn.ToString(); title = otherexpitem.title; amount = otherexpitem.amount; id = otherexpitem.id; }
public void save(int exp_id) { Model.otherexpitem otherexpitem = new Model.otherexpitem() { otherexp_id = exp_id, title = title, amount = amount, created_at = DateTime.Now, updated_at = DateTime.Now, admin_id = INFO.admin_id }; DB.Instance.otherexpitems.Add(otherexpitem); DB.Instance.SaveChanges(); }