コード例 #1
0
        public void Show(int id)
        {
            try
            {
                SPUpperWrapper obj = SPUpperWrapper.FindById(id);

                if (obj != null)
                {
                    this.lblName.Text        = ValueConvertUtil.ConvertStringValue(obj.Name);
                    this.lblCode.Text        = ValueConvertUtil.ConvertStringValue(obj.Code);
                    this.lblDescription.Text = ValueConvertUtil.ConvertStringValue(obj.Description);



                    //hidLogID.Text = id.ToString();


                    winSPUpperView.Show();
                }
                else
                {
                    ResourceManager.AjaxSuccess      = false;
                    ResourceManager.AjaxErrorMessage = "错误信息:数据不存在t";
                    return;
                }
            }
            catch (Exception ex)
            {
                ResourceManager.AjaxSuccess      = false;
                ResourceManager.AjaxErrorMessage = "错误信息:" + ex.Message;
                return;
            }
        }
コード例 #2
0
        protected void btnSaveSPUpper_Click(object sender, DirectEventArgs e)
        {
            try
            {
                SPUpperWrapper obj = SPUpperWrapper.FindById(int.Parse(hidId.Text.Trim()));
                obj.Name        = this.txtName.Text.Trim();
                obj.Code        = this.txtCode.Text.Trim();
                obj.Description = this.txtDescription.Text.Trim();

                obj.LastModifyBy      = CurrentLoginUser.UserID;
                obj.LastModifyAt      = System.DateTime.Now;
                obj.LastModifyComment = "更新上家。";


                SPUpperWrapper.Update(obj);

                winSPUpperEdit.Hide();
                ResourceManager.AjaxSuccess = true;
            }
            catch (Exception ex)
            {
                ResourceManager.AjaxSuccess      = false;
                ResourceManager.AjaxErrorMessage = "错误信息:" + ex.Message;
                return;
            }
        }
コード例 #3
0
        protected void btnSaveSPAdvertisement_Click(object sender, DirectEventArgs e)
        {
            try
            {
                SPAdvertisementWrapper obj = SPAdvertisementWrapper.FindById(int.Parse(hidId.Text.Trim()));
                if (this.cmbUpper.SelectedItem != null)
                {
                    obj.UpperID = SPUpperWrapper.FindById(Convert.ToInt32(this.cmbUpper.SelectedItem.Value));
                }
                else
                {
                    obj.UpperID = null;
                }
                obj.Name        = this.txtName.Text.Trim();
                obj.Code        = this.txtCode.Text.Trim();
                obj.ImageUrl    = this.txtImageUrl.Text.Trim();
                obj.AdPrice     = this.txtAdPrice.Text.Trim();
                obj.AccountType = cmbAccountType.SelectedItem.Value.Trim();
                //obj.ApplyStatus = this.txtApplyStatus.Text.Trim();
                obj.AdType      = cmbAdType.SelectedItem.Value.Trim();
                obj.AdText      = this.txtAdText.Text.Trim();
                obj.Description = this.txtDescription.Text.Trim();

                //obj.AssignedClient = Convert.ToInt32(this.numAssignedClient.Value.Trim());
                //obj.CreateBy = Convert.ToInt32(this.numCreateBy.Value.Trim());
                //obj.CreateAt = UIHelper.SaftGetDateTime(this.dateCreateAt.Value.Trim());
                //obj.LastModifyBy = Convert.ToInt32(this.numLastModifyBy.Value.Trim());
                //obj.LastModifyAt = UIHelper.SaftGetDateTime(this.dateLastModifyAt.Value.Trim());
                obj.LastModifyBy      = ((BasePage)this.Page).CurrentLoginUser.UserID;
                obj.LastModifyAt      = System.DateTime.Now;
                obj.LastModifyComment = "创建用户。";


                SPAdvertisementWrapper.Update(obj);

                winSPAdvertisementEdit.Hide();
                ResourceManager.AjaxSuccess = true;
            }
            catch (Exception ex)
            {
                ResourceManager.AjaxSuccess      = false;
                ResourceManager.AjaxErrorMessage = "Error Message:" + ex.Message;
                return;
            }
        }