public frmExDataEntry(int id)
 {
     InitializeComponent();
     theAnimal = new AnimalData();
     SetMeasurements();
     SetLineWidthCombo();
 }
 public frmExDataEntry()
 {
     InitializeComponent();
     theAnimal = new AnimalData();
     btnClear.Enabled = true;
     SetMeasurements();
     SetLineWidthCombo();
 }
 public frmExDataEntry(bool IsAdd, ref DataRow row)
 {
     InitializeComponent();
     theAnimal = new AnimalData();
     SetMeasurements();
     SetLineWidthCombo();
     SetFields(ref row);
     SetButtons(IsAdd);
 }
 public frmExDataEntry(ref DataRow row)
 {
     InitializeComponent();
     theAnimal = new AnimalData();
     SetMeasurements();
     SetLineWidthCombo();
     SetFields(ref row);
     
     btnClear.Enabled = false;
 }
示例#5
0
        public void UpdateExperimentData(AnimalData theAnimal)
        {
            NpgsqlCMD = new NpgsqlCommand();

            NpgsqlCMD.CommandText = @"  update experiment_data
                                        set ex_id = :exid,
                                            modified_user = :mod_user,
                                            modified_date = :mod_date,
                                            exclude_row = :exclude,
	                                        data_agg = :data_agg
                                        where experiment_data_id = :rowID";

            NpgsqlCMD.Parameters.Add(new NpgsqlParameter("exid", NpgsqlDbType.Integer));
            NpgsqlCMD.Parameters.Add(new NpgsqlParameter("mod_user", NpgsqlDbType.Varchar));
            NpgsqlCMD.Parameters.Add(new NpgsqlParameter("data_agg", NpgsqlDbType.Varchar));
            NpgsqlCMD.Parameters.Add(new NpgsqlParameter("exclude", NpgsqlDbType.Varchar));
            NpgsqlCMD.Parameters.Add(new NpgsqlParameter("mod_date", NpgsqlDbType.Timestamp));
            NpgsqlCMD.Parameters.Add(new NpgsqlParameter("rowID", NpgsqlDbType.Integer));
            NpgsqlCMD.Parameters[0].Value = GlobalVariables.Experiment.ID;
            NpgsqlCMD.Parameters[1].Value = theAnimal.ModUser;
            NpgsqlCMD.Parameters[3].Value = theAnimal.ExcludeRow;
            NpgsqlCMD.Parameters[2].Value = theAnimal.DataAgg;
            NpgsqlCMD.Parameters[4].Value = DateTime.Now.ToLongDateString();
            NpgsqlCMD.Parameters[5].Value = theAnimal.DataID;
            GlobalVariables.GlobalConnection.updateData(NpgsqlCMD);
        }