コード例 #1
0
ファイル: HelpDetail.ascx.cs プロジェクト: zhaobin930/SeekPet
        /// <summary>
        /// 绑定数据
        /// </summary>
        /// <param name="PKID"></param>
        /// <returns></returns>
        #region private bool BindInfo(int PKID)
        private bool BindInfo(int PKID)
        {
            bool isReturl = true;

            //数据访问层
            See_Help objSee_Help = new See_Help();

            //实体基类

            //以主键查询数据
            objSee_Help = SqlDataProvider.SqlDataProvider.GetInfoSee_Help(PKID);
            if ((objSee_Help != null))
            {
                //加载绑定数据
                lblFeature.Text     = objSee_Help.Feature.ToString();
                lblAddress.Text     = objSee_Help.Address.ToString();
                lblPay.Text         = objSee_Help.Pay.ToString();
                lblDescription.Text = objSee_Help.Description.ToString();
                imgPicture.ImageUrl = "/Portals/SEEKPETInfo/" + objSee_Help.Picture.ToString();
                if (!EasySite.Common.Utilities.Null.IsNull(objSee_Help.CreateTime))
                {
                    lblCreateTime.Text = Convert.ToDateTime(objSee_Help.CreateTime).ToShortDateString();
                }
            }
            else
            {
                //错误主键
                isReturl = false;
            }

            return(isReturl);
        }
コード例 #2
0
ファイル: HelpEdit.ascx.cs プロジェクト: zhaobin930/SeekPet
 /// <summary>
 /// 保存
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 #region protected void cmdCommand_Click(object sender, EventArgs e)
 protected void cmdCommand_Click(object sender, EventArgs e)
 {
     try
     {
         See_Help objSee_Help = new See_Help();
         objSee_Help.Feature = PeoNormalControl.CommonClass.Utility.ReplaceSepChars(txtFeature.Text);
         objSee_Help.Address = PeoNormalControl.CommonClass.Utility.ReplaceSepChars(txtAddress.Text);
         //objSee_Help.Pay = PeoNormalControl.CommonClass.Utility.ReplaceSepChars(txtPay.Text);
         objSee_Help.Description = PeoNormalControl.CommonClass.Utility.ReplaceSepChars(txtDescription.Text);
         objSee_Help.Picture     = hidImgName.Value;
         objSee_Help.CreateTime  = DateTime.Now;
         SqlDataProvider.SqlDataProvider.InsertSee_Help(objSee_Help);
         Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "resultTip", "<script>alert('提交成功!');window.location.href=window.location.href;</script>");
     }
     catch (Exception exc)
     {
         EasySite.Services.Exceptions.Exceptions.ProcessModuleLoadException(this, exc);
     }
 }
コード例 #3
0
 /// <summary>
 /// 更新一条信息
 /// </summary>
 /// <param name="objSee_Help">实例对象</param>
 public static void UpdateSee_Help(See_Help objSee_Help)
 {
     Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(strDBConnectionString, "See_Help_Update", GetNull(objSee_Help.ID), objSee_Help.Feature, objSee_Help.Address, objSee_Help.Pay, objSee_Help.Description, objSee_Help.Picture, GetNull(objSee_Help.CreateTime), objSee_Help.Par1, objSee_Help.Par2, objSee_Help.Par3, objSee_Help.Par4, objSee_Help.Par5);
 }
コード例 #4
0
 /// <summary>
 /// 插入一条实例信息
 /// </summary>
 /// <param name="objSee_Help">实例对象</param>
 /// <returns>返回主键ID</returns>
 public static Int32 InsertSee_Help(See_Help objSee_Help)
 {
     return Convert.ToInt32(Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(strDBConnectionString, "See_Help_Insert", objSee_Help.Feature, objSee_Help.Address, objSee_Help.Pay, objSee_Help.Description, objSee_Help.Picture, GetNull(objSee_Help.CreateTime), objSee_Help.Par1, objSee_Help.Par2, objSee_Help.Par3, objSee_Help.Par4, objSee_Help.Par5));
 }