Esempio n. 1
0
        /// <summary>
        /// 修改广告信息,返回1成功,其它失败
        /// </summary>
        /// <param name="info">实体</param>
        /// <returns></returns>
        public int UpdateGuangGao(EyouSoft.Model.YlStructure.MWzGuangGaoInfo info)
        {
            if (info == null ||
                string.IsNullOrEmpty(info.CompanyId) ||
                string.IsNullOrEmpty(info.OperatorId) ||
                string.IsNullOrEmpty(info.GuangGaoId))
            {
                return(0);
            }

            int dalRetCode = dal.UpdateGuangGao(info);

            return(dalRetCode);
        }
Esempio n. 2
0
        /// <summary>
        /// 新增广告信息,返回1成功,其它失败
        /// </summary>
        /// <param name="info">实体</param>
        /// <returns></returns>
        public int InsertGuangGao(EyouSoft.Model.YlStructure.MWzGuangGaoInfo info)
        {
            if (info == null ||
                string.IsNullOrEmpty(info.CompanyId) ||
                string.IsNullOrEmpty(info.OperatorId))
            {
                return(0);
            }

            info.IssueTime  = DateTime.Now;
            info.GuangGaoId = Guid.NewGuid().ToString();

            int dalRetCode = dal.InsertGuangGao(info);

            return(dalRetCode);
        }
Esempio n. 3
0
        /// <summary>
        /// baocun
        /// </summary>
        void BaoCun()
        {
            var info = new EyouSoft.Model.YlStructure.MWzGuangGaoInfo();

            info.CompanyId  = CurrentUserCompanyID;
            info.Filepath   = null;
            info.IssueTime  = DateTime.Now;
            info.MingCheng  = Utils.GetFormValue(txtMingCheng.UniqueID);
            info.OperatorId = SiteUserInfo.UserId;
            info.GuangGaoId = GuangGaoId;
            info.Url        = Utils.GetFormValue(txtUrl.UniqueID);
            info.WeiZhi     = Utils.GetEnumValue <EyouSoft.Model.EnumType.YlStructure.WzGuangGaoWeiZhi>(Utils.GetFormValue("txtWeiZhi"), EyouSoft.Model.EnumType.YlStructure.WzGuangGaoWeiZhi.None);

            var items  = upload1.Files;
            var items1 = upload1.YuanFiles;

            if (items != null && items.Count > 0)
            {
                info.Filepath = items[0].FilePath;
            }
            else if (items1 != null && items1.Count > 0)
            {
                info.Filepath = items1[0].FilePath;
            }

            int bllRetCode = 0;

            info.PaiXuId = Utils.GetInt(Utils.GetFormValue(txtPaiXuId.UniqueID));

            if (string.IsNullOrEmpty(GuangGaoId))
            {
                bllRetCode = new EyouSoft.BLL.YlStructure.BWz().InsertGuangGao(info);
            }
            else
            {
                bllRetCode = new EyouSoft.BLL.YlStructure.BWz().UpdateGuangGao(info);
            }

            if (bllRetCode == 1)
            {
                RCWE(UtilsCommons.AjaxReturnJson("1", "操作成功"));
            }
            else
            {
                RCWE(UtilsCommons.AjaxReturnJson("0", "操作失败"));
            }
        }