Esempio n. 1
0
        public IList <BDMDProcessAssignedResourceApprovalStatusEntity> GetPagedData(Int32 startRowIndex, Int32 pageSize, String sortExpression)
        {
            IList <BDMDProcessAssignedResourceApprovalStatusEntity> bDMDProcessAssignedResourceApprovalStatusEntityList = new List <BDMDProcessAssignedResourceApprovalStatusEntity>();

            try
            {
                if (pageSize == -1)
                {
                    pageSize = 1000000000;
                }

                if (String.IsNullOrEmpty(sortExpression))
                {
                    sortExpression = BDMDProcessAssignedResourceApprovalStatusEntity.FLD_NAME_ProcessAssignedResourceApprovalStatusID + " " + SQLConstants.SORT_ORDER_DESCENDING;
                }

                startRowIndex = Convert.ToInt32(startRowIndex / pageSize) + 1;

                bDMDProcessAssignedResourceApprovalStatusEntityList = FCCBDMDProcessAssignedResourceApprovalStatus.GetFacadeCreate().GetIL(startRowIndex, pageSize, sortExpression, null, DatabaseOperationType.LoadPagedWithSortExpression);

                if (bDMDProcessAssignedResourceApprovalStatusEntityList != null && bDMDProcessAssignedResourceApprovalStatusEntityList.Count > 0)
                {
                    totalRowCount = bDMDProcessAssignedResourceApprovalStatusEntityList[0].TotalRowCount;
                }
            }
            catch (Exception ex)
            {
            }

            return(bDMDProcessAssignedResourceApprovalStatusEntityList ?? new List <BDMDProcessAssignedResourceApprovalStatusEntity>());
        }
Esempio n. 2
0
        private void SaveBDMDProcessAssignedResourceApprovalStatusEntity()
        {
            if (IsValid)
            {
                try
                {
                    BDMDProcessAssignedResourceApprovalStatusEntity bDMDProcessAssignedResourceApprovalStatusEntity = BuildBDMDProcessAssignedResourceApprovalStatusEntity();

                    Int64 result = -1;

                    if (bDMDProcessAssignedResourceApprovalStatusEntity.IsNew)
                    {
                        result = FCCBDMDProcessAssignedResourceApprovalStatus.GetFacadeCreate().Add(bDMDProcessAssignedResourceApprovalStatusEntity, DatabaseOperationType.Add, TransactionRequired.No);
                    }
                    else
                    {
                        String filterExpression = SqlExpressionBuilder.PrepareFilterExpression(BDMDProcessAssignedResourceApprovalStatusEntity.FLD_NAME_ProcessAssignedResourceApprovalStatusID, bDMDProcessAssignedResourceApprovalStatusEntity.ProcessAssignedResourceApprovalStatusID.ToString(), SQLMatchType.Equal);
                        result = FCCBDMDProcessAssignedResourceApprovalStatus.GetFacadeCreate().Update(bDMDProcessAssignedResourceApprovalStatusEntity, filterExpression, DatabaseOperationType.Update, TransactionRequired.No);
                    }

                    if (result > 0)
                    {
                        _ProcessAssignedResourceApprovalStatusID         = 0;
                        _BDMDProcessAssignedResourceApprovalStatusEntity = new BDMDProcessAssignedResourceApprovalStatusEntity();
                        PrepareInitialView();
                        BindBDMDProcessAssignedResourceApprovalStatusList();

                        if (bDMDProcessAssignedResourceApprovalStatusEntity.IsNew)
                        {
                            MiscUtil.ShowMessage(lblMessage, "Process Assigned Resource Approval Status Information has been added successfully.", false);
                        }
                        else
                        {
                            MiscUtil.ShowMessage(lblMessage, "Process Assigned Resource Approval Status Information has been updated successfully.", false);
                        }
                    }
                    else
                    {
                        if (bDMDProcessAssignedResourceApprovalStatusEntity.IsNew)
                        {
                            MiscUtil.ShowMessage(lblMessage, "Failed to add Process Assigned Resource Approval Status Information.", false);
                        }
                        else
                        {
                            MiscUtil.ShowMessage(lblMessage, "Failed to update Process Assigned Resource Approval Status Information.", false);
                        }
                    }
                }
                catch (Exception ex)
                {
                    MiscUtil.ShowMessage(lblMessage, ex.Message, true);
                }
            }
        }
Esempio n. 3
0
        protected void lvBDMDProcessAssignedResourceApprovalStatus_ItemCommand(object sender, ListViewCommandEventArgs e)
        {
            Int64 ProcessAssignedResourceApprovalStatusID;

            Int64.TryParse(e.CommandArgument.ToString(), out ProcessAssignedResourceApprovalStatusID);

            if (ProcessAssignedResourceApprovalStatusID > 0)
            {
                if (string.Equals(e.CommandName, "EditItem"))
                {
                    _ProcessAssignedResourceApprovalStatusID = ProcessAssignedResourceApprovalStatusID;

                    PrepareEditView();

                    cpeEditor.Collapsed   = false;
                    cpeEditor.ClientState = "false";
                }
                else if (string.Equals(e.CommandName, "DeleteItem"))
                {
                    try
                    {
                        Int64 result = -1;

                        String fe = SqlExpressionBuilder.PrepareFilterExpression(BDMDProcessAssignedResourceApprovalStatusEntity.FLD_NAME_ProcessAssignedResourceApprovalStatusID, ProcessAssignedResourceApprovalStatusID.ToString(), SQLMatchType.Equal);

                        BDMDProcessAssignedResourceApprovalStatusEntity bDMDProcessAssignedResourceApprovalStatusEntity = new BDMDProcessAssignedResourceApprovalStatusEntity();


                        result = FCCBDMDProcessAssignedResourceApprovalStatus.GetFacadeCreate().Delete(bDMDProcessAssignedResourceApprovalStatusEntity, fe, DatabaseOperationType.Delete, TransactionRequired.No);

                        if (result == 0)
                        {
                            _ProcessAssignedResourceApprovalStatusID         = 0;
                            _BDMDProcessAssignedResourceApprovalStatusEntity = new BDMDProcessAssignedResourceApprovalStatusEntity();
                            PrepareInitialView();
                            BindBDMDProcessAssignedResourceApprovalStatusList();

                            MiscUtil.ShowMessage(lblMessage, "Process Assigned Resource Approval Status has been successfully deleted.", true);
                        }
                        else
                        {
                            MiscUtil.ShowMessage(lblMessage, "Failed to delete Process Assigned Resource Approval Status.", true);
                        }
                    }
                    catch (Exception ex)
                    {
                        MiscUtil.ShowMessage(lblMessage, ex.Message, true);
                    }
                }
            }
        }
Esempio n. 4
0
        public IList <BDMDProcessAssignedResourceApprovalStatusEntity> GetData()
        {
            IList <BDMDProcessAssignedResourceApprovalStatusEntity> bDMDProcessAssignedResourceApprovalStatusEntityList = new List <BDMDProcessAssignedResourceApprovalStatusEntity>();

            try
            {
                bDMDProcessAssignedResourceApprovalStatusEntityList = FCCBDMDProcessAssignedResourceApprovalStatus.GetFacadeCreate().GetIL(null, null, null, null, DatabaseOperationType.Load);

                if (bDMDProcessAssignedResourceApprovalStatusEntityList != null && bDMDProcessAssignedResourceApprovalStatusEntityList.Count > 0)
                {
                    totalRowCount = bDMDProcessAssignedResourceApprovalStatusEntityList[0].TotalRowCount;
                }
            }
            catch (Exception ex)
            {
            }

            return(bDMDProcessAssignedResourceApprovalStatusEntityList ?? new List <BDMDProcessAssignedResourceApprovalStatusEntity>());
        }