Ejemplo n.º 1
0
        protected void txtSave_Click(object sender, EventArgs e)
        {
            listWebPage = bllWebPage.GetModelList("username='******'");
            webPageID = listWebPage[0].PageID;

            string strComName = txtComName.Text.Trim();
            string strComLink = txtComLink.Text.Trim();
            string strModel = txtModel.Text.Trim();
            string strAddress = txtAddress.Text.Trim();
            string strComIntroduction = txtComIntroduction.Text.Trim();
            string strCompanyMain = txtCompanyMain.Text.Trim();
            string strPhone = txtPhone.Text.Trim();
            string strImages = ucUpload.UcImageUrl;

            if (strComIntroduction != "" && strAddress != "" && strModel != "" && strComLink != "" && strComName != "" && strCompanyMain != "" && strPhone != "" && strImages != "")
            {
                Model.WebPage modelWepPage = bllWebPage.GetModel(webPageID);
                modelExtend = bllExtend.GetModel(modelWepPage.ExtendID);

                modelWepPage.Title = strComName;
                modelWepPage.Images = strImages;
                modelWepPage.Detail = strComIntroduction;
                modelWepPage.Link = strComLink;
                modelWepPage.UserName = bp_curUser;
                modelWepPage.ApprovedState = (int)BLL.TypeEnum.WebPageApprovedState.未审核;
                modelWepPage.PageProperty = Convert.ToString((int)BLL.TypeEnum.WebPageProperty.一般企业);

                modelExtend.F1 = strComName;   //公司全名
                modelExtend.F2 = strCompanyMain;//公司主营
                modelExtend.F3 = strModel;//经营模式
                modelExtend.F4 = strAddress;//公司地址
                modelExtend.F5 = strPhone;//联系方式

                bllExtend.Update(modelExtend);
                bllWebPage.Update(modelWepPage);

                lv_Common.MessageBox.ShowAndRedirect(this.Page, "修改成功!", "ManageBusinessman.aspx");
            }
            else
            {
                lv_Common.MessageBox.Show(this.Page, "请填写完整信息");
            }
        }
Ejemplo n.º 2
0
 public void Evaluate()
 {
     _pageID = Convert.ToInt32(Request["id"]);
     modelExtend = bllExtend.GetModel(bllWebPage.GetModel(_pageID).ExtendID);
 }
Ejemplo n.º 3
0
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            if (CheckInput())
            {
                int extendID = 0;
                if (ExtendTypeID != 0)
                {
                    Model.Extend modelExtend = new Model.Extend();
                    #region Extend表赋值
                    modelExtend.ExtendTypeID = ExtendTypeID;
                    modelExtend.F1 = txtF1.Text;
                    modelExtend.F2 = txtF2.Text;
                    modelExtend.F3 = txtF3.Text;
                    modelExtend.F4 = txtF4.Text;
                    modelExtend.F5 = txtF5.Text;
                    modelExtend.F6 = txtF6.Text;
                    modelExtend.F7 = txtF7.Text;
                    modelExtend.F8 = txtF8.Text;
                    modelExtend.F9 = txtF9.Text;
                    modelExtend.FA = txtFA.Text;
                    modelExtend.FB = txtFB.Text;
                    modelExtend.FC = txtFC.Text;
                    modelExtend.FD = txtFD.Text;
                    modelExtend.FE = txtFE.Text;
                    modelExtend.FF = txtFF.Text;
                    modelExtend.FG = txtFG.Text;
                    modelExtend.FH = txtFH.Text;
                    modelExtend.FI = txtFI.Text;
                    modelExtend.FJ = txtFJ.Text;
                    modelExtend.FK = txtFK.Text;
                    modelExtend.FL = txtFL.Text;
                    modelExtend.FM = txtFM.Text;
                    modelExtend.FN = txtFN.Text;
                    modelExtend.FO = txtFO.Text;
                    modelExtend.FP = txtFP.Text;
                    modelExtend.FQ = txtFQ.Text;
                    modelExtend.FR = txtFR.Text;
                    modelExtend.FS = txtFS.Text;
                    modelExtend.FT = txtFT.Text;
                    modelExtend.FU = txtFU.Text;
                    modelExtend.FV = txtFV.Text;
                    modelExtend.FW = txtFW.Text;
                    modelExtend.FX = txtFX.Text;
                    modelExtend.FY = txtFY.Text;
                    modelExtend.FZ = txtFZ.Text;
                    #endregion
                    bllExtend.Add(modelExtend);
                    extendID = modelExtend.ExtendID;
                }

                Model.Info modelInfo = new Model.Info();
                #region Info表赋值
                modelInfo.CategoryID = int.Parse(ddlCategory.SelectedValue);
                modelInfo.Title = txtTitle.Text;    //标题
                modelInfo.Title_en = txtTitle_en.Text;//英文标题
                modelInfo.InfoType = int.Parse(ddlInfoType.SelectedValue);//信息类型
                List<string> infoProperty = new List<string>();
                for (int i = 0; i < chkInfoProperty.Items.Count; i++)
                {
                    bool isSelected = chkInfoProperty.Items[i].Selected;
                    string strIsSelected = BLL.TypeEnum.BoolAction.GetBool(isSelected, "1", "0");
                    infoProperty.Add(strIsSelected);
                }
                modelInfo.InfoProperty = lv_Common.StringPlus.ConvertListToString(infoProperty);//信息属性
                modelInfo.ApprovedState = Convert.ToInt32(ddlApprovedState.SelectedValue); //审核状态
                //modelInfo.ApprovedTimeList = ApprovedTimeList;
                modelInfo.Images = UpLoadControls1.UcImageUrl; //图片
                //modelInfo.AlbumID = Convert.ToInt32(ddlAlbum.SelectedValue); //关联相册ID
                modelInfo.Summary = txtSummary.Text; //简介
                modelInfo.Detail = txtDetail.Value;  //详细内容
                if (txtAuthor.Text != "")
                {
                    modelInfo.Author = txtAuthor.Text;   //作者
                }
                else
                {
                    modelInfo.Author = ddlAuthor.SelectedItem.Text;
                }
                modelInfo.InfoFrom = txtInfoFrom.Text; //信息来源
                modelInfo.CreateDate = Convert.ToDateTime(txtCreateDate.Text); //发布时间
                //modelInfo.CreateBy = bp_curUser;
                modelInfo.ModifyDate = DateTime.Now; //修改时间
                modelInfo.ModifyBy = bp_curUser;  //修改者
                modelInfo.Hits = Convert.ToInt32((txtHits.Text == "") ? "0" : txtHits.Text); //点击次数
                modelInfo.Link = txtLink.Text; //外部链接
                //modelInfo.SiteID = SiteID;
                //modelInfo.IsShow = IsShow;
                //modelInfo.IsDel = IsDel;
                //modelInfo.Types = Types;
                modelInfo.Sort = Convert.ToInt32((txtSort.Text == "") ? "0" : txtSort.Text); //排序
                //modelInfo.Tag = Tag;
                //modelInfo.JasonVlaue = JasonVlaue;
                //modelInfo.StringArrayValue = StringArrayValue;
                modelInfo.ExtendID = extendID; //扩展ID
                #endregion
                bllInfo.Add(modelInfo);
                lv_Common.MessageBox.ShowAndRedirect(this.Page, "新增成功", "List.aspx");

            }
        }