示例#1
0
        private void loadCrewLabels(int inmateId, string row)
        {
            string     label  = "lblSawStatus" + row;
            InmateData inmate = new InmateData(inmateId);


            this.Controls[label].Text      = inmate.SawStatus;
            this.Controls[label].ForeColor = new System.Drawing.Color();
            this.Controls[label].Visible   = true;
            label = "lblLaundry" + row;
            this.Controls[label].Text      = inmate.LaundryNumber;
            this.Controls[label].ForeColor = new System.Drawing.Color();
            this.Controls[label].Visible   = true;
            label = "lblHousing" + row;
            this.Controls[label].Text                        = inmate.HousingNumber;
            this.Controls[label].ForeColor                   = new System.Drawing.Color();
            this.Controls[label].Visible                     = true;
            this.Controls["lblEthnicity" + row].Text         = inmate.Ethnicity;
            this.Controls["lblEthnicity" + row].ForeColor    = new System.Drawing.Color();
            this.Controls["lblEthnicity" + row].Visible      = true;
            this.Controls["lblFlightWeight" + row].Text      = inmate.FlightWeight;
            this.Controls["lblFlightWeight" + row].ForeColor = new System.Drawing.Color();
            this.Controls["lblFlightWeight" + row].Visible   = true;
            //this.Refresh();
        }
示例#2
0
        public static string ShortName(int id)
        {
            InmateData inmate = new InmateData(id);
            string     inmateReturn;

            inmateReturn = inmate.LabelName;
            return(inmateReturn);
        }
示例#3
0
        private void button3_Click(object sender, EventArgs e)
        {
            InmateData i = new InmateData();

            i.GetData(7);
            i.CDCRNumber = "ZZ-4321";
            i.FirstName  = "PacMan";
            i.LastName   = "Jones";
            i.WriteData();
            i = null;
        }
示例#4
0
        private void button1_Click(object sender, EventArgs e)
        {
            InmateData i = new InmateData();

            i.GetData(7);
            Console.WriteLine("EPRD: " + i.EPRD);
            Console.WriteLine("Saw Status: " + i.SawStatus);
            Console.WriteLine("Grade Eligible: " + i.GradeEligible);
            Console.WriteLine("Special Status: " + i.SawStatus);
            i = null;
        }
示例#5
0
 public void GetCrew()
 {
     using (OleDbConnection conn = new OleDbConnection(connString))
     {
         try
         {
             conn.Open();
             OleDbDataReader reader  = null;
             OleDbCommand    command = new OleDbCommand("SELECT * FROM crew WHERE id=@1", conn);
             command.Parameters.AddWithValue("@1", crewNum);
             reader = command.ExecuteReader();
             while (reader.Read())
             {
                 //id = (int)reader["id"];
                 firstSaw      = ((int)reader["firstSaw"]) == 0 ? new InmateData() :new InmateData((int)reader["firstSaw"]);
                 firstPuller   = ((int)reader["firstPuller"]) == 0 ? new InmateData() : new InmateData((int)reader["firstPuller"]);
                 secondSaw     = ((int)reader["secondSaw"]) == 0 ? new InmateData() : new InmateData((int)reader["secondSaw"]);
                 secondPuller  = ((int)reader["secondPuller"]) == 0 ? new InmateData() : new InmateData((int)reader["secondPuller"]);
                 rhino         = ((int)reader["rhino"]) == 0 ? new InmateData() : new InmateData((int)reader["rhino"]);
                 firstPulaski  = ((int)reader["firstPulaski"]) == 0 ? new InmateData() : new InmateData((int)reader["firstPulaski"]);
                 secondPulaski = ((int)reader["secondPulaski"]) == 0 ? new InmateData() : new InmateData((int)reader["secondPulaski"]);
                 thirdPulaski  = ((int)reader["thirdPulaski"]) == 0 ? new InmateData() : new InmateData((int)reader["thirdPulaski"]);
                 fourthPulaski = ((int)reader["fourthPulaski"]) == 0 ? new InmateData() : new InmateData((int)reader["fourthPulaski"]);
                 fifthPulaski  = ((int)reader["fifthPulaski"]) == 0 ? new InmateData() : new InmateData((int)reader["fifthPulaski"]);
                 firstPulaski  = ((int)reader["firstPulaski"]) == 0 ? new InmateData() : new InmateData((int)reader["firstPulaski"]);
                 firstMcLeod   = ((int)reader["firstMcLeod"]) == 0 ? new InmateData() : new InmateData((int)reader["firstMcLeod"]);
                 secondMcLeod  = ((int)reader["secondMcLeod"]) == 0 ? new InmateData() : new InmateData((int)reader["secondMcLeod"]);
                 thirdMcLeod   = ((int)reader["thirdMcLeod"]) == 0 ? new InmateData() : new InmateData((int)reader["thirdMcLeod"]);
                 fourthMcLeod  = ((int)reader["fourthMcLeod"]) == 0 ? new InmateData() : new InmateData((int)reader["fourthMcLeod"]);
                 fifthMcLeod   = ((int)reader["fifthMcLeod"]) == 0 ? new InmateData() : new InmateData((int)reader["fifthMcLeod"]);
                 dragspoon     = ((int)reader["dragspoon"]) == 0 ? new InmateData() : new InmateData((int)reader["dragspoon"]);
                 swamper       = ((int)reader["swamper"]) == 0 ? new InmateData() : new InmateData((int)reader["swamper"]);
                 captain       = ((int)reader["captain"]) == 0 ? new Staff() : new Staff((int)reader["captain"]);
                 vehicle       = ((int)reader["vehicle"]) == 0 ? new Vehicle() : new Vehicle((int)reader["vehicle"]);
             }
         }
         catch (Exception ex)
         {
             System.Windows.Forms.DialogResult result = System.Windows.Forms.MessageBox.Show(ex.ToString(), "Getting Crew Information");
             //throw;
         }
     }
 }
示例#6
0
 public AddEditInmate(int id, FormMode mode)
 {
     InitializeComponent();
     inmate = new InmateData();
     inmate.CampDataUpdated += Inmate_CampDataUpdated;
     formMode = mode;
     if (mode == FormMode.Edit)
     {
         lblCaption.Text = "Edit Inmate Information";
         this.Text       = "Edit Inmate Information";
         inmate.GetData(id);
         addData();
         cboParoled.SelectedItem = "No";
     }
     else
     {
         lblCaption.Text           = "Add Inmate to Database";
         this.Text                 = "Add Inmate Information";
         cboSawStatus.SelectedItem = "None";
         cboParoled.SelectedItem   = "No";
     }
     lblDataSaved.Visible = false;
     formChanged          = false;
 }
示例#7
0
        private void Form1_Load(object sender, EventArgs e)
        {
            InmateData i = new InmateData();

            getCounts();
        }
示例#8
0
 public Form1()
 {
     //InmateData listItems = new InmateData();
     inmate = new InmateData();
     InitializeComponent();
 }