create 2 document library a and b add content approval for "A"
with using of the event receiver. Approval document send to another specified document library
/*******************************************************************************************************************************************************************************************/ i have written this code plz say me where i have did wrong
namespace EventReceiverProject1.EventReceiver1 { /// /// List Item Events /// public class EventReceiver1 : SPItemEventReceiver {
This comment has been removed by the author.
ReplyDeletecreate 2 document library a and b add content approval for "A"
ReplyDeletewith using of the event receiver. Approval document send to another specified document library
/*******************************************************************************************************************************************************************************************/
i have written this code plz say me where i have did wrong
namespace EventReceiverProject1.EventReceiver1
{
///
/// List Item Events
///
public class EventReceiver1 : SPItemEventReceiver
{
public override void ItemUpdated(SPItemEventProperties properties)
{
base.ItemUpdated(properties);
SPListItem item = properties.ListItem;
if (properties.ListItem["Approval Status"].ToString() == "Approved")
{
string destination = item.ParentList.RootFolder.Name + "/bbb/" + item.File.Name;
item.File.CopyTo(destination, true);
}
}
}
}