コード例 #1
0
 protected void Insert_fields(object sender, EntityDataSourceChangingEventArgs e)
 {
     YASA_PL.Task c = (YASA_PL.Task)e.Entity;
     if (c != null)
     {
         c.TaskStatusId          = 1;
         c.Date_created_modified = DateTime.Now;
         c.UserId = Convert.ToInt32(HttpContext.Current.User.Identity.Name);
     }
 }
コード例 #2
0
 protected void Insert_fields(object sender, EntityDataSourceChangingEventArgs e)
 {
     YASA_PL.Task c = (YASA_PL.Task)e.Entity;
     if (c != null)
     {
         if (c.UserIdTask == Convert.ToInt32(HttpContext.Current.User.Identity.Name))
         {
             c.TaskStatusId = 3;
             c.EndDate      = DateTime.Now;
         }
     }
 }