示例#1
0
        protected override void ShowData(int ClientXProjectId)
        {
            oDetailButtonPanel.SetId = SetId;
            var data = new ClientXProjectDataModel();

            data.ClientXProjectId = ClientXProjectId;

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

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

                lblClientXProjectId.Text = Convert.ToString(row[ClientXProjectDataModel.DataColumns.ClientXProjectId]);
                lblClient.Text           = Convert.ToString(row[ClientXProjectDataModel.DataColumns.Client]);
                lblProject.Text          = Convert.ToString(row[ClientXProjectDataModel.DataColumns.Project]);

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

                oHistoryList.Setup((int)SystemEntity.ClientXProject, ClientXProjectId, "ClientXProject");
                dynAuditHistory.Visible = PerferenceUtility.GetUserPreferenceByKeyAsBoolean(ApplicationCommon.HistoryGridVisibilityKey, "ClientXProject");
            }
            else
            {
                Clear();
            }
        }
示例#2
0
        public void LoadData(int ClientXProjectId, bool showId)
        {
            var data = new ClientXProjectDataModel();

            data.ClientXProjectId = ClientXProjectId;
            var oClientXProjectTable = ClientXProjectDataManager.GetDetails(data, SessionVariables.RequestProfile);

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

                if (!showId)
                {
                    txtClientXProjectId.Text = Convert.ToString(row[ClientXProjectDataModel.DataColumns.ClientXProjectId]);

                    dynAuditHistory.Visible = true;

                    // only show Audit History in case of Update page, not for Clone.
                    oHistoryList.Setup((int)SystemEntity.ClientXProject, ClientXProjectId, "ClientXProject");
                    dynAuditHistory.Visible = PerferenceUtility.GetUserPreferenceByKeyAsBoolean(ApplicationCommon.HistoryGridVisibilityKey, "ClientXProject");
                }
                else
                {
                    txtClientXProjectId.Text = String.Empty;
                }
                txtClientId.Text  = Convert.ToString(row[ClientXProjectDataModel.DataColumns.ClientId]);
                txtProjectId.Text = Convert.ToString(row[ClientXProjectDataModel.DataColumns.ProjectId]);

                drpProjectList.SelectedValue = Convert.ToString(row[ClientXProjectDataModel.DataColumns.ProjectId]);
                drpClientList.SelectedValue  = Convert.ToString(row[ClientXProjectDataModel.DataColumns.ClientId]);

                oUpdateInfo.LoadText(oClientXProjectTable.Rows[0]);
            }
            else
            {
                txtClientXProjectId.Text = String.Empty;
                txtProjectId.Text        = String.Empty;
                txtClientId.Text         = String.Empty;
            }
        }