public ActionResult Edit(Guid id) { var deposit = _depositService.GetById(id); var depositForm = DepositForm.FromDeposit(deposit); return(View(depositForm)); }
private void CreateDeposit() { // ambil list brg var listBrg = new List <DepositDetilModel>(); foreach (DataRow dr in DetilPenjualanTable.Rows) { if (dr["BrgID"].ToString().Trim() == "") { continue; } var depositDetil = new DepositDetilModel() { BrgID = dr["BrgID"].ToString(), Qty = Convert.ToDecimal(dr["Qty"]), Harga = Convert.ToDecimal(dr["Harga"]), Diskon = Convert.ToDecimal(dr["Diskon"]), SubTotal = Convert.ToDecimal(dr["SubTotal"]) }; listBrg.Add(depositDetil); } var jenisBayarID = ""; if (_listBayarDetil != null) { jenisBayarID = _listBayarDetil.FirstOrDefault().JenisBayarID; } var pihakKeduaID = ""; if (CustomerComboBox.SelectedValue != null) { pihakKeduaID = CustomerComboBox.SelectedValue.ToString(); } // save deposit var deposit = new DepositModel { Tgl = TanggalDateTime.Value.ToString("dd-MM-yyyy"), Jam = JamTextBox.Text, PihakKeduaID = pihakKeduaID, BuyerName = BuyerNameTextBox.Text, JenisBayarID = jenisBayarID, NilaiBiayaKirim = BiayaKirimNumText.Value, NilaiDeposit = GrandTotalNumText.Value, ListBrg = listBrg }; var form = new DepositForm(deposit) { MdiParent = this.MdiParent, StartPosition = FormStartPosition.CenterScreen, }; form.Show(); ClearForm(); }
private void btnDeposit_Click(object sender, EventArgs e) { this.deleteSubs(); DepositForm depositForm = new DepositForm(); depositForm.MdiParent = (Form1)this.MdiParent; depositForm.Anchor = AnchorStyles.Top | AnchorStyles.Right; depositForm.Dock = DockStyle.Fill; depositForm.Show(); }
public ActionResult Edit(Guid id, DepositForm depositForm) { if (!ModelState.IsValid) { return View(depositForm); } _depositService.Edit(depositForm.ToDeposit()); return RedirectToAction("Index", new DepositListFiltersModel().GetRouteValues()).WithSuccess("Depósito Editado"); }
public ActionResult Edit(Guid id, DepositForm depositForm) { if (!ModelState.IsValid) { return(View(depositForm)); } _depositService.Edit(depositForm.ToDeposit()); return(RedirectToAction("Index", new DepositListFiltersModel().GetRouteValues()).WithSuccess("Depósito Editado")); }
private void DepositJualButton_Click(object sender, EventArgs e) { DepositModel deposit = null; var form = new DepositForm(deposit) { MdiParent = this, StartPosition = FormStartPosition.CenterScreen }; form.Show(); }
public ActionResult Create(DepositForm depositForm) { if (!ModelState.IsValid) { return View(depositForm); } var deposit = depositForm.ToDeposit(); _depositService.Create(deposit); return RedirectToAction("Index", new DepositListFiltersModel().GetRouteValues()).WithSuccess("Depósito Creado"); }
public ActionResult Create(DepositForm depositForm) { if (!ModelState.IsValid) { return(View(depositForm)); } var deposit = depositForm.ToDeposit(); _depositService.Create(deposit); return(RedirectToAction("Index", new DepositListFiltersModel().GetRouteValues()).WithSuccess("Depósito Creado")); }
public ActionResult Create() { var depositForm = new DepositForm(); return View(depositForm); }
private void button1_Click(object sender, EventArgs e) { DepositForm depo = new DepositForm(); depo.Show(); }
public ActionResult Create() { var depositForm = new DepositForm(); return(View(depositForm)); }