예제 #1
0
파일: MainForm.cs 프로젝트: mkoscak/koberce
        private void btnStartInventory_Click(object sender, EventArgs e)
        {
            TextInputForm tiFrm = new TextInputForm("Type a condition to select from main table:", "quantity = 1 and valid = 1 and code < 500000");
            tiFrm.ShowDialog(this);
            var cond = tiFrm.ReturnText;

            Progress p = new Progress(0, 100, "Inventory checking", "Selecting non sold items", DoInventory, InventoryResult, cond, true, false);
            p.StartWorker();
        }
예제 #2
0
파일: MainForm.cs 프로젝트: mkoscak/koberce
        private void ExhibitionItems(string[] codes)
        {
            if (codes == null || codes.Length == 0)
            {
                MessageBox.Show(this, "No items to import!", "Import exhibitions", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }

            try
            {
                CurrentExhibitionName = string.Empty;
                TextInputForm frm = new TextInputForm("Enter an exhibition name", "");
                if (frm.ShowDialog() == DialogResult.OK)
                {
                    CurrentExhibitionName = frm.ReturnText;

                    Progress p = new Progress(0, 100, "Exhibition items..", "checking..", ExhibitionItems, RefreshItems, codes, true, true);
                    p.StartWorker();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(this, ex.ToString(), "Error while updating!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }