コード例 #1
0
       public bool Create(DataMembers obj)
        {

            StatusReport StatusTable = new StatusReport();
            StatusTable.StatusText = obj.Text;
            StatusTable.StatusTitle = obj.Title;
            StatusTable.WorkPacRefId = obj.WorkPacId;
            StatusTable.StatusDate = obj.Date;
            var _req = from req in ent.WorkPacRefs
            select req;
            foreach (WorkPacRef w in _req)
            {
                if (obj.WorkPacId == w.WorkPacRefId)
                {
                    ent.StatusReports.InsertOnSubmit(StatusTable);
                    ent.SubmitChanges();
                    return true;
                }
                else
                {
                   
                }
            }
            return false;
         }
コード例 #2
0
		private void detach_StatusReports(StatusReport entity)
		{
			this.SendPropertyChanging();
			entity.WorkPacRef = null;
		}
コード例 #3
0
 partial void DeleteStatusReport(StatusReport instance);
コード例 #4
0
 partial void UpdateStatusReport(StatusReport instance);
コード例 #5
0
 partial void InsertStatusReport(StatusReport instance);
コード例 #6
0
        public DataMembers Edit(int Id)
        {
            StatusReport StatusTable = new StatusReport();
            DataMembers data = new DataMembers();
            var _edit = from req in ent.StatusReports
                        where req.StatusId == Id
                        select req;

            data.Title = _edit.First().StatusTitle;
            data.Text = _edit.First().StatusText;
            data.Date = _edit.First().StatusDate;
            data.WorkPacId = _edit.First().WorkPacRefId;
            return data;

        }