Beispiel #1
0
        public void Show(int id)
        {
            try
            {
                SPMemoWrapper obj = SPMemoWrapper.FindById(id);

                if (obj != null)
                {
                    this.txtTitle.Text       = obj.Title.ToString();
                    this.txtMemoContent.Text = obj.MemoContent.ToString();



                    hidId.Text = id.ToString();


                    winSPMemoEdit.Show();
                }
                else
                {
                    ResourceManager.AjaxSuccess      = false;
                    ResourceManager.AjaxErrorMessage = "错误信息:数据不存在!";
                    return;
                }
            }
            catch (Exception ex)
            {
                ResourceManager.AjaxSuccess      = false;
                ResourceManager.AjaxErrorMessage = "错误信息:" + ex.Message;
                return;
            }
        }
Beispiel #2
0
        protected void btnSaveSPMemo_Click(object sender, AjaxEventArgs e)
        {
            try
            {
                SPMemoWrapper obj = SPMemoWrapper.FindById(int.Parse(hidId.Text.Trim()));
                obj.Title       = this.txtTitle.Text.Trim();
                obj.MemoContent = this.txtMemoContent.Text.Trim();
                obj.CreateDate  = this.txtCreateDate.SelectedDate;


                SPMemoWrapper.Update(obj);

                winSPMemoEdit.Hide();
            }
            catch (Exception ex)
            {
                Coolite.Ext.Web.ScriptManager.AjaxSuccess      = false;
                Coolite.Ext.Web.ScriptManager.AjaxErrorMessage = "错误信息:" + ex.Message;
                return;
            }
        }
Beispiel #3
0
        protected void btnSaveSPMemo_Click(object sender, DirectEventArgs e)
        {
            try
            {
                SPMemoWrapper obj = SPMemoWrapper.FindById(int.Parse(hidId.Text.Trim()));
                obj.Title       = this.txtTitle.Text.Trim();
                obj.MemoContent = this.txtMemoContent.Text.Trim();


                SPMemoWrapper.Update(obj);

                winSPMemoEdit.Hide();
                ResourceManager.AjaxSuccess = true;
            }
            catch (Exception ex)
            {
                ResourceManager.AjaxSuccess      = false;
                ResourceManager.AjaxErrorMessage = "错误信息:" + ex.Message;
                return;
            }
        }
Beispiel #4
0
        public void Show(int id)
        {
            try
            {
                SPMemoWrapper obj = SPMemoWrapper.FindById(id);

                if (obj != null)
                {
                    this.txtTitle.Text       = obj.Title.ToString();
                    this.txtMemoContent.Text = obj.MemoContent.ToString();
                    if (obj.CreateDate.HasValue)
                    {
                        this.txtCreateDate.SelectedDate = obj.CreateDate.Value;
                    }



                    hidId.Text = id.ToString();


                    winSPMemoEdit.Show();
                }
                else
                {
                    ScriptManager.AjaxSuccess      = false;
                    ScriptManager.AjaxErrorMessage = "错误信息:数据不存在";
                    return;
                }
            }
            catch (Exception ex)
            {
                Coolite.Ext.Web.ScriptManager.AjaxSuccess      = false;
                Coolite.Ext.Web.ScriptManager.AjaxErrorMessage = "错误信息:" + ex.Message;
                return;
            }
        }