SPList lst = properties.Web.GetList(properties.WebUrl + "/Lists/ListName1/AllItems.aspx");
if (lst != null && lst.ID == properties.ListId)
{
SPList lstRes = properties.Web.GetList(properties.WebUrl + "/Lists/ListName/AllItems.aspx");
if (lstRes != null)
{
string str =Convert.ToString(properties.ListItem["Title"]);
int res =Convert.ToInt16(properties.ListItem["Marks"]);
SPListItem itm = lstRes.Items.Add();
if (res >= 40)
itm["Title"] = "Pass";
else
itm["Title"] = "Fail";
itm.Update();
}
}
if (lst != null && lst.ID == properties.ListId)
{
SPList lstRes = properties.Web.GetList(properties.WebUrl + "/Lists/ListName/AllItems.aspx");
if (lstRes != null)
{
string str =Convert.ToString(properties.ListItem["Title"]);
int res =Convert.ToInt16(properties.ListItem["Marks"]);
SPListItem itm = lstRes.Items.Add();
if (res >= 40)
itm["Title"] = "Pass";
else
itm["Title"] = "Fail";
itm.Update();
}
}
No comments:
Post a Comment