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; } }
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); }
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(); }
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); } }
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"); } }
private DataTable GetProductivityAreaFeatureList() { var dt = ProductivityAreaFeatureDataManager.GetList(SessionVariables.RequestProfile); return(dt); }
protected override DataTable GetData() { var dt = ProductivityAreaFeatureDataManager.Search(oSearchFilter.SearchParameters, SessionVariables.RequestProfile); return(dt); }
private void ReBindEditableGrid() { var data = new ProductivityAreaFeatureDataModel(); var dtProductivityAreaFeature = ProductivityAreaFeatureDataManager.Search(data, SessionVariables.RequestProfile); }