示例#1
0
        /// <summary>
        /// Update
        /// </summary>
        private void UpdateData()
        {
            BD_ProviderEvalData data = new BD_ProviderEvalData();
            ITransaction tran = factory.GetLoadObject(data, hidId.Value);
            Execute(tran);
            if (!HasError)
            {
                //Get Data
                data = (BD_ProviderEvalData)tran.Result;
                data.ContentEval = txtContentEval.Text.Trim();
                data.EvalDate = Func.FormatYYYYmmdd(txtEvalDate.Text.Trim());
                data.Comment = txtComment.Text.Trim();
                data.ModifiedBy = Page.User.Identity.Name;
                data.Modified = DateTime.Now.ToString("yyyyMMddHHmmss");
                data.DelFlag = "0";
                tran = factory.GetUpdateObject(data);

                Execute(tran);

                if (!HasError)
                {
                    OperationLogger.WriteInfo(Constants.LogOperationAlbumId, Constants.LogActionUpdateId, deleteSuccess, Page.User.Identity.Name);
                    mvMessage.SetCompleteMessage(deleteSuccess);
                    ScriptManager.RegisterClientScriptBlock(this.btnRegister, this.GetType(), key, postback, true);
                }
                else
                {
                    OperationLogger.WriteError(Constants.LogOperationAlbumId, Constants.LogActionUpdateId, updateUnSuccess, Page.User.Identity.Name);
                    mvMessage.AddError(updateUnSuccess);
                }
            }
        }
示例#2
0
        /// <summary>
        /// Load data
        /// </summary>
        private void LoadData()
        {
            BD_ProviderEvalData data = new BD_ProviderEvalData();
            ITransaction tran = factory.GetLoadObject(data, hidId.Value);
            Execute(tran);
            if (!HasError)
            {
                //Get Data
                data = (BD_ProviderEvalData)tran.Result;
                txtContentEval.Text = data.ContentEval;
                txtEvalDate.Text = Func.FormatDMY(data.EvalDate);
                txtComment.Text = data.Comment;
                lblProviderId.Text = data.ProviderId;


                BD_ProviderData dataP = new BD_ProviderData();
                ITransaction tranP = factory.GetLoadObject(dataP, lblProviderId.ID);
                Execute(tranP);
                if (!HasError)
                {
                    //Get Data
                    dataP = (BD_ProviderData)tranP.Result;
                    lblName.Text = dataP.Name;
                }
            }
        }