Ejemplo n.º 1
0
        private DataTable GetData(string name)
        {
            var data = new SkillXPersonXSkillLevelDataModel();
            var dt   = SkillXPersonXSkillLevelDataManager.Search(data, SessionVariables.RequestProfile);

            return(dt);
        }
Ejemplo n.º 2
0
        protected override void ShowData(int skillXPersonXSkillLevelId)
        {
            oDetailButtonPanel.SetId = SetId;
            var data = new SkillXPersonXSkillLevelDataModel();

            data.SkillXPersonXSkillLevelId = skillXPersonXSkillLevelId;

            var dt = SkillXPersonXSkillLevelDataManager.GetDetails(data, SessionVariables.RequestProfile);

            if (dt.Rows.Count == 1)
            {
                var row = dt.Rows[0];

                lblSkillXPersonXSkillLevelId.Text = Convert.ToString(row[SkillXPersonXSkillLevelDataModel.DataColumns.SkillXPersonXSkillLevelId]);
                lblSkillLevel.Text = Convert.ToString(row[SkillXPersonXSkillLevelDataModel.DataColumns.SkillLevel]);
                lblSkill.Text      = Convert.ToString(row[SkillXPersonXSkillLevelDataModel.DataColumns.Skill]);
                lblPerson.Text     = Convert.ToString(row[SkillXPersonXSkillLevelDataModel.DataColumns.Person]);

                oUpdateInfo.LoadText(dt.Rows[0]);

                oHistoryList.Setup((int)SystemEntity.SkillXPersonXSkillLevel, skillXPersonXSkillLevelId, "SkillXPersonXSkillLevel");
                dynAuditHistory.Visible = PerferenceUtility.GetUserPreferenceByKeyAsBoolean(ApplicationCommon.HistoryGridVisibilityKey, "SkillXPersonXSkillLevel");
            }
            else
            {
                Clear();
            }
        }
Ejemplo n.º 3
0
        private System.Data.DataTable GetData()
        {
            // TODO: on all export pages
            var data = new DataModel.TaskTimeTracker.Competency.SkillXPersonXSkillLevelDataModel();

            var dt = SkillXPersonXSkillLevelDataManager.Search(data, SessionVariables.RequestProfile);

            return(dt);
        }
Ejemplo n.º 4
0
        protected override DataTable GetEntityData(int?entityKey)
        {
            var skillXPersonXSkillLeveldata = new DataModel.TaskTimeTracker.Competency.SkillXPersonXSkillLevelDataModel();

            skillXPersonXSkillLeveldata.SkillXPersonXSkillLevelId = entityKey;
            var results = SkillXPersonXSkillLevelDataManager.Search(skillXPersonXSkillLeveldata, SessionVariables.RequestProfile);

            return(results);
        }
Ejemplo n.º 5
0
        protected override void Update(Dictionary <string, string> values)
        {
            var data = new DataModel.TaskTimeTracker.Competency.SkillXPersonXSkillLevelDataModel();

            data.SkillXPersonXSkillLevelId = int.Parse(values[DataModel.TaskTimeTracker.Competency.SkillXPersonXSkillLevelDataModel.DataColumns.SkillXPersonXSkillLevelId].ToString());
            data.SkillId      = int.Parse(values[DataModel.TaskTimeTracker.Competency.SkillXPersonXSkillLevelDataModel.DataColumns.SkillId].ToString());
            data.PersonId     = int.Parse(values[DataModel.TaskTimeTracker.Competency.SkillXPersonXSkillLevelDataModel.DataColumns.PersonId].ToString());
            data.SkillLevelId = int.Parse(values[DataModel.TaskTimeTracker.Competency.SkillXPersonXSkillLevelDataModel.DataColumns.SkillLevelId].ToString());

            SkillXPersonXSkillLevelDataManager.Update(data, SessionVariables.RequestProfile);
            InlineEditingList.Data = GetData();
        }
Ejemplo n.º 6
0
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            try
            {
                string[] deleteIndexList = DeleteIds.Split(',');
                foreach (string index in deleteIndexList)
                {
                    var data = new DataModel.TaskTimeTracker.Competency.SkillXPersonXSkillLevelDataModel();
                    data.SkillXPersonXSkillLevelId = int.Parse(index);
                    SkillXPersonXSkillLevelDataManager.Delete(data, SessionVariables.RequestProfile);
                }

                DeleteAndRedirect();
            }
            catch (Exception ex)
            {
                Response.Write(ex.Message);
            }
        }
Ejemplo n.º 7
0
        public void LoadData(int skillXPersonXSkillLevelId, bool showId)
        {
            var data = new SkillXPersonXSkillLevelDataModel();

            data.SkillXPersonXSkillLevelId = skillXPersonXSkillLevelId;
            var oSkillXPersonXSkillLevelTable = SkillXPersonXSkillLevelDataManager.GetDetails(data, SessionVariables.RequestProfile);

            if (oSkillXPersonXSkillLevelTable.Rows.Count == 1)
            {
                var row = oSkillXPersonXSkillLevelTable.Rows[0];

                if (!showId)
                {
                    txtSkillXPersonXSkillLevelId.Text = Convert.ToString(row[SkillXPersonXSkillLevelDataModel.DataColumns.SkillXPersonXSkillLevelId]);

                    // only show Audit History in case of Update page, not for Clone.
                    oHistoryList.Setup((int)SystemEntity.SkillXPersonXSkillLevel, skillXPersonXSkillLevelId, "SkillXPersonXSkillLevel");
                    dynAuditHistory.Visible = PerferenceUtility.GetUserPreferenceByKeyAsBoolean(ApplicationCommon.HistoryGridVisibilityKey, "SkillXPersonXSkillLevel");
                }
                else
                {
                    txtSkillXPersonXSkillLevelId.Text = String.Empty;
                }
                txtSkillLevelId.Text = Convert.ToString(row[SkillXPersonXSkillLevelDataModel.DataColumns.SkillLevelId]);
                txtSkillId.Text      = Convert.ToString(row[SkillXPersonXSkillLevelDataModel.DataColumns.SkillId]);
                txtPersonId.Text     = Convert.ToString(row[SkillXPersonXSkillLevelDataModel.DataColumns.PersonId]);

                drpPersonList.SelectedValue     = Convert.ToString(row[SkillXPersonXSkillLevelDataModel.DataColumns.PersonId]);
                drpSkillList.SelectedValue      = Convert.ToString(row[SkillXPersonXSkillLevelDataModel.DataColumns.SkillId]);
                drpSkillLevelList.SelectedValue = Convert.ToString(row[SkillXPersonXSkillLevelDataModel.DataColumns.SkillLevelId]);
            }
            else
            {
                txtSkillXPersonXSkillLevelId.Text = String.Empty;
                txtSkillId.Text      = String.Empty;
                txtPersonId.Text     = String.Empty;
                txtSkillLevelId.Text = String.Empty;
            }
        }
Ejemplo n.º 8
0
        protected override DataTable UpdateData()
        {
            var UpdatedData = new DataTable();
            var data        = new DataModel.TaskTimeTracker.Competency.SkillXPersonXSkillLevelDataModel();

            UpdatedData = SkillXPersonXSkillLevelDataManager.Search(data, SessionVariables.RequestProfile).Clone();
            for (var i = 0; i < SelectedData.Rows.Count; i++)
            {
                data.SkillXPersonXSkillLevelId =
                    Convert.ToInt32(SelectedData.Rows[i][DataModel.TaskTimeTracker.Competency.SkillXPersonXSkillLevelDataModel.DataColumns.SkillXPersonXSkillLevelId].ToString());

                data.SkillId =
                    !string.IsNullOrEmpty(CheckAndGetRepeaterTextBoxValue(DataModel.TaskTimeTracker.Competency.SkillXPersonXSkillLevelDataModel.DataColumns.SkillId))
                    ? int.Parse(CheckAndGetRepeaterTextBoxValue(DataModel.TaskTimeTracker.Competency.SkillXPersonXSkillLevelDataModel.DataColumns.SkillId).ToString())
                    : int.Parse(SelectedData.Rows[i][DataModel.TaskTimeTracker.Competency.SkillXPersonXSkillLevelDataModel.DataColumns.SkillId].ToString());

                data.SkillLevelId =
                    !string.IsNullOrEmpty(CheckAndGetRepeaterTextBoxValue(DataModel.TaskTimeTracker.Competency.SkillXPersonXSkillLevelDataModel.DataColumns.SkillLevelId))
                     ? int.Parse(CheckAndGetRepeaterTextBoxValue(DataModel.TaskTimeTracker.Competency.SkillXPersonXSkillLevelDataModel.DataColumns.SkillLevelId).ToString())
                     : int.Parse(SelectedData.Rows[i][DataModel.TaskTimeTracker.Competency.SkillXPersonXSkillLevelDataModel.DataColumns.SkillLevelId].ToString());

                data.PersonId =
                    !string.IsNullOrEmpty(CheckAndGetRepeaterTextBoxValue(DataModel.TaskTimeTracker.Competency.SkillXPersonXSkillLevelDataModel.DataColumns.PersonId))
                     ? int.Parse(CheckAndGetRepeaterTextBoxValue(DataModel.TaskTimeTracker.Competency.SkillXPersonXSkillLevelDataModel.DataColumns.PersonId).ToString())
                     : int.Parse(SelectedData.Rows[i][DataModel.TaskTimeTracker.Competency.SkillXPersonXSkillLevelDataModel.DataColumns.PersonId].ToString());

                SkillXPersonXSkillLevelDataManager.Update(data, SessionVariables.RequestProfile);
                data = new DataModel.TaskTimeTracker.Competency.SkillXPersonXSkillLevelDataModel();
                data.SkillXPersonXSkillLevelId = Convert.ToInt32(SelectedData.Rows[i][DataModel.TaskTimeTracker.Competency.SkillXPersonXSkillLevelDataModel.DataColumns.SkillXPersonXSkillLevelId].ToString());
                var dt = SkillXPersonXSkillLevelDataManager.Search(data, SessionVariables.RequestProfile);

                if (dt.Rows.Count == 1)
                {
                    UpdatedData.ImportRow(dt.Rows[0]);
                }
            }
            return(UpdatedData);
        }
Ejemplo n.º 9
0
        protected override DataTable GetData()
        {
            try
            {
                var superKey = ApplicationCommon.GetSuperKey();
                var setId    = ApplicationCommon.GetSetId();

                var selectedrows = new DataTable();
                var skillXPersonXSkillLeveldata = new DataModel.TaskTimeTracker.Competency.SkillXPersonXSkillLevelDataModel();

                selectedrows = SkillXPersonXSkillLevelDataManager.GetDetails(skillXPersonXSkillLeveldata, SessionVariables.RequestProfile).Clone();
                if (!string.IsNullOrEmpty(SuperKey))
                {
                    var systemEntityTypeId = (int)PrimaryEntity;
                    var lstEntityKeys      = ApplicationCommon.GetSuperKeyDetails(systemEntityTypeId, SuperKey);

                    foreach (var entityKey in lstEntityKeys)
                    {
                        skillXPersonXSkillLeveldata.SkillLevelId = entityKey;
                        var result = SkillXPersonXSkillLevelDataManager.GetDetails(skillXPersonXSkillLeveldata, SessionVariables.RequestProfile);
                        selectedrows.ImportRow(result.Rows[0]);
                    }
                }
                else
                {
                    skillXPersonXSkillLeveldata.SkillLevelId = SetId;
                    var result = SkillXPersonXSkillLevelDataManager.GetDetails(skillXPersonXSkillLeveldata, SessionVariables.RequestProfile);
                    selectedrows.ImportRow(result.Rows[0]);
                }
                return(selectedrows);
            }
            catch (Exception ex)
            {
                Response.Write(ex.Message);
            }

            return(null);
        }
Ejemplo n.º 10
0
        protected override DataTable GetData()
        {
            var dt = SkillXPersonXSkillLevelDataManager.Search(oSearchFilter.SearchParameters, SessionVariables.RequestProfile);

            return(dt);
        }