private void Simpan_Click(object sender, EventArgs e) { if (!validator.Validate()) { return; } SalesheadsModel salesheads = (SalesheadsModel)SHBS.Current; salesheads.karyawanId = k_coll.FirstOrDefault(k => k.id == Convert.ToInt64(karyawanid.EditValue)); salesheads.branchManagerId = b_coll.FirstOrDefault(b => b.id == Convert.ToInt64(branchmanagerid.EditValue)); if (salesheads.createdAt == null) { salesheads.createdAt = DateTime.Now; } salesheads.updatedAt = DateTime.Now; salesheads.Save(); SHXpCollection.Add(salesheads); SHUOW.CommitChanges(); SHBS.EndEdit(); ViewState(); }
private void Batal_Click(object sender, EventArgs e) { SHBS.CancelEdit(); ViewState(); }
private void Tambah_Click(object sender, EventArgs e) { EditState(); SHBS.AddNew(); }