Exemple #1
0
        private void SaveSelect()
        {
            string SelectIDList = Common.Session.GetSession("SelectIDList");

            if (!String.IsNullOrEmpty(SelectIDList))
            {
                BLL.T_CellTmp_BLL bll1 = new DigiPower.Onlinecol.Standard.BLL.T_CellTmp_BLL();
                //BLL.T_FileListTmp_CellRptTmp_BLL bll2 = new DigiPower.Onlinecol.Standard.BLL.T_FileListTmp_CellRptTmp_BLL();
                BLL.T_EFile_BLL bll2 = new DigiPower.Onlinecol.Standard.BLL.T_EFile_BLL();
                foreach (string CellReportID in SelectIDList.Split(','))
                {
                    //if (CellReportID != "" && !bll2.Exists("FileListID=" + ID + " AND CellFilePath='" + CellReportID + "'"))
                    //{
                    Model.T_CellTmp_MDL mdl = bll1.GetModel(Common.ConvertEx.ToInt(CellReportID));
                    if (mdl != null)
                    {
                        Model.T_EFile_MDL mdl2 = new DigiPower.Onlinecol.Standard.Model.T_EFile_MDL();
                        mdl2.FileType   = 1;
                        mdl2.Title      = mdl.Title;
                        mdl2.FilePath   = Common.ConvertEx.ToString(mdl.CellID);
                        mdl2.Status     = 0;
                        mdl2.OrderIndex = Common.ConvertEx.ToInt(mdl.OrderIndex);
                        mdl2.FileListID = Common.ConvertEx.ToInt(ID);
                        mdl2.RootPath   = Common.Common.EFileStartPath;
                        bll2.Add(mdl2);
                    }
                    //}
                }
                Session["SelectIDList"] = null;
            }
        }
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            //Response.Redirect("CellListAdd.aspx?Action=add&ID=0&sqlwhere = " + SqlWhere + "");
            BLL.T_CellTmp_BLL bll1 = new DigiPower.Onlinecol.Standard.BLL.T_CellTmp_BLL();
            //BLL.T_FileListTmp_CellRptTmp_BLL bll2 = new DigiPower.Onlinecol.Standard.BLL.T_FileListTmp_CellRptTmp_BLL();
            List <string> SelectList = ctrlGridEx1.GetSelects();
            //Session["SelectList"] = SelectList;
            string SelectIDList = "";

            foreach (string CellReportID in SelectList)
            {
                Model.T_CellTmp_MDL mdl = bll1.GetModel(Common.ConvertEx.ToInt(CellReportID));
                if (mdl.IsFolder == false)//只能选文件,不能选目录
                {
                    SelectIDList += CellReportID + ",";
                }
            }
            Session["SelectIDList"] = SelectIDList;
            //Response.Redirect(HiddenField1.Value);
            Response.Write("<script>window.opener.location.reload();window.close();</script>");
            //Response.Redirect("ArchiveCellReportList.aspx?ID=" + ID + "&sqlwhere = " + SqlWhere + "");
        }