protected override void saveBtn_Click(object sender, EventArgs e)
        {
            foreach (DataGridViewRow row in outletDataGridView.Rows)
            {
                Outlet item = row.DataBoundItem as Outlet;
                if (item != null)
                {
                    outletRepo.Update(item);
                }
            }

            this.Close();
        }
        public void EditTest()
        {
            var outlet = new Outlet
            {
                slsmCode    = "slsmtest",
                outlCode    = "outlet001",
                outlName    = "LenovoMart",
                outlAddress = "Griya Asri 2",
                outlRoute   = "F33",
                outlStat    = false
                              // outletType = "Retailer"
            };

            var result = m_outlet.Update(outlet);

            Assert.IsTrue(result != 0);
        }
Beispiel #3
0
        protected override void button2_Click(object sender, EventArgs e)
        {
            Outlet outlet = (Outlet)outletBindingSource.Current;

            if (outlet == null)
            {
                return;
            }

            if (isAddNew)
            {
                outletRepository.Save(outlet);
                Listener.Ok(this, true, outlet);
            }
            else
            {
                outletRepository.Update(outlet);
            }

            CekKondisi(FormCondition.Ready);
        }
Beispiel #4
0
 public void Update(OutletViewModel outlet)
 {
     _outletRepository.Update(outlet);
 }