Exemple #1
0
 protected void lstEmployee_ItemCommand(object sender, ListViewCommandEventArgs e)
 {
     if (e.CommandName == "Del")
     {
         int id = Convert.ToInt32(e.CommandArgument);
         AssociateServices ascServices = new AssociateServices();
         ascServices.DeleteAssociate(id);
         BindData();
         successMessage.Text = "Associate successfully terminated.";
     }
 }
Exemple #2
0
        public void Test_for_DeleteAssociate()
        {
            Associate associate = new Associate()
            {
                AssociateId = 1,
            };


            var Result = _AssociateServices.DeleteAssociate(associate.AssociateId);

            Assert.True(Result);
        }