Click here to Skip to main content
15,919,245 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,i am newbie for sharepoint.

our aim is to save end user career details and resume in to the customlist.

we saved the career details. but we cannot able to attach the reusme to the custom list attachment.

we generated entity class for custom list.

we have manager class and business validation class.

from user control we pass the EntityClass Item and its value to validation class.

from there it calls busniess layer to save the details in to column.

where as for resume we cannot attach the documents to list attachment.

please help me. [email removed]

from the entity class i don't see any column value for attachment.

from user control on click event for save.
-------------------------------------------------
C#
public bool SaveApplications()
       {


           //List<FertilVacancyApplicationsItem> lstpage = new List<FertilVacancyApplicationsItem>();
           FertilApplicantsValidation = new FertilApplicantsValidation();


           FertilVacancyApplicationsItem item = new FertilVacancyApplicationsItem();



           item.ApplicantName = txtName.Text.ToString().Trim();
           item.ApplicantEmail = txtEmail.Text.ToString().Trim();
           item.ApplicantContactNumber = txtContact.Text.ToString().Trim();
           item.ApplicationDate = DateTime.Now;
           item.VaccantidId.Add(int.Parse(VaccantID));


           FertilApplicantsValidation = new FertilApplicantsValidation();


           return FertilApplicantsValidation.SaveFertilApplicnats(URL, item);
       }




-----------------------
from Validation class

C#
public bool SaveFertilApplicnats(string webUrl, FertilVacancyApplicationsItem item)
       {
           bool isSave = false;

           try
           {
               using (FertilVacancyManager manager = new FertilVacancyManager(webUrl))
               {
                   isSave = manager.saveFertilApplicantsData(item);

               }
           }
           catch (Exception ex)
           {
               Logger.Instance.Error("FertilVacancyValidation_getFertilApplicantsData", ex);
           }
           return isSave;
       }

----------------
from Manager class:

C#
public bool saveFertilApplicantsData(FertilVacancyApplicationsItem item)
     {

         try
         {

             using (ContextSwitch cSwitch = new ContextSwitch())
             {
                 m_ApplicantsdataContext = cSwitch.GetFertilApplicantsDataContext(m_webUrl);
                 m_ApplicantsdataContext.FertilVacancyApplications.InsertOnSubmit(item);

                 m_ApplicantsdataContext.SubmitChanges();
             }
         }
         catch (Exception ex)
         {
             Logger.Instance.Error("VacancyManager_getFertilApplicantsData", ex);
             return false;
         }
         return true;
     }
Posted
Updated 23-Sep-11 2:47am
v2
Comments
DaveAuld 23-Sep-11 8:47am    
Edit: Do not post your email, you will rcv a notification when someone responds.

1 solution

Hi,

This links will support for you.

http://msdn.microsoft.com/en-us/library/lists.lists.addattachment(v=office.12).aspx
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spattachmentcollection.aspx
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900