コード例 #1
0
 private void EntryListGetByMemberIDNo()
 {
     entry = new BIZ.Entry();
     GetControlValue();
     PopulateBusinessLayer(Common.Common.RaceEntryClassType.Entry);
     entry.EntryGetByMemberIDNo(this.dtEntryMemberList, this.lblMemberEntryList);
 }
コード例 #2
0
 private void EntryListGetByRaceReleasePoint()
 {
     entry = new BIZ.Entry();
     GetControlValue();
     PopulateBusinessLayer(Common.Common.RaceEntryClassType.Entry);
     entry.EntryGetByRaceReleasePoint(this.dtEntryList, this.lblBirdCount);
 }
コード例 #3
0
        private void EClockMemberRegisterRFIDExport(String Drive)
        {
            DataTable dt = new DataTable();

            BIZ.Entry entry = new BIZ.Entry();
            entry.ClubID = ClubID;
            dt           = entry.EClockRegisterRFIDMember();

            this.progressBar4.Minimum = 0;
            this.progressBar4.Maximum = dt.Rows.Count;
            this.progressBar4.Step    = 1;
            this.progressBar4.Value   = 0;

            string path       = Drive + @"MemberRegisterRFID.inf";
            string collection = "";

            if (File.Exists(path))
            {
                File.Delete(path);
            }
            if (!File.Exists(path))
            {
                // Create a file to write to.
                using (StreamWriter sw = File.CreateText(path))
                {
                    foreach (DataRow item in dt.Rows)
                    {
                        collection = ClubID.ToString() + "|" + item["MemberID"].ToString() + "|" + item["RFIDSerialNo"].ToString();
                        sw.WriteLine(Common.Common.Encrypt(collection));
                        System.Threading.Thread.Sleep(50);
                        this.progressBar4.PerformStep();
                    }
                }
            }
        }
コード例 #4
0
 private void Save()
 {
     try
     {
         GetControlValue();
         if (lblStickerCredit.Text != "0")
         {
             if (RaceCategoryGroupName != "" && RaceCategoryName != "")
             {
                 entry = new BIZ.Entry();
                 PopulateBusinessLayer(Common.Common.RaceEntryClassType.Entry);
                 if (entry.Save() && !IsEdit)
                 {
                     //ClearControl();
                     //this.txtMemberIDNo.Focus();
                     this.txtEntryID.Text       = "0";
                     this.txtRingNumber.Text    = "";
                     this.txtStickerCode.Text   = "";
                     this.txtEntryIdentity.Text = "";
                     this.BandID = 0;
                     this.txtRingNumber.Focus();
                     GetMemberRingEnrolled();
                 }
                 EntryListGetByMemberIDNo();
                 EntryListGetByRaceReleasePoint();
                 GetStickerCredit();
             }
             else
             {
                 MessageBox.Show("Please select Race Category and Race Group Category, Invalid Entry", "Error");
             }
         }
         else if (lblStickerCredit.Text == "0")
         {
             MessageBox.Show("Your sticker credit limit is zero. Please contact PKC Admin.", "Error");
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(Common.Common.CustomError(ex.Message), "Error");
         this.txtStickerCode.Focus();
     }
 }
コード例 #5
0
        private void GetStickerCredit()
        {
            entry = new BIZ.Entry();
            GetControlValue();
            PopulateBusinessLayer(Common.Common.RaceEntryClassType.Entry);

            DataSet dtresult = entry.GetStickerCredit();

            if (dtresult.Tables.Count > 0)
            {
                if (dtresult.Tables[0].Rows.Count > 0)
                {
                    if (dtresult.Tables[0].Rows[0]["Credit"].ToString() != "")
                    {
                        lblLabelStickerCredit.Visible = true;
                        lblStickerCredit.Visible      = true;
                        lblStickerCredit.Text         = dtresult.Tables[0].Rows[0]["Credit"].ToString();
                    }
                }
            }
        }
コード例 #6
0
        private void GetLastEntry()
        {
            try
            {
                DataSet dtResult = new DataSet();
                entry = new BIZ.Entry();
                entry.RaceScheduleCategoryName = RaceScheduleCategoryName;
                entry.MemberID           = MemberID;
                entry.ClubID             = ClubID;
                entry.RaceReleasePointID = RaceReleasePointID;
                entry.ReleaseDate        = dtpDateRelease.Value;
                dtResult = entry.GetLastEntry();

                if (dtResult.Tables.Count > 0)
                {
                    dataGridView1.DataSource = dtResult.Tables[0];
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #7
0
 private void SaveDuplicateEntry()
 {
     try
     {
         if (txtBandNumber.Text != "" && txtStickerCode.Text != "")
         {
             entry                          = new BIZ.Entry();
             entry.ClubID                   = ClubID;
             entry.UserID                   = UserID;
             entry.EntryID                  = EntryID;
             entry.MemberID                 = MemberID;
             entry.RaceScheduleName         = RaceScheduleName;
             entry.RaceScheduleCategoryName = RaceScheduleCategoryName;
             entry.RaceReleasePointID       = RaceReleasePointID;
             entry.StickerCode              = txtStickerCode.Text;
             entry.RingNumber               = txtBandNumber.Text;
             entry.SaveDuplicateEntry();
         }
         else
         {
             string error = "";
             if (txtBandNumber.Text == "")
             {
                 error = "No entry is selected!";
             }
             else
             {
                 error = "Please enter stickercode";
             }
             MessageBox.Show(error, "Duplicate Error");
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #8
0
        private void GetEntryDetails()
        {
            try
            {
                GetControlValue();
                if (BarcodeBandID != "")
                {
                    entry = new BIZ.Entry();
                    PopulateBusinessLayer(Common.Common.RaceEntryClassType.Entry);
                    DataSet dtResult = new DataSet();
                    dtResult = entry.GetEntryDetailsByEntryBarcodeID();

                    if (dtResult.Tables.Count > 0)
                    {
                        if (dtResult.Tables[0].Rows.Count > 0)
                        {
                            this.BandID             = (Int64)dtResult.Tables[0].Rows[0]["BandID"];
                            this.txtMemberID.Text   = (string)dtResult.Tables[0].Rows[0]["MemberID"].ToString();
                            this.txtRingNumber.Text = (string)dtResult.Tables[0].Rows[0]["BandNumber"].ToString();
                            this.txtMemberIDNo.Text = (string)dtResult.Tables[0].Rows[0]["MemberIDNo"].ToString();
                            GetMemberDetails();
                            this.txtStickerCode.Focus();
                        }
                        else
                        {
                            //MessageBox.Show("No Record Found or Invalid Entry Barcode ID", "Error");
                            //ClearControl();
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }