Example #1
0
        private void UpdatedFKDepenedencies(int oldId, int newId)
        {
            try
            {
                var ClientXProjectdt = ClientXProjectDataManager.GetByProject(oldId, SessionVariables.RequestProfile.AuditId);
                var ProjectIds       = new int[ClientXProjectdt.Rows.Count];
                for (var i = 0; i < ClientXProjectdt.Rows.Count; i++)
                {
                    ProjectIds[i] = int.Parse(ClientXProjectdt.Rows[i][ClientXProjectDataModel.DataColumns.ProjectId].ToString());
                }
                if (ProjectIds.Length > 0)
                {
                    ClientXProjectDataManager.DeleteByProject(oldId, SessionVariables.RequestProfile.AuditId);
                    ClientXProjectDataManager.CreateByProject(newId, ProjectIds, SessionVariables.RequestProfile);
                }

                var projectxneeddt = ClientXProjectDataManager.GetByProject(oldId, SessionVariables.RequestProfile.AuditId);
                var needIds        = new int[ClientXProjectdt.Rows.Count];
                for (var i = 0; i < projectxneeddt.Rows.Count; i++)
                {
                    needIds[i] = int.Parse(projectxneeddt.Rows[i][ProjectXNeedDataModel.DataColumns.NeedId].ToString());
                }
                if (needIds.Length > 0)
                {
                    ProjectXNeedDataManager.DeleteByProject(oldId, SessionVariables.RequestProfile);
                    ProjectXNeedDataManager.CreateByProject(newId, needIds, SessionVariables.RequestProfile);
                }
            }
            catch (Exception ex)
            {
                Response.Write(ex.Message);
            }
        }
Example #2
0
        private void SaveByProject(int projectId, List <int> needIds)
        {
            var id = Convert.ToInt32(drpProject.SelectedValue);

            ProjectXNeedDataManager.DeleteByProject(id, SessionVariables.RequestProfile);
            ProjectXNeedDataManager.CreateByProject(id, needIds.ToArray(), SessionVariables.RequestProfile);
        }
Example #3
0
 private void SaveNeedXProject(int projectId, List <int> NeedIds)
 {
     ProjectXNeedDataManager.DeleteByProject(projectId, SessionVariables.RequestProfile);
     ProjectXNeedDataManager.CreateByProject(projectId, NeedIds.ToArray(), SessionVariables.RequestProfile);
 }