public EmployeeControl(EmployeeItem item)
     : this()
 {
     needCheckBox.Checked = item.NeedToSend;
     nameLabel.Text = item.Name;
     statusComboBox.Text = item.Status;
 }
Exemple #2
0
 public EmployeeControl(EmployeeItem item)
     : this()
 {
     needCheckBox.Checked = item.NeedToSend;
     nameLabel.Text       = item.Name;
     statusComboBox.Text  = item.Status;
 }
Exemple #3
0
        public IList <EmployeeItem> GetList()
        {
            List <EmployeeItem> result = new List <EmployeeItem>();

            foreach (var item in _data)
            {
                result.Add(EmployeeItem.ParseFromString(item));
            }
            return(result);
        }
        public void EmployeeItemTest_ToString()
        {
            var item = new EmployeeItem() { Name = "n", NeedToSend = false, Status = "s" };
            Assert.AreEqual("n;s;0", item.ToString());

            item.Name = string.Empty;
            Assert.AreEqual(";s;0", item.ToString());

            item.Name = null;
            Assert.AreEqual(";s;0", item.ToString());

            item.NeedToSend = true;
            Assert.AreEqual(";s;1", item.ToString());

            item.Status = "!!!";
            Assert.AreEqual(";!!!;1", item.ToString());
        }