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> ClientIds)
        {
            var id = Convert.ToInt32(drpProject.SelectedValue);

            ClientXProjectDataManager.DeleteByProject(id, SessionVariables.RequestProfile.AuditId);
            ClientXProjectDataManager.CreateByProject(id, ClientIds.ToArray(), SessionVariables.RequestProfile);
        }
Example #3
0
 private void SaveClientXProject(int projectId, List <int> ClientIds)
 {
     ClientXProjectDataManager.DeleteByProject(projectId, SessionVariables.RequestProfile.AuditId);
     ClientXProjectDataManager.CreateByProject(projectId, ClientIds.ToArray(), SessionVariables.RequestProfile);
 }