예제 #1
0
        public void LoadData(int milestoneFeatureStateId, bool showId)
        {
            Clear();

            var data = new MilestoneFeatureStateDataModel();

            data.MilestoneFeatureStateId = milestoneFeatureStateId;

            var items = MilestoneFeatureStateDataManager.GetEntityDetails(data, SessionVariables.RequestProfile);

            if (items.Count != 1)
            {
                return;
            }

            var item = items[0];

            SetData(item);

            if (!showId)
            {
                SystemKeyId = item.MilestoneFeatureStateId;
                oHistoryList.Setup(PrimaryEntity, milestoneFeatureStateId, PrimaryEntityKey);
            }
            else
            {
                CoreSystemKey.Text = String.Empty;
            }
        }
예제 #2
0
        protected override void Update(Dictionary <string, string> values)
        {
            var data = new MilestoneFeatureStateDataModel();

            if (values.ContainsKey(MilestoneFeatureStateDataModel.DataColumns.MilestoneFeatureStateId))
            {
                data.MilestoneFeatureStateId = int.Parse(values[MilestoneFeatureStateDataModel.DataColumns.MilestoneFeatureStateId]);
            }

            if (values.ContainsKey(StandardDataModel.StandardDataColumns.Name))
            {
                data.Name = values[StandardDataModel.StandardDataColumns.Name];
            }

            if (values.ContainsKey(StandardDataModel.StandardDataColumns.Description))
            {
                data.Description = values[StandardDataModel.StandardDataColumns.Description];
            }

            if (values.ContainsKey(StandardDataModel.StandardDataColumns.SortOrder))
            {
                data.SortOrder = int.Parse(values[StandardDataModel.StandardDataColumns.SortOrder]);
            }

            MilestoneFeatureStateDataManager.Update(data, SessionVariables.RequestProfile);
            base.Update(values);
        }
예제 #3
0
        public override int?Save(string action)
        {
            var data = new MilestoneFeatureStateDataModel();

            data.MilestoneFeatureStateId = SystemKeyId;
            data.Name        = Name;
            data.Description = Description;
            data.SortOrder   = SortOrder;

            if (action == "Insert")
            {
                var dtMilestoneFeatureState = MilestoneFeatureStateDataManager.DoesExist(data, SessionVariables.RequestProfile);

                if (dtMilestoneFeatureState.Rows.Count == 0)
                {
                    MilestoneFeatureStateDataManager.Create(data, SessionVariables.RequestProfile);
                }
                else
                {
                    throw new Exception("Record with given ID already exists.");
                }
            }
            else
            {
                MilestoneFeatureStateDataManager.Update(data, SessionVariables.RequestProfile);
            }

            return(data.MilestoneFeatureStateId);
        }
예제 #4
0
        protected override DataTable UpdateData()
        {
            var UpdatedData = new DataTable();

            var data = new MilestoneFeatureStateDataModel();

            UpdatedData = MilestoneFeatureStateDataManager.Search(data, SessionVariables.RequestProfile).Clone();
            for (var i = 0; i < SelectedData.Rows.Count; i++)
            {
                data.MilestoneFeatureStateId =
                    Convert.ToInt32(SelectedData.Rows[i][MilestoneFeatureStateDataModel.DataColumns.MilestoneFeatureStateId].ToString());
                data.Name        = SelectedData.Rows[i][StandardDataModel.StandardDataColumns.Name].ToString();
                data.Description =
                    !string.IsNullOrEmpty(CheckAndGetRepeaterTextBoxValue(StandardDataModel.StandardDataColumns.Description))
                                        ? CheckAndGetRepeaterTextBoxValue(StandardDataModel.StandardDataColumns.Description)
                                        : SelectedData.Rows[i][StandardDataModel.StandardDataColumns.Description].ToString();

                data.SortOrder =
                    !string.IsNullOrEmpty(CheckAndGetRepeaterTextBoxValue(StandardDataModel.StandardDataColumns.SortOrder))
                                        ? int.Parse(CheckAndGetRepeaterTextBoxValue(StandardDataModel.StandardDataColumns.SortOrder))
                                        : int.Parse(SelectedData.Rows[i][StandardDataModel.StandardDataColumns.SortOrder].ToString());

                MilestoneFeatureStateDataManager.Update(data, SessionVariables.RequestProfile);
                data = new MilestoneFeatureStateDataModel();
                data.MilestoneFeatureStateId = Convert.ToInt32(SelectedData.Rows[i][MilestoneFeatureStateDataModel.DataColumns.MilestoneFeatureStateId].ToString());
                var dt = MilestoneFeatureStateDataManager.Search(data, SessionVariables.RequestProfile);

                if (dt.Rows.Count == 1)
                {
                    UpdatedData.ImportRow(dt.Rows[0]);
                }
            }
            return(UpdatedData);
        }
예제 #5
0
        protected override DataTable GetEntityData(int?entityKey)
        {
            var milestoneFeatureStatedata = new MilestoneFeatureStateDataModel();

            milestoneFeatureStatedata.MilestoneFeatureStateId = entityKey;
            var results = MilestoneFeatureStateDataManager.Search(milestoneFeatureStatedata, SessionVariables.RequestProfile);

            return(results);
        }
예제 #6
0
        private DataTable GetData()
        {
            // TODO: on all export pages
            var data = new MilestoneFeatureStateDataModel();

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

            return(dt);
        }
예제 #7
0
        private DataTable GetData(string name)
        {
            var data = new MilestoneFeatureStateDataModel();

            data.Name = name;

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

            return(dt);
        }
예제 #8
0
        private void UpdateData(ArrayList values)
        {
            var data = new MilestoneFeatureStateDataModel();

            data.MilestoneFeatureStateId = int.Parse(values[0].ToString());
            data.Name        = values[1].ToString();
            data.Description = values[2].ToString();
            data.SortOrder   = int.Parse(values[3].ToString());
            MilestoneFeatureStateDataManager.Update(data, SessionVariables.RequestProfile);
            ReBindEditableGrid();
        }
예제 #9
0
 protected void btnDelete_Click(object sender, EventArgs e)
 {
     try
     {
         string[] deleteIndexList = DeleteIds.Split(',');
         foreach (string index in deleteIndexList)
         {
             var data = new MilestoneFeatureStateDataModel();
             data.MilestoneFeatureStateId = int.Parse(index);
             MilestoneFeatureStateDataManager.Delete(data, SessionVariables.RequestProfile);
             DeleteAndRedirect();
         }
     }
     catch (Exception ex)
     {
         Response.Write(ex.Message);
     }
 }
예제 #10
0
        public override void LoadDropDownListSources(string fieldName, DropDownList dropDownListControl)
        {
            base.LoadDropDownListSources(fieldName, dropDownListControl);

            if (fieldName.Equals("MilestoneId"))
            {
                var milestoneData = MilestoneDataManager.GetList(SessionVariables.RequestProfile);
                UIHelper.LoadDropDown(milestoneData, dropDownListControl, StandardDataModel.StandardDataColumns.Name, MilestoneDataModel.DataColumns.MilestoneId);
            }

            if (fieldName.Equals("MilestoneFeatureStateId"))
            {
                var milestoneFeatureStateData = MilestoneFeatureStateDataManager.GetList(SessionVariables.RequestProfile);
                UIHelper.LoadDropDown(milestoneFeatureStateData, dropDownListControl, StandardDataModel.StandardDataColumns.Name, MilestoneFeatureStateDataModel.DataColumns.MilestoneFeatureStateId);
            }

            if (fieldName.Equals("FeatureId"))
            {
                var featureData = FeatureDataManager.GetList(SessionVariables.RequestProfile);
                UIHelper.LoadDropDown(featureData, dropDownListControl, StandardDataModel.StandardDataColumns.Name, FeatureDataModel.DataColumns.FeatureId);
            }
        }
예제 #11
0
        protected override void ShowData(int milestoneFeatureStateId)
        {
            base.ShowData(milestoneFeatureStateId);

            oDetailButtonPanel.SetId = SetId;

            Clear();

            var data = new MilestoneFeatureStateDataModel();

            data.MilestoneFeatureStateId = milestoneFeatureStateId;

            var items = MilestoneFeatureStateDataManager.GetEntityDetails(data, SessionVariables.RequestProfile);

            if (items.Count == 1)
            {
                var item = items[0];

                SetData(item);

                oHistoryList.Setup(PrimaryEntity, milestoneFeatureStateId, "MilestoneFeatureState");
            }
        }
예제 #12
0
        protected override DataTable GetData()
        {
            try
            {
                SuperKey = ApplicationCommon.GetSuperKey();
                SetId    = ApplicationCommon.GetSetId();

                var selectedrows = new DataTable();
                var milestoneFeatureStatedata = new MilestoneFeatureStateDataModel();

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

                    foreach (var entityKey in lstEntityKeys)
                    {
                        milestoneFeatureStatedata.MilestoneFeatureStateId = entityKey;
                        var result = MilestoneFeatureStateDataManager.GetDetails(milestoneFeatureStatedata, SessionVariables.RequestProfile);
                        selectedrows.ImportRow(result.Rows[0]);
                    }
                }
                else
                {
                    milestoneFeatureStatedata.MilestoneFeatureStateId = SetId;
                    var result = MilestoneFeatureStateDataManager.GetDetails(milestoneFeatureStatedata, SessionVariables.RequestProfile);
                    selectedrows.ImportRow(result.Rows[0]);
                }
                return(selectedrows);
            }
            catch (Exception ex)
            {
                Response.Write(ex.Message);
            }
            return(null);
        }
예제 #13
0
        protected override DataTable GetData()
        {
            var dt = MilestoneFeatureStateDataManager.Search(oSearchFilter.SearchParameters, SessionVariables.RequestProfile);

            return(dt);
        }
예제 #14
0
 private void ReBindEditableGrid()
 {
     var data = new MilestoneFeatureStateDataModel();
     var dtMilestoneFeatureState = MilestoneFeatureStateDataManager.Search(data, SessionVariables.RequestProfile);
 }
예제 #15
0
        private void SetupDropdown()
        {
            var isTesting = SessionVariables.IsTesting;

            var taskPriorityTypeData = FeatureDataManager.GetList(SessionVariables.RequestProfile);

            UIHelper.LoadDropDown(taskPriorityTypeData, drpFeatureList, StandardDataModel.StandardDataColumns.Name,
                                  FeatureDataModel.DataColumns.FeatureId);

            var taskData = MilestoneDataManager.GetList(SessionVariables.RequestProfile);

            UIHelper.LoadDropDown(taskData, drpMilestoneList, StandardDataModel.StandardDataColumns.Name,
                                  MilestoneDataModel.DataColumns.MilestoneId);

            //var MilestoneFeatureStateData = Framework.Components.ApplicationUser.ApplicationUser.GetList(SessionVariables.RequestProfile.AuditId);
            //UIHelper.LoadDropDown(MilestoneFeatureStateData, drpMilestoneFeatureStateList, ApplicationUserDataModel.DataColumns.FirstName, ApplicationUserDataModel.DataColumns.ApplicationUserId);
            var MilestoneFeatureStateData = MilestoneFeatureStateDataManager.GetList(SessionVariables.RequestProfile);

            UIHelper.LoadDropDown(MilestoneFeatureStateData, drpMilestoneFeatureStateList, StandardDataModel.StandardDataColumns.Name, MilestoneFeatureStateDataModel.DataColumns.MilestoneFeatureStateId);

            if (isTesting)
            {
                drpMilestoneList.AutoPostBack             = true;
                drpFeatureList.AutoPostBack               = true;
                drpMilestoneFeatureStateList.AutoPostBack = true;
                if (drpFeatureList.Items.Count > 0)
                {
                    if (!string.IsNullOrEmpty(txtFeatureId.Text.Trim()))
                    {
                        drpFeatureList.SelectedValue = txtFeatureId.Text;
                    }
                    else
                    {
                        txtFeatureId.Text = drpFeatureList.SelectedItem.Value;
                    }
                }
                if (drpMilestoneList.Items.Count > 0)
                {
                    if (!string.IsNullOrEmpty(txtMilestoneId.Text.Trim()))
                    {
                        drpMilestoneList.SelectedValue = txtMilestoneId.Text;
                    }
                    else
                    {
                        txtMilestoneId.Text = drpMilestoneList.SelectedItem.Value;
                    }
                }
                if (drpMilestoneFeatureStateList.Items.Count > 0)
                {
                    if (!string.IsNullOrEmpty(txtMilestoneFeatureStateId.Text.Trim()))
                    {
                        drpMilestoneFeatureStateList.SelectedValue = txtMilestoneFeatureStateId.Text;
                    }
                    else
                    {
                        txtMilestoneFeatureStateId.Text = drpMilestoneFeatureStateList.SelectedItem.Value;
                    }
                }
                txtFeatureId.Visible               = true;
                txtMilestoneId.Visible             = true;
                txtMilestoneFeatureStateId.Visible = true;
            }
            else
            {
                if (!string.IsNullOrEmpty(txtFeatureId.Text.Trim()))
                {
                    drpFeatureList.SelectedValue = txtFeatureId.Text;
                }
                if (!string.IsNullOrEmpty(txtMilestoneId.Text.Trim()))
                {
                    drpMilestoneList.SelectedValue = txtMilestoneId.Text;
                }
                if (!string.IsNullOrEmpty(txtMilestoneFeatureStateId.Text.Trim()))
                {
                    drpMilestoneFeatureStateList.SelectedValue = txtMilestoneFeatureStateId.Text;
                }
            }
        }