/// <summary> /// Captures the change in TaskStartDate /// </summary> partial void TaskStartDate_Changed() { //newCopt = this.DataWorkspace.MDSData.CADOfficeProjTS.AddNew(); newCopt.UserName = this.Application.User.FullName; newCopt.StartDate = TaskStartDate; newCopt.Month = TaskStartDate.Month; newCopt.Year = TaskStartDate.Year; string shortMonth = TaskStartDate.ToString("MMMyyyy"); newCopt.COPTNumber = shortMonth + "-" + newCopt.UserName; }
partial void TaskStartDate_Changed() { if (copt != null) { copt.UserName = this.Application.User.FullName; copt.StartDate = TaskStartDate; copt.Month = TaskStartDate.Month; copt.Year = TaskStartDate.Year; string shortMonth = TaskStartDate.ToString("MMMyyyy"); copt.COPTNumber = shortMonth + "-" + copt.UserName; } }
partial void MatrixStaffMember_Changed() { copt.Project = SelectedProject; copt.UserName = this.Application.User.FullName; copt.Customer = SelectedProject.Customer.CustomerName; copt.CustomerOrderNo = SelectedProject.CustomerOrderNumber; copt.MatrixSalesOrderNo = SelectedProject.MatrixSalesOrderNumber; copt.CustomerProjectCode = SelectedProject.CustomerProjectCode; copt.MatrixProjectCode = SelectedProject.MatrixProjectCode; int ProjectCOPTCount = SelectedProject.CADOfficeProjTS.Count(); string COPTId = Convert.ToString(ProjectCOPTCount); string str = SelectedProject.CustomerProjectCode + "-COPT"; char pad = '0'; string shortMonth = TaskStartDate.ToString("MMMyyyy"); copt.COPTNumber = shortMonth + "-" + str + COPTId.PadLeft(5, pad) + "-" + copt.UserName; }