Example #1
0
        private void LineRename_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            var row = ComboTemperature.SelectedItem as DataRowView;

            if (row == null)
            {
                return;
            }


            var temperature = new Sys_Temperature()
            {
                ID           = Convert.ToInt32(row.Row["ID"]),
                TestRoomCode = Convert.ToString(row.Row["TestRoomCode"]),
                CreateTime   = Convert.ToString(row.Row["CreateTime"]),
                CreateBy     = Convert.ToString(row.Row["CreateBy"]),
                IsSystem     = Convert.ToInt32(row.Row["IsSystem"]),
                Name         = Convert.ToString(row.Row["Name"])
            };

            var form = new TemperatureEditor(temperature);

            if (form.ShowDialog() == DialogResult.OK)
            {
                ComboTemperature.DataSource = TemperatureHelperClient.GetTemperatureTypes(TestRoomCode);
            }
        }
Example #2
0
        private void LinkCustom_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            var form = new TemperatureEditor(TestRoomCode);

            if (form.ShowDialog() == DialogResult.OK)
            {
                ComboTemperature.DataSource = TemperatureHelperClient.GetTemperatureTypes(TestRoomCode);
            }
        }