private void frmGetDrawingGroup_Load(object sender, EventArgs e) { try { Guid requestId = Guid.NewGuid(); Service.DCService service = new DrawingClient.Service.DCService(); service.GetDrawingGroupCompleted += new DrawingClient.Service.GetDrawingGroupCompletedEventHandler(DCService_GetDrawingGroupCompleted); //service.GetDrawingGroup(_promotionId); service.GetDrawingGroupAsync(_promotionId, requestId); } catch (Exception ex) { Error.Log(ex, true); } }
public frmPopulateDrum(Int32 promotionId, Int32 bucketId, DateTime drawDate, DateTime checkinStartTime, DateTime checkinEndTime, bool optimize) { InitializeComponent(); SetUIControlText(); _promotionId = promotionId; _bucketId = bucketId; _drawDate = drawDate; _checkinStartTime = checkinStartTime; _checkinEndTime = checkinEndTime; _optimize = optimize; Service.DCService service = new DrawingClient.Service.DCService(); service.PopulateDrumCompleted += new DrawingClient.Service.PopulateDrumCompletedEventHandler(DCService_PopulateDrumCompleted); service.OptimizeDrumCompleted += new DrawingClient.Service.OptimizeDrumCompletedEventHandler(DCService_OptimizeDrumCompleted); }
void UpdateStatsCallback(string drumName, string drumType, string lastPopulated, Int32 players, Int32 entries) { Service.DCService service = new DrawingClient.Service.DCService(); dgvDrumHistory.DataSource = service.GetDrumHistory(drawingGroup.PromoId, drawingGroup.BucketId).Tables[0].DefaultView; tbDrumName.Text = drumName; tbDrumType.Text = drumType; if (Convert.ToDateTime(lastPopulated) == SqlDateTime.MinValue) { tbLastPopulated.Text = TextRes.Get("Never", Program.ci); } else { tbLastPopulated.Text = DateTime.Parse(lastPopulated).ToString(Program.ci); } tbPlayers.Text = players.ToString("N0"); tbEntries.Text = entries.ToString("N0"); }
private void frmPopulateDrum_Load(object sender, EventArgs e) { anim = Properties.Resources.PopulatingDrum; ImageAnimator.Animate(anim, new EventHandler(Animate)); lblAction.Text = TextRes.Get("PopulatingDrum", Program.ci); try { Guid requestId = Guid.NewGuid(); Service.DCService service = new DrawingClient.Service.DCService(); service.PopulateDrumCompleted += new DrawingClient.Service.PopulateDrumCompletedEventHandler(DCService_PopulateDrumCompleted); //Common.Instance.DCService.PopulateDrumAsync(_promotionId, _bucketId, _drawDate, DateTime.Now, _checkinStartTime, _checkinEndTime, Common.Instance.UserID, _promotionId); service.PopulateDrumAsync(_promotionId, _bucketId, _drawDate, DateTime.Now, _checkinStartTime, _checkinEndTime, Common.Instance.UserID, _promotionId); //service.PopulateDrum(_promotionId, _bucketId, _drawDate, DateTime.Now, _checkinStartTime, _checkinEndTime, Common.Instance.UserID); } catch (Exception ex) { Error.Log(ex, true); } }
private void frmDrumHistory_Load(object sender, EventArgs e) { Service.DCService service = new DrawingClient.Service.DCService(); dgvDrumHistory.DataSource = service.GetDrumHistory(drawingGroup.PromoId, drawingGroup.BucketId).Tables[0].DefaultView; Service.Drum drum = service.GetDrumLastHistoryItem(drawingGroup.PromoId, drawingGroup.BucketId); tbDrumName.Text = drawingGroup.Drum.Name; tbDrumType.Text = TextRes.Get(drawingGroup.Drum.Type, Program.ci); if (Convert.ToDateTime(drum.LastPopulated.ToString()) == SqlDateTime.MinValue) { tbLastPopulated.Text = TextRes.Get("Never", Program.ci); } else { tbLastPopulated.Text = drum.LastPopulated.ToString(Program.ci); } tbPlayers.Text = drum.NumberOfPlayers.ToString("N0"); tbEntries.Text = drum.NumberOfEntries.ToString("N0"); }
void DCService_PopulateDrumCompleted(object sender, DrawingClient.Service.PopulateDrumCompletedEventArgs e) { try { if (_optimize) { Guid requestId = Guid.NewGuid(); Service.DCService service = new DrawingClient.Service.DCService(); service.OptimizeDrumCompleted += new DrawingClient.Service.OptimizeDrumCompletedEventHandler(DCService_OptimizeDrumCompleted); //Common.Instance.DCService.OptimizeDrumAsync(_promotionId, _bucketId, _promotionId); service.OptimizeDrumAsync(_promotionId, _bucketId, _promotionId); } else { close = true; this.Close(); //DrumOptimized(); } } catch (Exception ex) { Error.Log(ex, true); } }
public Service.DrawingGroup GetDrawingGroup(Int32 promotionID) { Service.DCService service = new DrawingClient.Service.DCService(); return(service.GetDrawingGroup(promotionID)); }
public DataSet GetAllActivePromotions() { Service.DCService service = new DrawingClient.Service.DCService(); return(service.GetAllActivePromotions()); }
void Login() { if (!ValidateForm()) { tbUsername.Enabled = false; tbPassword.Enabled = false; cbUseAnimation.Enabled = false; btnLogin.Enabled = false; try { Service.DCService service = new DrawingClient.Service.DCService(); if (!((Service.DrawingClientStatus)service.GetDrawingClientInUse()).DrawingClientInUse) { Service.User user = service.ValidateUser(tbUsername.Text, tbPassword.Text); if (user != null) { //MR 12/22/09 Adding this code to deal with locked accounts. if (user.LoginStatus == "LCK") { MessageBox.Show(TextRes.Get("LockedAccount", Program.ci), TextRes.Get("Login", Program.ci), MessageBoxButtons.OK, MessageBoxIcon.Error); tbUsername.Enabled = true; tbPassword.Enabled = true; cbUseAnimation.Enabled = true; btnLogin.Enabled = true; } else { Common.Instance.UserID = user.UserID; Common.Instance.UserIDText = user.UserIDText; Common.Instance.UserLevel = user.UserLevel; Common.Instance.UseAnimation = cbUseAnimation.Checked; service.SetDrawingClientInUse("DrawingClientOpen", tbUsername.Text); this.Close(); } } else { MessageBox.Show(TextRes.Get("InvalidLogin", Program.ci), TextRes.Get("Login", Program.ci), MessageBoxButtons.OK, MessageBoxIcon.Error); tbUsername.Enabled = true; tbPassword.Enabled = true; cbUseAnimation.Enabled = true; btnLogin.Enabled = true; } } else { MessageBox.Show(TextRes.Get("DrawingClientInUse", Program.ci), TextRes.Get("Login", Program.ci), MessageBoxButtons.OK, MessageBoxIcon.Error); tbUsername.Enabled = true; tbPassword.Enabled = true; cbUseAnimation.Enabled = true; btnLogin.Enabled = true; } } catch (Exception ex) { Error.Log(ex, true); tbUsername.Enabled = true; tbPassword.Enabled = true; cbUseAnimation.Enabled = true; btnLogin.Enabled = true; } } else { error = true; } }