コード例 #1
0
ファイル: Supply.cs プロジェクト: xyecom/AMS
        /// <summary>
        /// ɾ��������¼
        /// </summary>
        /// <param name="SD_ID">��¼���</param>
        /// <returns>��Ӱ�������</returns>
        public int Deletes(string ids)
        {
            Business.Attachment attBLL = new Attachment();

            attBLL.Delete(ids, XYECOM.Model.AttachmentItem.Supply, XYECOM.Model.UploadFileType.All);

            return DAL.Deletes(ids);
        }
コード例 #2
0
ファイル: certificateinfo.aspx.cs プロジェクト: ZhaiQuan/Zhai
    public void Getlist()
    {
        long ceId = XYECOM.Core.XYRequest.GetQueryInt64("ce_id");

        string strwhere = " where CE_ID=" + ceId;
        DataTable DT = XYECOM.Core.Function.GetDataTable(strwhere, "", "XYV_Certificate");

        //证书信息

        this.lbU_Name.InnerHtml = "<a href=\"../UserManage/UserInfo.aspx?U_ID=" + DT.Rows[0]["U_ID"].ToString() + "&backURL=" + XYECOM.Core.Utils.JSEscape("../Certificate/certificateinfo.aspx?CE_ID=" + Request.QueryString["CE_ID"] + "&CE_Type=" + DT.Rows[0]["CE_Type"].ToString() + "&U_ID=" + DT.Rows[0]["U_ID"].ToString()) + " \" >" + DT.Rows[0]["U_Name"].ToString() + "</a>";
        this.LbCE_Name.Text = DT.Rows[0]["CE_Name"].ToString();
        this.lbCE_Organ.Text = DT.Rows[0]["CE_Organ"].ToString();
        this.lbCE_Addtime.Text = DT.Rows[0]["CE_Addtime"].ToString();
        this.lbCE_Begin.Text = DT.Rows[0]["CE_Begin"].ToString(); ;
        this.lbCE_Upto.Text = DT.Rows[0]["CE_Upto"].ToString();
        string strtype = DT.Rows[0]["CE_Type"].ToString();

        if (DT.Rows[0]["CE_Type"].ToString() != "")
        {
            this.CE_Type.Value = DT.Rows[0]["CE_Type"].ToString();
        }
        if (strtype == "1")
        {
            this.lbCE_Type.Text  = "营业执照";
        }
        else if (strtype == "2")
        {
            this.lbCE_Type.Text  = "税务登记类";
        }
        else if (strtype == "3")
        {
            this.lbCE_Type.Text  = "经营许可类";
        }
        else
        {
            this.lbCE_Type.Text  = "其他类证书";
        }
        if (DT.Rows[0]["U_ID"].ToString() != "")
        {
            this.U_ID.Value  =DT.Rows[0]["U_ID"].ToString();
        }
        if (DT.Rows[0]["AuditingState"].ToString() != "")
        {
            if (DT.Rows[0]["AuditingState"].ToString() == "1")
            {
                this.lblMessage.Text = "通过审核";
                this.Button2.Enabled = false;
            }
            else if (DT.Rows[0]["AuditingState"].ToString() == "0")
            {
                this.lblMessage.Text = "未通过审核";
            }
        }
        else
        {
            this.lblMessage.Text = "未审核";
        }

        //  获取图片路径
        XYECOM.Business.Attachment at = new XYECOM.Business.Attachment();

        string imgUrl =XYECOM.Business.Attachment.GetInfoDefaultImgHref(XYECOM.Model.AttachmentItem.Certificate, ceId);

        this.Image1.ImageUrl =imgUrl;

        aZoom.HRef = imgUrl;
    }
コード例 #3
0
ファイル: AddNews.aspx.cs プロジェクト: ZhaiQuan/Zhai
    /// <summary>
    /// 绑定要修改的新闻信息
    /// </summary>
    /// <param name="id">要修改的新闻ID</param>
    private void NewsDataBind(Int64 id)
    {
        newsInfo = new XYECOM.Business.News().GetItem(newsId);

        if (newsInfo != null)
        {
            string newstypeckId = "";
            //新闻类型
            if (newsInfo.Type == XYECOM.Model.NewsType.TextNews)
            {
                this.rbcommonnews.Checked = true;
                this.rbpicnews.Checked = false;
                this.rbcaptionnews.Checked = false;
                newstypeckId = this.rbcommonnews.ClientID;
            }
            else if (newsInfo.Type == XYECOM.Model.NewsType.ImageNews)
            {
                this.rbpicnews.Checked = true;
                this.rbcommonnews.Checked = false;
                this.rbcaptionnews.Checked = false;
                newstypeckId = this.rbpicnews.ClientID;
            }
            else if (newsInfo.Type == XYECOM.Model.NewsType.HeadlineNews)
            {
                this.rbcaptionnews.Checked = true;
                this.rbcommonnews.Checked = false;
                this.rbpicnews.Checked = false;
                newstypeckId = this.rbcaptionnews.ClientID;
            }

            this.tbnewsname.Text = newsInfo.Title;

            //if (newsInfo.FileUrl != "")
            //{
            //    rbfileUrl.Checked = true;
            //    txtfileUrl.Text = newsInfo.FileUrl;
            //}

            if (!newsInfo.TitleStyle.Equals(""))
            {
                string[] strs = newsInfo.TitleStyle.Split(';');

                foreach (string s in strs)
                {
                    if (s.Equals("")) continue;

                    string[] ss = s.Split(':');

                    if (ss.Length != 2) continue;

                    if (ss[0].Equals("color"))
                    {
                        this.txtTitleColor.Value = ss[1];
                        this.selTitleColor.Value = ss[1];
                    }

                    if (ss[0].Equals("font-weight")) this.chkFontBold.Checked = true;

                    if (ss[0].Equals("font-style")) this.chkFontItalic.Checked = true;

                    if (ss[0].Equals("text-decoration")) this.chkFontUnderline.Checked = true;
                }
            }

            if (newsInfo.TypeIds != "")
            {
                this.hdgetid.Value = XYECOM.Core.Utils.RemoveComma(newsInfo.TypeIds.ToString());
            }

            hidTopicID.Value = newsInfo.TopicType;

            this.tbtwoname.Text = newsInfo.SubTitle;
            this.reswords.Text = newsInfo.Keyword;
            this.tbnewsness.Text = newsInfo.Leadin;
            this.tblinkaddress.Text = newsInfo.HeadlineNewsUrl;

            //附件信息
            DataTable tableAttInfo = new XYECOM.Business.Attachment().GetDataTable(newsInfo.NewsId, XYECOM.Model.AttachmentItem.News, XYECOM.Model.UploadFileType.Image);
            string uploadTypeckId = "";
            if (tableAttInfo.Rows.Count > 0 && newsInfo.PicUrl.Equals("Image"))
            {
                this.rbpicupload.Checked = true;
                this.rbpicurl.Checked = false;

                uploadTypeckId = this.rbpicupload.ClientID;
            }
            else
            {
                this.hipictype.Value = "-1";
                this.hdpicurl.Value = newsInfo.PicUrl;
                this.rbpicurl.Checked = true;
                this.rbpicupload.Checked = false;
                this.tbpinurl.Value = newsInfo.PicUrl;
                uploadTypeckId = this.rbpicurl.ClientID;
            }

            this.tbnewsauthor.Text = newsInfo.Author;
            this.ddlnewsauthor.SelectedValue = this.tbnewsauthor.Text.Trim();
            this.tbnewsorigin.Text = newsInfo.Origin;
            this.ddlnewsorigin.SelectedValue = this.tbnewsorigin.Text.Trim();
            this.newsBody.Value = newsInfo.Content;

            if (newsInfo.AddTime != "")
            {
                try
                {
                    this.tbaddtime.Value = Convert.ToDateTime(newsInfo.AddTime).ToShortDateString();
                }
                catch
                {
                    this.tbaddtime.Value = DateTime.Now.ToShortDateString();
                }
            }

            this.tbcount.Text = newsInfo.ClickNumber.ToString();

            this.cbIsFlag.Checked = newsInfo.IsCommend;

            this.cbIsDiscuss.Checked = newsInfo.IsAllowComment;

            this.cbIsTop.Checked = newsInfo.IsTop;

            this.cbIsHot.Checked = newsInfo.IsHot;

            this.cbIsSlide.Checked = newsInfo.IsSlide;

            if (newsInfo.State == XYECOM.Model.AuditingState.NoPass)
            {
                this.cbAuditing.Checked = false;
            }
            if (newsInfo.State == XYECOM.Model.AuditingState.Passed)
            {
                this.cbAuditing.Checked = true;
            }

            if (newsInfo.ChargeState != "1")
            {
                if (newsInfo.HTMLPage != "")
                {
                    this.cbcreate.Checked = true;
                }
            }
            else
            {
                this.cbcreate.Enabled = false;
            }

            if (newsInfo.Contributor.Equals(0))
            {
                this.IsContributor.Visible = false;
            }
            else
            {
                if (newsInfo.Contributor.ToString() == "-1")
                {
                    this.Contributor.InnerHtml = "<a href=\"#\">游客</a>";
                }
                else
                {
                    XYECOM.Business.UserReg urBLL = new UserReg();
                    XYECOM.Model.UserRegInfo urinfo = new XYECOM.Model.UserRegInfo();
                    urinfo = urBLL.GetItem(newsInfo.Contributor);
                    if (!urinfo.Type)
                        this.Contributor.InnerHtml = "<a href=\"../UserManage/IndividualInfo.aspx?U_ID=" + newsInfo.Contributor + "&backURL=../news/AddNews.aspx?id=" + newsId + "&" + XYECOM.Core.XYRequest.GetQueryString("backURL") + "\">" + newsInfo.Author + "(个人会员)</a>";
                    else
                        this.Contributor.InnerHtml = "<a href=\"../UserManage/UserInfo.aspx?U_ID=" + newsInfo.Contributor + "&backURL=../news/AddNews.aspx?id=" + newsId + "&" + XYECOM.Core.XYRequest.GetQueryString("backURL") + "\">" + newsInfo.Author + "(企业会员)</a>";
                }

            }

            this.city.Value = XYECOM.Core.Utils.RemoveComma(newsInfo.AreaIds);

            this.tradeid.Value = XYECOM.Core.Utils.RemoveComma(newsInfo.TradeIds);

            this.offerid.Value = XYECOM.Core.Utils.RemoveComma(newsInfo.ProtypeIds);

            InitOption(newsInfo.FileUrl);

            ClientScript.RegisterStartupScript(GetType(), Guid.NewGuid().ToString(), "myclick('" + newstypeckId + "','click');", true);
            ClientScript.RegisterStartupScript(GetType(), Guid.NewGuid().ToString(), "myclick('" + uploadTypeckId + "','click');", true);

            if (newsInfo.IsScheme == 1)
                this.cbIsScheme.Checked = true;

            if (newsInfo.IsScheme != 0 && newsInfo.ProIds != null)
            {
                string StrHtml = "";
                string[] IdsArry = newsInfo.ProIds.Split(',');
                string ItemStr = "";

                for (int i = 0; i < IdsArry.Length; i++)
                {
                    if (IdsArry[i] != null)
                    {
                        XYECOM.Model.SupplyInfo SupplyInfo = SupplyBLL.GetSupplyById(XYECOM.Core.MyConvert.GetInt32(IdsArry[i]));

                        StrHtml += "<input checked='checked' onclick=\"Selectchange('" + IdsArry[i] + "')\" type='checkbox' id='cbsel_" + IdsArry[i] + "' value='" + IdsArry[i] + "'/><label>" + SupplyInfo.Title + "</label>";
                        ItemStr += IdsArry[i] + ":" + SupplyInfo.Title + ",";
                    }
                }
                this.Infostxt.Text = StrHtml;
                this.HidItemStr.Value = ItemStr.Substring(0, ItemStr.Length - 1);
            }
        }
    }
コード例 #4
0
ファイル: UserReg.cs プロジェクト: xyecom/AMS
        /// <summary>
        /// ɾ���û�
        /// </summary>
        /// <param name="userIds">�û���ż���</param>
        /// <returns>Ӱ������</returns>
        public int Delete(string userIds)
        {
            Business.Attachment attBLL = new Attachment();

            attBLL.Delete(userIds, XYECOM.Model.AttachmentItem.User, XYECOM.Model.UploadFileType.All);

            return DAL.Delete(userIds);
        }