private void btnContinue_Click(object sender, System.EventArgs e) { if (Uploaded) { NavControlBox.Action = NavBox.NavAction.SUBMIT; return; } DownloadFiles(); SetButtonStates(); if (!Uploaded) { return; } ADS.ActiveAudit.UploadDate = ShopDateTime.Instance.FullShopDateTime; CommonDatabaseContext dataContext = CreateCommonDatabaseContext(); InventoryAuditProcedures.EditAudit(ADS.ActiveAudit, dataContext); if (!dataContext.Result) { MessageBox.Show(dataContext.ErrorText); return; } }
private void btnAbort_Click(object sender, EventArgs e) { if (gvAudits.SelectedRows.Count != 1) { return; } InventoryAuditVO audit = gvAudits.SelectedRows[0].Tag as InventoryAuditVO; if (audit == null) { return; } if (MessageBox.Show("All data will be lost. Are you sure you want to abort this audit?", "Abort Audit", MessageBoxButtons.YesNo) != DialogResult.Yes) { return; } audit.Status = AuditStatus.ABORT; CommonDatabaseContext dataContext = CreateCommonDatabaseContext(); InventoryAuditProcedures.EditAudit(audit, dataContext); if (!dataContext.Result) { MessageBox.Show("Error while aborting audit."); return; } LoadAudits(); }
private void btnContinue_Click(object sender, EventArgs e) { if (Downloaded) { NavControlBox.Action = NavBox.NavAction.SUBMIT; return; } //ConfirmTrakker confirmTrakker = new ConfirmTrakker(TrakkerId); //if (confirmTrakker.ShowDialog() == DialogResult.Cancel) //{ // return; //} UploadFiles(); SetButtonStates(); if (!Downloaded) { return; } ADS.ActiveAudit.DownloadDate = ShopDateTime.Instance.FullShopDateTime; CommonDatabaseContext dataContext = CreateCommonDatabaseContext(); InventoryAuditProcedures.EditAudit(ADS.ActiveAudit, dataContext); if (!dataContext.Result) { MessageBox.Show(dataContext.ErrorText); return; } }