Beispiel #1
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            if (ledgers1.ITEMSMINMASTER.Rows.Count > 0)
            {
                Application.DoEvents();
                progressPanel1.Left = (Left + progressPanel1.Width)/2;
                progressPanel1.Visible = true;
                UpdateQty();
                progressPanel1.Visible = false;

                iTEMSMINMASTERBindingSource.EndEdit();
                var changes = (Ledgers.ITEMSMINMASTERDataTable) ledgers1.ITEMSMINMASTER.GetChanges();
                var bl = new VIRETAILDAL.Masters.MinimumQty();
                bl.Itemsminmaster = ledgers1.ITEMSMINMASTER;
                var savestatus = bl.DoSave();
                if (savestatus == "1")
                {
                    XtraMessageBox.Show("Data Saved Sucessfully", "Minimum Qty", MessageBoxButtons.OK,MessageBoxIcon.Information);
                    var addedRows = from row in ledgers1.PROMOITEMS
                            where row.RowState == DataRowState.Added
                            select row;
                        foreach (var row in addedRows.ToArray())
                        {
                            row.Delete();
                        }
                      if (changes != null) ledgers1.Merge(changes);
                        ledgers1.AcceptChanges();
                }
                 else
                     {
                         XtraMessageBox.Show(savestatus, "Minimum Qty", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
            }
        }
Beispiel #2
0
        private void simpleButton2_Click(object sender, EventArgs e)
        {
            var cl = new VIRETAILDAL.Masters.MinimumQty();
            cl.GetItemsByDate(dateEdit1.DateTime.Date, dateEdit2.DateTime.Date);
            ledgers1.ITEMSMINMASTER.Merge(cl.Itemsminmaster);
            simpleButton1.Enabled = true;

        }