Example #1
0
        public void LoadData(int ProductivityAreaFeatureId, bool showId)
        {
            Clear();

            var data = new ProductivityAreaFeatureDataModel();

            data.ProductivityAreaFeatureId = ProductivityAreaFeatureId;

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

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

            var item = items[0];

            SetData(item);

            if (!showId)
            {
                SystemKeyId = item.ProductivityAreaFeatureId;
                oHistoryList.Setup(PrimaryEntity, ProductivityAreaFeatureId, PrimaryEntityKey);
            }
            else
            {
                CoreSystemKey.Text = String.Empty;
            }
        }
Example #2
0
        public override int?Save(string action)
        {
            var data = new ProductivityAreaFeatureDataModel();

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

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

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

            return(data.ProductivityAreaFeatureId);
        }
Example #3
0
        private void UpdateData(ArrayList values)
        {
            var data = new ProductivityAreaFeatureDataModel();

            data.ProductivityAreaFeatureId = int.Parse(values[0].ToString());
            data.Name        = values[1].ToString();
            data.Description = values[2].ToString();
            data.SortOrder   = int.Parse(values[3].ToString());
            ProductivityAreaFeatureDataManager.Update(data, SessionVariables.RequestProfile);
            ReBindEditableGrid();
        }
Example #4
0
 protected void btnDelete_Click(object sender, EventArgs e)
 {
     try
     {
         string[] deleteIndexList = DeleteIds.Split(',');
         foreach (string index in deleteIndexList)
         {
             var data = new ProductivityAreaFeatureDataModel();
             data.ProductivityAreaFeatureId = int.Parse(index);
             ProductivityAreaFeatureDataManager.Delete(data, SessionVariables.RequestProfile);
             DeleteAndRedirect();
         }
     }
     catch (Exception ex)
     {
         Response.Write(ex.Message);
     }
 }
Example #5
0
        protected override void ShowData(int productivityAreaFeatureFeatureId)
        {
            base.ShowData(productivityAreaFeatureFeatureId);

            oDetailButtonPanel.SetId = SetId;

            Clear();

            var data = new ProductivityAreaFeatureDataModel();

            data.ProductivityAreaFeatureId = productivityAreaFeatureFeatureId;

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

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

                SetData(item);

                oHistoryList.Setup(PrimaryEntity, productivityAreaFeatureFeatureId, "ProductivityAreaFeature");
            }
        }
Example #6
0
        private DataTable GetProductivityAreaFeatureList()
        {
            var dt = ProductivityAreaFeatureDataManager.GetList(SessionVariables.RequestProfile);

            return(dt);
        }
Example #7
0
        protected override DataTable GetData()
        {
            var dt = ProductivityAreaFeatureDataManager.Search(oSearchFilter.SearchParameters, SessionVariables.RequestProfile);

            return(dt);
        }
Example #8
0
 private void ReBindEditableGrid()
 {
     var data = new ProductivityAreaFeatureDataModel();
     var dtProductivityAreaFeature = ProductivityAreaFeatureDataManager.Search(data, SessionVariables.RequestProfile);
 }