Пример #1
0
        protected override void Update(Dictionary <string, string> values)
        {
            var data = new TaskXDeliverableArtifactDataModel();

            PropertyMapper.CopyProperties(data, values);

            TaskXDeliverableArtifactDataManager.Update(data, SessionVariables.RequestProfile);
            base.Update(values);
        }
Пример #2
0
        protected override DataTable UpdateData()
        {
            var UpdatedData = new DataTable();

            var data = new TaskXDeliverableArtifactDataModel();

            UpdatedData = TaskXDeliverableArtifactDataManager.Search(data, SessionVariables.RequestProfile).Clone();
            for (var i = 0; i < SelectedData.Rows.Count; i++)
            {
                data.TaskXDeliverableArtifactId =
                    Convert.ToInt32(SelectedData.Rows[i][TaskXDeliverableArtifactDataModel.DataColumns.TaskXDeliverableArtifactId].ToString());
                data.TaskId =
                    !string.IsNullOrEmpty(CheckAndGetRepeaterTextBoxValue(TaskXDeliverableArtifactDataModel.DataColumns.TaskId))
                                        ? int.Parse(CheckAndGetRepeaterTextBoxValue(TaskXDeliverableArtifactDataModel.DataColumns.TaskId))
                                        : int.Parse(SelectedData.Rows[i][TaskXDeliverableArtifactDataModel.DataColumns.TaskId].ToString());
                data.DeliverableArtifactId =
                    !string.IsNullOrEmpty(CheckAndGetRepeaterTextBoxValue(TaskXDeliverableArtifactDataModel.DataColumns.DeliverableArtifactId))
                                        ? int.Parse(CheckAndGetRepeaterTextBoxValue(TaskXDeliverableArtifactDataModel.DataColumns.DeliverableArtifactId))
                                        : int.Parse(SelectedData.Rows[i][TaskXDeliverableArtifactDataModel.DataColumns.DeliverableArtifactId].ToString());

                data.DeliverableArtifactStatusId =
                    !string.IsNullOrEmpty(CheckAndGetRepeaterTextBoxValue(TaskXDeliverableArtifactDataModel.DataColumns.DeliverableArtifactStatusId))
                                                                ? int.Parse(CheckAndGetRepeaterTextBoxValue(TaskXDeliverableArtifactDataModel.DataColumns.DeliverableArtifactStatusId).ToString())
                                                                : int.Parse(SelectedData.Rows[i][TaskXDeliverableArtifactDataModel.DataColumns.DeliverableArtifactStatusId].ToString());

                TaskXDeliverableArtifactDataManager.Update(data, SessionVariables.RequestProfile);
                data = new TaskXDeliverableArtifactDataModel();
                data.TaskXDeliverableArtifactId = Convert.ToInt32(SelectedData.Rows[i][TaskXDeliverableArtifactDataModel.DataColumns.TaskXDeliverableArtifactId].ToString());
                var dt = TaskXDeliverableArtifactDataManager.Search(data, SessionVariables.RequestProfile);

                if (dt.Rows.Count == 1)
                {
                    UpdatedData.ImportRow(dt.Rows[0]);
                }
            }
            return(UpdatedData);
        }