Esempio n. 1
0
    protected void DetailsDataSource_Inserting(object sender, EntityDataSourceChangingEventArgs e)
    {
        YASA_PL.Comment c = (YASA_PL.Comment)e.Entity;
        if (c != null)
        {
            c.Date_created         = DateTime.Now;
            c.UserId               = Convert.ToInt32(HttpContext.Current.User.Identity.Name);
            Session["Record_Info"] = "Edycja rekordu zakończona poprawnie";
            if (c.TaskId != null)
            {
                redirectlink = "~/TaskSet/Details.aspx?Id=" + c.TaskId;
            }

            if (c.NotificationId != null)
            {
                redirectlink = "~/NotificationSet/Details.aspx?Id=" + c.NotificationId;
            }

            if (c.Customer_PartId != null)
            {
                redirectlink = "~/Customer_PartSet/Details.aspx?Id=" + c.Customer_PartId;
            }

            if (c.Customer_ProductId != null)
            {
                redirectlink = "~/Customer_ProductSet/Details.aspx?Id=" + c.Customer_PartId;
            }
        }
    }
Esempio n. 2
0
 protected void DetailsDataSource_Inserting(object sender, EntityDataSourceChangingEventArgs e)
 {
     YASA_PL.Comment c = (YASA_PL.Comment)e.Entity;
     if (c != null)
     {
         c.Date_created = DateTime.Now;
         c.UserId       = Convert.ToInt32(HttpContext.Current.User.Identity.Name);
     }
 }