private void Paied(object sender, ExternalDataEventArgs e) { CRySTALDataConnections.CRySTALDataSetTableAdapters.CustomerTransactionsTableAdapter cta = new CRySTALDataConnections.CRySTALDataSetTableAdapters.CustomerTransactionsTableAdapter(); cta.SetStatus(false, false, e.InstanceId); CRySTALDataConnections.CRySTALDataSetTableAdapters.TablesTblTableAdapter tta = new CRySTALDataConnections.CRySTALDataSetTableAdapters.TablesTblTableAdapter(); CRySTALDataConnections.CRySTALDataSet.CustomerTransactionsDataTable ctd; ctd = cta.GetDataByWorkflowInstID(e.InstanceId); if (ctd.Rows.Count == 0) return; tta.SetStatus(2, ctd.First().TableNumber); }
public List<int> GetInPaymentTables(string sessionID) { List<int> returnList = new List<int>(); CRySTALDataConnections.CRySTALDataSetTableAdapters.CustomerTransactionsTableAdapter cta = new CRySTALDataConnections.CRySTALDataSetTableAdapters.CustomerTransactionsTableAdapter(); CRySTALDataConnections.CRySTALDataSet.CustomerTransactionsDataTable ctd; ctd = cta.GetInPaymentData(Auth.getEmployeeID(sessionID)); foreach (CRySTALDataConnections.CRySTALDataSet.CustomerTransactionsRow row in ctd.Rows) { returnList.Add(row.TableNumber); } return returnList; }
public void AssignTableTo(string sessionID, int table, int employeeID) { if (Auth.VerifySession(sessionID, "host")) { WorkflowRuntime workflowRuntime = AppDomain.CurrentDomain.GetData("WorkflowRuntime") as WorkflowRuntime; ManualWorkflowSchedulerService manualScheduler = AppDomain.CurrentDomain.GetData("ManualScheduler") as ManualWorkflowSchedulerService; WorkflowInstance instance = workflowRuntime.CreateWorkflow(typeof(CRySTALWorkflow.CustomerWorkflow)); instance.Start(); CRySTALDataConnections.CRySTALDataSetTableAdapters.CustomerTransactionsTableAdapter cta = new CRySTALDataConnections.CRySTALDataSetTableAdapters.CustomerTransactionsTableAdapter(); cta.InsertTransaction(instance.InstanceId, employeeID, table, true); manualScheduler.RunWorkflow(instance.InstanceId); CRySTALDataConnections.CRySTALDataSetTableAdapters.TablesTblTableAdapter tta = new CRySTALDataConnections.CRySTALDataSetTableAdapters.TablesTblTableAdapter(); tta.SetStatus(1, table); } else { CRySTALerror err = new CRySTALerror(); err.ErrorType = CRySTALerror.ErrorTypes.sessionError; err.sessionID = sessionID; err.errorMessage = "Unable to verify session ID"; throw new FaultException<CRySTALerror>(err); } }
private void CheckRequest(object sender, ExternalDataEventArgs e) { CRySTALDataConnections.CRySTALDataSetTableAdapters.CustomerTransactionsTableAdapter cta = new CRySTALDataConnections.CRySTALDataSetTableAdapters.CustomerTransactionsTableAdapter(); cta.SetStatus(false, true, e.InstanceId); IsCheckRequested = true; }
private Guid getWorkflowIdFromTable(int tblNumber) { CRySTALDataConnections.CRySTALDataSetTableAdapters.CustomerTransactionsTableAdapter cta = new CRySTALDataConnections.CRySTALDataSetTableAdapters.CustomerTransactionsTableAdapter(); CRySTALDataConnections.CRySTALDataSet.CustomerTransactionsDataTable cdt = cta.GetDataByActiveTableNumber(tblNumber); if (cdt.Count > 0) { return cdt.First().WorkflowInstID; } return new Guid(); }