示例#1
0
        private void Simpan_Click(object sender, EventArgs e)
        {
            if (!validator.Validate())
            {
                return;
            }

            SalesModel sales = (SalesModel)SalesBS.Current;

            sales.salesheadId = sh_coll.First(sh => sh.id == Convert.ToInt64(salesheadid.EditValue));
            sales.createdAt   = DateTime.Now;
            sales.updatedAt   = DateTime.Now;
            sales.Save();
            SalesXpCollection.Add(sales);
            SalesUOW.CommitChanges();
            SalesBS.EndEdit();

            SetDisabled();

            Tambah.Enabled = true;
            Simpan.Enabled = false;
            Batal.Enabled  = false;
            Edit.Enabled   = true;
            Hapus.Enabled  = true;

            gridControl1.Enabled = true;
        }
示例#2
0
        private void Tambah_Click(object sender, EventArgs e)
        {
            SalesBS.AddNew();
            SetEnabled();

            Tambah.Enabled = false;
            Simpan.Enabled = true;
            Batal.Enabled  = true;
            Edit.Enabled   = false;
            Hapus.Enabled  = false;

            gridControl1.Enabled = false;
        }
示例#3
0
        private void Batal_Click(object sender, EventArgs e)
        {
            SalesBS.CancelEdit();
            SetDisabled();

            Tambah.Enabled = true;
            Simpan.Enabled = false;
            Batal.Enabled  = false;
            Edit.Enabled   = true;
            Hapus.Enabled  = true;

            gridControl1.Enabled = true;
        }