public string EditAssociate(Associate.Associate associate)
 {
     int AssociateID = Convert.ToInt32(associate.id);
     int ProjectID = Convert.ToInt32(associate.ProjectName);
     int LocationID = Convert.ToInt32(associate.Location);
     int DesignationID = Convert.ToInt32(associate.Designation);
     using (AssociateConnDataContext asscon = new AssociateConnDataContext())
     {
         try
         {
             int retasct = 0;
             retasct = asscon.Edit_Associate(AssociateID, associate.DirectReportID, associate.DOB, associate.DOJ, associate.email, associate.FirstName, associate.IsActive, associate.LastName, associate.Mobile, associate.ModifiedBy, DesignationID, LocationID, ProjectID);
             //foreach (var Adrs in associate.Address)
             //{
             //    retadd=asscon.Edit_Address(associate.AssociateID, Adrs.Address1, Adrs.Address2, Adrs.Address3, Adrs.City, Adrs.State, Adrs.Country, Adrs.Zip, Adrs.AddressTypeID);
             //}
             //foreach (var Phn in associate.Phones)
             //{
             //    retphn=asscon.Edit_Phone(associate.AssociateID, Phn.PhoneNo, Phn.PhoneTypeID);
             //}
             if (!(retasct == 0))
                 return "success";
             else
                 return "failure";
         }
         catch (Exception ex)
         {
             throw ex;
         }
     }
 }