Exemplo n.º 1
0
    //=====================================================================
    //  FunctionName : Initalize
    /// <summary>
    /// 重载初始化函数
    /// </summary>
    //=====================================================================
    protected override void Initalize()
    {
        DetailPage = true;
        gvList.Columns[intFBHColumnIndex].Visible     = chkShowFBH.Checked;
        gvList.Columns[intBTColumnIndex].Visible      = chkShowBT.Checked;
        gvList.Columns[intFBLMColumnIndex].Visible    = chkShowFBLM.Checked;
        gvList.Columns[intFBBMColumnIndex].Visible    = chkShowFBBM.Checked;
        gvList.Columns[intXXLXColumnIndex].Visible    = chkShowXXLX.Checked;
        gvList.Columns[intFJXZDZColumnIndex].Visible  = chkShowFJXZDZ.Checked;
        gvList.Columns[intXXZTColumnIndex].Visible    = chkShowXXZT.Checked;
        gvList.Columns[intIsTopColumnIndex].Visible   = chkShowIsTop.Checked;
        gvList.Columns[intTopSortColumnIndex].Visible = chkShowTopSort.Checked;
        gvList.Columns[intIsBestColumnIndex].Visible  = chkShowIsBest.Checked;
        gvList.Columns[intFBRJGHColumnIndex].Visible  = chkShowFBRJGH.Checked;
        gvList.Columns[intFBSJRQColumnIndex].Visible  = chkShowFBSJRQ.Checked;
        gvList.Columns[intFBIPColumnIndex].Visible    = chkShowFBIP.Checked; FBLM.RepeatColumns = 1;

        // 数据查询
        appData = new T_BG_0601ApplicationData();
        QueryRecord();
        gvList.DataSource = appData.ResultSet;
        gvList.DataBind();
        ViewState["RecordCount"] = appData.RecordCount;
        ViewState["CurrentPage"] = appData.CurrentPage;
        ViewState["PageSize"]    = appData.PageSize;
        ViewState["PageCount"]   = FunctionManager.RoundInt(((int)ViewState["RecordCount"] / (float)(int)ViewState["PageSize"]));
        InitPageInfo();
    }
Exemplo n.º 2
0
 protected override void FilterReportList_SelectedIndexChanged(object sender, EventArgs e)
 {
     appData = new T_BG_0601ApplicationData();
     FilterReportName.Text = string.Empty;
     if (FilterReportList.SelectedIndex > 0)
     {
         FilterReportApplicationData filterReportApplicationData = FilterReportBusinessEntity.GetDataByObjectID(FilterReportList.SelectedValue);
         T_BG_0601ApplicationData    obj = new T_BG_0601ApplicationData();
         appData = JsonHelper.JsonToObject(filterReportApplicationData.BGCXTJ, appData) as T_BG_0601ApplicationData;
         FilterReportName.Text = filterReportApplicationData.BGMC;
     }
     if (appData != null)
     {
         BT.Text              = GetValue(appData.BT);
         FBLM.SelectedValue   = GetValue(appData.FBLMBatch);
         FBBM.SelectedValue   = GetValue(appData.FBBM);
         XXNR.Text            = GetValue(appData.XXNR);
         FBSJRQ.Text          = GetValue(appData.FBSJRQBegin);
         FBSJRQ.Text          = GetValue(appData.FBSJRQEnd);
         FBSJRQ.Text          = GetValue(appData.FBSJRQ);
         FBH.Text             = GetValue(appData.FBH);
         XXLX.SelectedValue   = GetValue(appData.XXLX);
         IsTop.SelectedValue  = GetValue(appData.IsTop);
         IsBest.SelectedValue = GetValue(appData.IsBest);
         FBRJGH.Text          = GetValue(appData.FBRJGH);
     }
     Initalize();
 }
Exemplo n.º 3
0
        protected override void Initalize()
        {
            // 读取记录详细资料
            appData          = new T_BG_0601ApplicationData();
            appData.ObjectID = ObjectID;
            appData.OPCode   = RICH.Common.Base.ApplicationData.ApplicationDataBase.OPType.ID;
            QueryRecord();
            Header.DataBind();
            rptDetail.DataSource = appData.ResultSet;
            rptDetail.DataBind();

            if (!IsPostBack)
            {
                foreach (DataRow drTemp in appData.ResultSet.Tables[0].Rows)
                {
                    //记录日志开始
                    string strLogTypeID = "A10";
                    strMessageParam[0] = (string)Session[ConstantsManager.SESSION_USER_LOGIN_NAME];
                    strMessageParam[1] = "公共信息";
                    strMessageParam[2] = drTemp["BT"].ToString();
                    string strLogContent = MessageManager.GetMessageInfo(MessageManager.LOG_MSGID_0012, strMessageParam);
                    RICH.Common.LM.LogLibrary.LogWrite(strLogTypeID, strLogContent, null, drTemp["ObjectID"].ToString(), null);
                    //记录日志结束
                }
            }
        }
    //=====================================================================
    //  FunctionName : Initalize
    /// <summary>
    /// 重载初始化函数
    /// </summary>
    //=====================================================================
    protected override void Initalize()
    {
        // 界面初始化
        // 初始化打印页面大小
        ddlPrintPageSize.Items.Add(new System.Web.UI.WebControls.ListItem("A4", "A4"));
        ddlPrintPageSize.Items.Add(new System.Web.UI.WebControls.ListItem("A3", "A3"));
        // 初始化打印页面方向大小
        ddlPrintPageOrientation.Items.Add(new System.Web.UI.WebControls.ListItem("竖向", "portrait"));
        ddlPrintPageOrientation.Items.Add(new System.Web.UI.WebControls.ListItem("横向", "landscape"));

        // 读取记录详细资料
        appData          = new T_BG_0601ApplicationData();
        appData.ObjectID = ObjectID;
        appData.OPCode   = RICH.Common.Base.ApplicationData.ApplicationDataBase.OPType.ID;
        QueryRecord();
        Header.DataBind();
        gvPrint.DataSource = appData.ResultSet;
        gvPrint.DataBind();

        if (IsPostBack != true)
        {
            foreach (DataRow drTemp in appData.ResultSet.Tables[0].Rows)
            {
                //记录日志开始
                string strLogTypeID = "A10";
                strMessageParam[0] = (string)Session[ConstantsManager.SESSION_USER_LOGIN_NAME];
                strMessageParam[1] = "公共信息";
                strMessageParam[2] = drTemp["BT"].ToString();
                string strLogContent = MessageManager.GetMessageInfo(MessageManager.LOG_MSGID_0012, strMessageParam);
                RICH.Common.LM.LogLibrary.LogWrite(strLogTypeID, strLogContent, null, drTemp["ObjectID"].ToString(), null);
                //记录日志结束
            }
        }
    }
Exemplo n.º 5
0
    //=====================================================================
    //  FunctionName : Initalize
    /// <summary>
    /// 重载初始化函数
    /// </summary>
    //=====================================================================
    protected override void Initalize()
    {
        // 初始化界面
        XXNR.ImageGalleryPath = "~/Media/Image/FreeTextBox/" + Session[RICH.Common.ConstantsManager.SESSION_USER_ID] + "/";

        // 界面控件状态

        if (ViewMode || EditMode || CopyMode)
        {
            // 读取要修改记录详细资料
            appData = new T_BG_0601ApplicationData
            {
                ObjectID = base.ObjectID,
                OPCode   = RICH.Common.Base.ApplicationData.ApplicationDataBase.OPType.ID
            };
            QueryRecord();
            // 控件赋值
            if (appData.RecordCount > 0)
            {
                ObjectID.Text        = GetValue(appData.ResultSet.Tables[0].Rows[0]["ObjectID"]);
                FBH.Text             = GetValue(appData.ResultSet.Tables[0].Rows[0]["FBH"]);
                BT.Text              = GetValue(appData.ResultSet.Tables[0].Rows[0]["BT"]);
                FBLM.SelectedValue   = GetValue(appData.ResultSet.Tables[0].Rows[0]["FBLM"]);
                FBBM.SelectedValue   = GetValue(appData.ResultSet.Tables[0].Rows[0]["FBBM"]);
                XXLX.SelectedValue   = GetValue(appData.ResultSet.Tables[0].Rows[0]["XXLX"]);
                XXTPDZ.Text          = GetValue(appData.ResultSet.Tables[0].Rows[0]["XXTPDZ"]);
                XXNR.Text            = GetValue(appData.ResultSet.Tables[0].Rows[0]["XXNR"]);
                FJXZDZ.Text          = GetValue(appData.ResultSet.Tables[0].Rows[0]["FJXZDZ"]);
                XXZT.SelectedValue   = GetValue(appData.ResultSet.Tables[0].Rows[0]["XXZT"]);
                IsTop.SelectedValue  = GetValue(appData.ResultSet.Tables[0].Rows[0]["IsTop"]);
                TopSort.Text         = GetValue(appData.ResultSet.Tables[0].Rows[0]["TopSort"]);
                IsBest.SelectedValue = GetValue(appData.ResultSet.Tables[0].Rows[0]["IsBest"]);
                FBRJGH.Text          = GetValue(appData.ResultSet.Tables[0].Rows[0]["FBRJGH"]);
                FBSJRQ.Text          = GetValue(appData.ResultSet.Tables[0].Rows[0]["FBSJRQ"]);
                FBIP.Text            = GetValue(appData.ResultSet.Tables[0].Rows[0]["FBIP"]);
            }
        }
        if (AddMode)
        {
            // 初始化传入参数

            if (!DataValidateManager.ValidateIsNull(Request.QueryString["FBLM"]))
            {
                FBLM.SelectedValue = GetValue(Request.QueryString["FBLM"]);
                FBLM.Enabled       = false;
            }

            if (!DataValidateManager.ValidateIsNull(Request.QueryString["FBBM"]))
            {
                FBBM.SelectedValue = GetValue(Request.QueryString["FBBM"]);
                FBBM.Enabled       = false;
            }

            // 初始化默认值
            FBBM.SelectedValue = CurrentUserInfo.SubjectID;
        }
    }
 //=====================================================================
 //  FunctionName : Initalize
 /// <summary>
 /// 重载初始化函数
 /// </summary>
 //=====================================================================
 protected override void Initalize()
 {      
     // 创建信息标题
     lblCaption.Text = GetTableCaption();
     gvPrint.CaptionAlign = TableCaptionAlign.Left;
     // 数据统计
     appData = new T_BG_0601ApplicationData();
     CountRecord();
     gvPrint.DataSource = appData.ResultSet;
     gvPrint.DataBind();
 }
 protected override void Initalize()
 {
     DetailPage = true;
     // 数据查询
     appData = new T_BG_0601ApplicationData();
     QueryRecord();
     rptList.DataSource = appData.ResultSet;
     rptList.DataBind();
     ViewState["RecordCount"] = appData.RecordCount;
     ViewState["CurrentPage"] = appData.CurrentPage;
     ViewState["PageSize"]    = appData.PageSize;
     ViewState["PageCount"]   = FunctionManager.RoundInt(((int)ViewState["RecordCount"] / (float)(int)ViewState["PageSize"]));
     InitPageInfo();
 }
Exemplo n.º 8
0
    protected override void btnSaveFilterReport_Click(object sender, EventArgs e)
    {
        if (FilterReportName.Text.IsHtmlNullOrWiteSpace())
        {
            return;
        }
        appData = new T_BG_0601ApplicationData();
        GetQueryInputParameter();
        FilterReportApplicationLogic filterReportApplicationLogic = (FilterReportApplicationLogic)CreateApplicationLogicInstance(typeof(FilterReportApplicationLogic));
        FilterReportApplicationData  filterReportApplicationData  = new FilterReportApplicationData()
        {
            BGMC   = FilterReportName.Text.TrimIfNotNullOrWhiteSpace(),
            UserID = (string)Session[ConstantsManager.SESSION_USER_ID],
            BGLX   = FilterReportType,
            GXBG   = "0",
            XTBG   = "0",
            BGCXTJ = JsonHelper.ObjectToJson(appData),
            BGCJSJ = DateTime.Now,
        };
        FilterReportApplicationData filterReportQueryApplicationData;

        if (!FilterReportName.Text.IsHtmlNullOrWiteSpace())
        {
            filterReportQueryApplicationData = new FilterReportApplicationData()
            {
                BGMC        = FilterReportName.Text.TrimIfNotNullOrWhiteSpace(),
                UserID      = (string)Session[ConstantsManager.SESSION_USER_ID],
                BGLX        = FilterReportType,
                XTBG        = "0",
                CurrentPage = 1,
                PageSize    = 1000,
            };
            filterReportQueryApplicationData = filterReportApplicationLogic.Query(filterReportQueryApplicationData);
            if (filterReportQueryApplicationData.ResultSet.Tables.Count > 0)
            {
                foreach (DataRow item in filterReportQueryApplicationData.ResultSet.Tables[0].Rows)
                {
                    filterReportApplicationLogic.Delete(new FilterReportApplicationData()
                    {
                        ObjectID = GetValue(item["ObjectID"]), OPCode = RICH.Common.Base.ApplicationData.ApplicationDataBase.OPType.ID
                    });
                }
            }
        }
        filterReportApplicationLogic.Add(filterReportApplicationData);
        FilterReportDataBind((string)Session[ConstantsManager.SESSION_USER_ID], FilterReportList);
        FilterReportList.Items.FindByText(FilterReportName.Text.TrimIfNotNullOrWhiteSpace()).Selected = true;
    }
Exemplo n.º 9
0
    protected override string GetObjectID()
    {
        appData = new T_BG_0601ApplicationData();

        appData.OPCode      = RICH.Common.Base.ApplicationData.ApplicationDataBase.OPType.ALL;
        appData.PageSize    = 1;
        appData.CurrentPage = 1;
        QueryRecord();
        if (appData.RecordCount == 1)
        {
            return(GetValue(appData.ResultSet.Tables[0].Rows[0]["ObjectID"]));
        }
        else
        {
            return(string.Empty);
        }
    }
Exemplo n.º 10
0
    protected void btnInfoFromDocBatch_Click(object sender, EventArgs e)
    {
        DataTable dt = new DataTable();

        dt = GetTemplateColumn(dt);
        dt = FileLibrary.GetDataFromWordBatch(ConstantsManager.WEBSITE_VIRTUAL_ROOT_DIR + "/" + ConstantsManager.UPLOAD_DOC_DIR + "/" + "T_BG_0601", dt, true, true);
        T_BG_0601ApplicationLogic instanceT_BG_0601ApplicationLogic = (T_BG_0601ApplicationLogic)CreateApplicationLogicInstance(typeof(T_BG_0601ApplicationLogic));

        foreach (DataRow dr in dt.Rows)
        {
            appData = new T_BG_0601ApplicationData();

            appData.FBH = instanceT_BG_0601ApplicationLogic.AutoGenerateFBH(appData);

            int i = 0;

            appData = instanceT_BG_0601ApplicationLogic.Add(appData);
        }
    }
Exemplo n.º 11
0
    //=====================================================================
    //  FunctionName : ExportToFile
    /// <summary>
    /// 重载导出到文件函数
    /// </summary>
    //=====================================================================
    protected override void ExportToFile()
    {
        CustomColumnIndex();
        appData = new T_BG_0601ApplicationData();
        QueryRecord();
        gvPrint.Visible    = true;
        gvPrint.DataSource = appData.ResultSet;
        gvPrint.DataBind();

        gvPrint.Columns[intFBHColumnIndex - 1].Visible     = chkShowFBH.Checked;
        gvPrint.Columns[intBTColumnIndex - 1].Visible      = chkShowBT.Checked;
        gvPrint.Columns[intFBLMColumnIndex - 1].Visible    = chkShowFBLM.Checked;
        gvPrint.Columns[intFBBMColumnIndex - 1].Visible    = chkShowFBBM.Checked;
        gvPrint.Columns[intXXLXColumnIndex - 1].Visible    = chkShowXXLX.Checked;
        gvPrint.Columns[intFJXZDZColumnIndex - 1].Visible  = chkShowFJXZDZ.Checked;
        gvPrint.Columns[intXXZTColumnIndex - 1].Visible    = chkShowXXZT.Checked;
        gvPrint.Columns[intIsTopColumnIndex - 1].Visible   = chkShowIsTop.Checked;
        gvPrint.Columns[intTopSortColumnIndex - 1].Visible = chkShowTopSort.Checked;
        gvPrint.Columns[intIsBestColumnIndex - 1].Visible  = chkShowIsBest.Checked;
        gvPrint.Columns[intFBRJGHColumnIndex - 1].Visible  = chkShowFBRJGH.Checked;
        gvPrint.Columns[intFBSJRQColumnIndex - 1].Visible  = chkShowFBSJRQ.Checked;
        gvPrint.Columns[intFBIPColumnIndex - 1].Visible    = chkShowFBIP.Checked;
        // 创建信息标题
        gvPrint.Caption      = GetTableCaption();
        gvPrint.CaptionAlign = TableCaptionAlign.Left;
        switch (ddlExportFileFormat.SelectedValue.ToLower())
        {
        case "xls":
            FileLibrary.ExportToExcelFile(gvPrint, "Result");
            break;

        case "doc":
            FileLibrary.ExportToWordFile(gvPrint, "Result");
            break;

        default:
            FileLibrary.ExportToExcelFile(gvPrint, "Result");
            break;
        }
        gvPrint.Visible = false;
    }
 //=====================================================================
 //  FunctionName : Initalize
 /// <summary>
 /// ÖØÔسõʼ»¯º¯Êý
 /// </summary>
 //=====================================================================
 protected override void Initalize()
 {
     try
     {
         appData          = new T_BG_0601ApplicationData();
         appData.OPCode   = RICH.Common.Base.ApplicationData.ApplicationDataBase.OPType.ID;
         appData.ObjectID = (string)Request.QueryString["ObjectID"];
         QueryRecord();
         if (appData.ResultSet.Tables[0].Rows.Count > 0)
         {
             if (appData.ResultSet.Tables[0].Rows[0][Request.QueryString["ImageField"]] != DBNull.Value)
             {
                 Response.ContentType = "application/octet-stream";
                 Response.BinaryWrite((Byte[])appData.ResultSet.Tables[0].Rows[0][Request.QueryString["ImageField"]]);
                 Response.End();
             }
             else
             {
                 Response.ClearContent();
                 Response.ContentType = "image/Png";
                 Response.BinaryWrite(RICH.Common.GenerateImage.GetStringImage("ÔÝÎÞͼƬ", 130, 160, 18, 10, 0).ToArray());
                 Response.End();
             }
         }
         else
         {
             Response.ClearContent();
             Response.ContentType = "image/Png";
             Response.BinaryWrite(RICH.Common.GenerateImage.GetStringImage("ÔÝÎÞͼƬ", 130, 160, 18, 10, 0).ToArray());
             Response.End();
         }
     }
     catch (Exception)
     {
         Response.ContentType = "image/Png";
         Response.BinaryWrite(RICH.Common.GenerateImage.GetStringImage("ÔÝÎÞͼƬ", 130, 160, 18, 10, 0).ToArray());
         Response.End();
     }
 }
 //=====================================================================
 //  FunctionName : ExportToFile
 /// <summary>
 /// 重载导出到文件函数
 /// </summary>
 //=====================================================================
 protected override void ExportToFile()
 {
     appData = new T_BG_0601ApplicationData();
     CountRecord();
     gvPrint.DataSource = appData.ResultSet;
     gvPrint.DataBind();
     // 创建信息标题
     gvPrint.Caption = GetTableCaption();
     gvPrint.CaptionAlign = TableCaptionAlign.Left;
     switch (ddlExportFileFormat.SelectedValue.ToLower())
     {
         case "xls":
             FileLibrary.ExportToExcelFileWithoutControl(gvPrint, "Result");
             break;
         case "doc":
             FileLibrary.ExportToWordFileWithoutControl(gvPrint, "Result");
             break;
         default:
             FileLibrary.ExportToExcelFileWithoutControl(gvPrint, "Result");
             break;
     }
 }
    //=====================================================================
    //  FunctionName : ExportToFile
    /// <summary>
    /// 重载ExportToFile
    /// </summary>
    //=====================================================================
    protected override void ExportToFile()
    {
        appData          = new T_BG_0601ApplicationData();
        appData.OPCode   = RICH.Common.Base.ApplicationData.ApplicationDataBase.OPType.ID;
        appData.ObjectID = base.ObjectID;
        QueryRecord();
        gvPrint.Visible    = true;
        gvPrint.DataSource = appData.ResultSet;
        gvPrint.DataBind();
        switch (ddlExportFileFormat.SelectedValue.ToLower())
        {
        case "xls":
            FileLibrary.ExportToExcelFile(gvPrint, "Result");
            break;

        case "doc":
            FileLibrary.ExportToWordFile(gvPrint, "Result");
            break;

        case "pdf":
            string pageSize        = ddlPrintPageSize.SelectedValue;
            bool   boolOrientation = ddlPrintPageOrientation.SelectedValue == "landscape" ? true : false;
            float  marginTop       = DataValidateManager.ValidateNumberFormat(txtMarginTop.Text) == true?Convert.ToSingle(txtMarginTop.Text) : 50;

            float marginRight = DataValidateManager.ValidateNumberFormat(txtMarginRight.Text) == true?Convert.ToSingle(txtMarginRight.Text) : 50;

            float marginBottom = DataValidateManager.ValidateNumberFormat(txtMarginBottom.Text) == true?Convert.ToSingle(txtMarginBottom.Text) : 50;

            float marginLeft = DataValidateManager.ValidateNumberFormat(txtMarginLeft.Text) == true?Convert.ToSingle(txtMarginLeft.Text) : 50;

            ExportToPDFFile(appData.ResultSet, "Result", pageSize, boolOrientation, marginTop, marginRight, marginBottom, marginLeft);
            break;

        default:
            FileLibrary.ExportToExcelFile(gvPrint, "Result");
            break;
        }
        gvPrint.Visible = false;
    }
Exemplo n.º 15
0
    protected void btnInfoFromDS_Click(object sender, EventArgs e)
    {
        int totalCount  = 0;
        int importCount = 0;
        int updateCount = 0;

        try
        {
            var appDatas = T_BG_0601ApplicationData.GetDataFromDataFile <T_BG_0601ApplicationData>(InfoFromDoc.Text, true, true, recordStartLine: T_BG_0601Contants.ImportDataSetStartLineNum);
            T_BG_0601ApplicationLogic instanceT_BG_0601ApplicationLogic = (T_BG_0601ApplicationLogic)CreateApplicationLogicInstance(typeof(T_BG_0601ApplicationLogic));
            totalCount = appDatas.Count;
            foreach (var app in appDatas)
            {
                app.FBH = instanceT_BG_0601ApplicationLogic.AutoGenerateFBH(app);

                if (!BT.Text.IsHtmlNullOrWiteSpace())
                {
                    app.BT = Convert.ToString(BT.Text);
                }

                string strFBLM = GetValue(new RICH.Common.BM.T_BG_0602.T_BG_0602ApplicationLogicBase().GetValueByFixCondition("LMM", app.FBLM, "LMH"));
                if (!DataValidateManager.ValidateIsNull(strFBLM))
                {
                    app.FBLM = strFBLM;
                }
                if (!FBLM.SelectedValue.IsHtmlNullOrWiteSpace())
                {
                    app.FBLM = Convert.ToString(FBLM.SelectedValue);
                }

                string strFBBM = GetValue(new RICH.Common.BM.T_BM_DWXX.T_BM_DWXXApplicationLogicBase().GetValueByFixCondition("DWMC", app.FBBM, "DWBH"));
                if (!DataValidateManager.ValidateIsNull(strFBBM))
                {
                    app.FBBM = strFBBM;
                }
                if (!FBBM.SelectedValue.IsHtmlNullOrWiteSpace())
                {
                    app.FBBM = Convert.ToString(FBBM.SelectedValue);
                }

                string strXXLX = GetValue(new RICH.Common.BM.Dictionary.DictionaryApplicationLogicBase().GetValueByFixCondition("MC", app.XXLX, "DM"));
                if (!DataValidateManager.ValidateIsNull(strXXLX))
                {
                    app.XXLX = strXXLX;
                }
                if (!XXLX.SelectedValue.IsHtmlNullOrWiteSpace())
                {
                    app.XXLX = Convert.ToString(XXLX.SelectedValue);
                }

                if (!XXTPDZ.Text.IsHtmlNullOrWiteSpace())
                {
                    app.XXTPDZ = Convert.ToString(XXTPDZ.Text);
                }

                if (!XXNR.Text.IsHtmlNullOrWiteSpace())
                {
                    app.XXNR = Convert.ToString(XXNR.Text);
                }

                if (!FJXZDZ.Text.IsHtmlNullOrWiteSpace())
                {
                    app.FJXZDZ = Convert.ToString(FJXZDZ.Text);
                }

                app.XXZT = "02";
                string strXXZT = GetValue(new RICH.Common.BM.Dictionary.DictionaryApplicationLogicBase().GetValueByFixCondition("MC", app.XXZT, "DM"));
                if (!DataValidateManager.ValidateIsNull(strXXZT))
                {
                    app.XXZT = strXXZT;
                }
                string strIsTop = GetValue(new RICH.Common.BM.Dictionary.DictionaryApplicationLogicBase().GetValueByFixCondition("MC", app.IsTop, "DM"));
                if (!DataValidateManager.ValidateIsNull(strIsTop))
                {
                    app.IsTop = strIsTop;
                }
                if (!IsTop.SelectedValue.IsHtmlNullOrWiteSpace())
                {
                    app.IsTop = Convert.ToString(IsTop.SelectedValue);
                }

                if (!TopSort.Text.IsHtmlNullOrWiteSpace())
                {
                    app.TopSort = Convert.ToInt32(TopSort.Text);
                }

                string strIsBest = GetValue(new RICH.Common.BM.Dictionary.DictionaryApplicationLogicBase().GetValueByFixCondition("MC", app.IsBest, "DM"));
                if (!DataValidateManager.ValidateIsNull(strIsBest))
                {
                    app.IsBest = strIsBest;
                }
                if (!IsBest.SelectedValue.IsHtmlNullOrWiteSpace())
                {
                    app.IsBest = Convert.ToString(IsBest.SelectedValue);
                }

                app.FBRJGH = (string)Session[ConstantsManager.SESSION_USER_ID];
                string strFBRJGH = GetValue(new RICH.Common.BM.T_PM_UserInfo.T_PM_UserInfoApplicationLogicBase().GetValueByFixCondition("UserNickName", app.FBRJGH, "UserID"));
                if (!DataValidateManager.ValidateIsNull(strFBRJGH))
                {
                    app.FBRJGH = strFBRJGH;
                }
                app.FBSJRQ = DateTime.Now;
                app.FBIP   = (string)Request.ServerVariables["REMOTE_ADDR"];
                instanceT_BG_0601ApplicationLogic.Add(app);
                if (app.ResultCode == RICH.Common.Base.ApplicationData.ApplicationDataBase.ResultState.Succeed)
                {
                    importCount++;
                }
                else
                {
                    app.OPCode = RICH.Common.Base.ApplicationData.ApplicationDataBase.OPType.PK;
                    instanceT_BG_0601ApplicationLogic.Modify(app);
                    if (app.ResultCode == RICH.Common.Base.ApplicationData.ApplicationDataBase.ResultState.Succeed)
                    {
                        updateCount++;
                    }
                }
            }
            MessageContent += @"<font color=""green"">共{0}条数据,导入数据{1}条,更新数据{2}条。</font>".FormatInvariantCulture(totalCount, importCount, updateCount);
        }
        catch (Exception ex)
        {
            MessageContent += @"<font color=""red"">导入数据过程出错:{0}<br/>共{1}条数据,已导入数据{2}条,已更新数据{3}条。</font>".FormatInvariantCulture(ex.Message, totalCount, importCount, updateCount);
        }
    }