internal void StartFinishButton_OnClick(object sender, EventArgs eventArgs) { var result = DBHelper.GetTotalFinishedRequireQuestionByEventId( (string)BusinessProcess.GlobalVariables[Parameters.IdCurrentEventId]); var isActiveEvent = !result.Next() || (long)result["count"] == 0; if (isActiveEvent) { Dialog.Alert(Translator.Translate("closeeventquestion"), (o, args) => { if (!CheckEventBeforeClosing() || args.Result != 0) { return; } Navigation.Move("CloseEventScreen"); }, null, Translator.Translate("yes"), Translator.Translate("no")); } else { Dialog.Message(Translator.Translate("unfinished_business")); } }
internal void StartFinishButton_OnClick(object sender, EventArgs eventArgs) { var result = DBHelper.GetTotalFinishedRequireQuestionByEventId( (string)BusinessProcess.GlobalVariables[Parameters.IdCurrentEventId]); var isActiveEvent = !result.Next() || (long)result["count"] == 0; if (isActiveEvent) { Dialog.Alert(Translator.Translate("closetaskquestion"), (o, args) => { if (!CheckEventBeforeClosing() || args.Result != 0) { return; } var @event = (Event) DBHelper.LoadEntity( (string)BusinessProcess.GlobalVariables[Parameters.IdCurrentEventId]); @event.Status = StatusyEvents.GetDbRefFromEnum(StatusyEventsEnum.Done); @event.ActualEndDate = DateTime.Now; DBHelper.SaveEntity(@event, false); Navigation.Move("CloseEventScreen"); }, null, Translator.Translate("yes"), Translator.Translate("no")); } else { Dialog.Message(Translator.Translate("unfinished_business")); } }
private void Dialog_OnClick(object sender, EventArgs e) { Dialog.Alert("Test", Alert_Handler, null, "ok"); }