private void DTMobileNumberList_DoubleClick(object sender, EventArgs e) { try { DataGridView datagrid = this.dataGridView1; Int64 index; if (datagrid.RowCount > 0) { member = new BIZ.Member(); index = datagrid.CurrentRow.Index; string mobileNo = Convert.ToString(datagrid.Rows[Convert.ToInt32(index)].Cells[1].Value); if (mobileNo != "") { if ((string)datagrid.CurrentCell.Value.ToString() == "UNREG") { if (MessageBox.Show("Do you want to unregister this mobile number?", "Unreg", MessageBoxButtons.YesNo) == DialogResult.Yes) { DataTable dtResult = member.UnregMobileNumber(ClubID.ToString(), mobileNo, UserID.ToString()); if (dtResult.Rows.Count > 0) { MessageBox.Show(dtResult.Rows[0][0].ToString(), "Unreg"); } GetMobileNumberList(); } } } } } catch (Exception ex) { MessageBox.Show(Common.Common.CustomError(ex.Message), "Error"); } }
private void EClockReleasePointExport(String Drive) { DataTable dt = new DataTable(); BIZ.RaceReleasePoint raceReleasePoint = new BIZ.RaceReleasePoint(); raceReleasePoint.ClubID = ClubID; dt = raceReleasePoint.EClockRaceReleasePoint(); this.progressBar2.Minimum = 0; this.progressBar2.Maximum = dt.Rows.Count; this.progressBar2.Step = 1; this.progressBar2.Value = 0; string path = Drive + @"ReleasePoint.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["RaceScheduleID"].ToString() + "|" + item["RaceScheduleName"].ToString() + "|" + item["RaceScheduleCategoryID"].ToString() + "|" + item["RaceScheduleCategoryName"].ToString() + item["RaceScheduleDetailsID"].ToString() + item["LocationID"].ToString() + item["LocationName"].ToString() + item["RaceReleasePointID"].ToString() + item["LapNo"].ToString() + item["MinSpeed"].ToString() + item["DateRelease"].ToString(); sw.WriteLine(Common.Common.Encrypt(collection)); System.Threading.Thread.Sleep(50); this.progressBar2.PerformStep(); } } } }
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(); } } } }
private void EClockMasterListExport(String Drive) { DataTable dt = new DataTable(); BIZ.Member member = new BIZ.Member(); member.ClubID = ClubID; dt = member.ExportEClockMasterlist(); this.progressBar1.Minimum = 0; this.progressBar1.Maximum = dt.Rows.Count; this.progressBar1.Step = 1; this.progressBar1.Value = 0; this.label1.Text = "Exporting Masterlist Data"; string path = Drive + @"Masterlist.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["MemberID No."].ToString() + "|" + item["Name"].ToString() + "|" + item["Coordinates"].ToString(); sw.WriteLine(Common.Common.Encrypt(collection)); System.Threading.Thread.Sleep(50); this.progressBar1.PerformStep(); } } } }
private void PopulateControl() { try { txtUserID.Text = UserID.ToString(); txtUserName.Text = UserName; cmbClub.SelectedItem = ClubName; txtClubID.Text = ClubID.ToString(); } catch (Exception ex) { throw ex; } }