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;
            }
        }
Exemple #2
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <DigiPower.Onlinecol.Standard.Model.T_EFile_MDL> DataTableToList(DataTable dt)
        {
            List <DigiPower.Onlinecol.Standard.Model.T_EFile_MDL> modelList = new List <DigiPower.Onlinecol.Standard.Model.T_EFile_MDL>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                DigiPower.Onlinecol.Standard.Model.T_EFile_MDL model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new DigiPower.Onlinecol.Standard.Model.T_EFile_MDL();
                    if (dt.Rows[n]["ArchiveListCellRptID"].ToString() != "")
                    {
                        model.ArchiveListCellRptID = int.Parse(dt.Rows[n]["ArchiveListCellRptID"].ToString());
                    }
                    if (dt.Rows[n]["FileListID"].ToString() != "")
                    {
                        model.FileListID = int.Parse(dt.Rows[n]["FileListID"].ToString());
                    }
                    model.DH = dt.Rows[n]["DH"].ToString();
                    if (dt.Rows[n]["FileType"].ToString() != "")
                    {
                        model.FileType = int.Parse(dt.Rows[n]["FileType"].ToString());
                    }
                    if (dt.Rows[n]["Status"].ToString() != "")
                    {
                        model.Status = int.Parse(dt.Rows[n]["Status"].ToString());
                    }
                    model.Title       = dt.Rows[n]["Title"].ToString();
                    model.FilePath    = dt.Rows[n]["FilePath"].ToString();
                    model.PDFFilePath = dt.Rows[n]["PDFFilePath"].ToString();
                    if (dt.Rows[n]["PageCounts"].ToString() != "")
                    {
                        model.PageCounts = int.Parse(dt.Rows[n]["PageCounts"].ToString());
                    }
                    if (dt.Rows[n]["OrderIndex"].ToString() != "")
                    {
                        model.OrderIndex = int.Parse(dt.Rows[n]["OrderIndex"].ToString());
                    }
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Exemple #3
0
        //string EFileStartPath = Common.Common.EFileStartPath;

        protected void Page_Load(object sender, EventArgs e)
        {
            StartPath = Common.Common.EFileStartPath.Remove(0, 2).Replace('\\', '/');
            if (!this.IsPostBack)
            {
                MyAddInit();

                SingleProjectID = Request.QueryString["ProNo"];
                BLL.T_EFile_BLL   bll      = new DigiPower.Onlinecol.Standard.BLL.T_EFile_BLL();
                Model.T_EFile_MDL efileMDL = new DigiPower.Onlinecol.Standard.Model.T_EFile_MDL();
                efileMDL = bll.GetModel(Common.ConvertEx.ToInt(ID));

                if (efileMDL != null)
                {
                    FileListID           = efileMDL.FileListID;
                    ArchiveListCellRptID = efileMDL.ArchiveListCellRptID;//给前面用的


                    //T_SingleProject_MDL SingProMdl = new T_SingleProject_BLL().GetModel(Common.ConvertEx.ToInt(SingleProjectID));
                    //T_Construction_Project_MDL ConProMdl = new T_Construction_Project_BLL().GetModel(Common.ConvertEx.ToInt(SingProMdl.ConstructionProjectID));
                    //if (ConProMdl != null)
                    //{
                    //    CompanyID = Common.ConvertEx.ToString(ConProMdl.CompanyID);
                    //    ConstructionProjectID = Common.ConvertEx.ToString(ConProMdl.ConstructionProjectID);
                    //}
                    //判断,如果华表是第一次则根据华表模板的路径读取华表
                    //否则直接读取电子文件的FilePath
                    if (Common.ConvertEx.ToInt(efileMDL.Status) == 0)
                    {
                        T_CellTmp_MDL ctMdl = new T_CellTmp_BLL().GetModel(Common.ConvertEx.ToInt(efileMDL.FilePath));
                        cellFilePath = "http://" + Request.ServerVariables["HTTP_HOST"] + "/" + ctMdl.FilePath.Substring(1).Replace(@"\", @"/");     //华表模板路径

                        string tempFileID = Guid.NewGuid().ToString() + ".cll";

                        //string cellPath = Server.MapPath(string.Concat(StartPath,"CellEFile/"

                        //CreateDirectory(StartPath + "CellEFile/" +  + "/", true);
                        CreateDirectory(string.Concat(StartPath, "/", SingleProjectID, "/CellEFile/"), true);

                        NewCellFilePath     = string.Concat("/CellEFile/", tempFileID);                             //新华表存储路径
                        NewCellFullFilePath = string.Concat(StartPath, SingleProjectID, "/CellEFile/", tempFileID); //新华表存储路径
                    }
                    else if (Common.ConvertEx.ToInt(efileMDL.Status) == 1)
                    {
                        if (System.IO.File.Exists(Server.MapPath(string.Concat(StartPath, SingleProjectID, "/", efileMDL.FilePath))))
                        {
                            //Leo 存了绝对路径。等easyPDF好了,再回来来决定
                            cellFilePath = "http://" + Request.ServerVariables["HTTP_HOST"] +
                                           string.Concat(StartPath, SingleProjectID, "/", efileMDL.FilePath);
                            NewCellFilePath     = efileMDL.FilePath;
                            NewCellFullFilePath = string.Concat(StartPath, SingleProjectID, "/", efileMDL.FilePath);
                        }
                    }
                    try
                    {
                        string Action = Request.QueryString["Action"];
                        if (Action == "Show")
                        {
                            T_CellTmp_MDL ctMdl = new T_CellTmp_BLL().GetModel(Common.ConvertEx.ToInt(ID));
                            cellFilePath          = "http://" + Request.ServerVariables["HTTP_HOST"] + "/" + ctMdl.FilePath.Substring(1).Replace(@"\", @"/");
                            CompanyID             = "10";
                            ConstructionProjectID = "10";
                            return;
                        }
                    }
                    catch { }

                    T_SingleProject_MDL        SingProMdl = new T_SingleProject_BLL().GetModel(Common.ConvertEx.ToInt(SingleProjectID));
                    T_Construction_Project_MDL ConProMdl  = new T_Construction_Project_BLL().GetModel(Common.ConvertEx.ToInt(SingProMdl.ConstructionProjectID));
                    if (ConProMdl != null)
                    {
                        CompanyID             = Common.ConvertEx.ToString(ConProMdl.CompanyID);
                        ConstructionProjectID = Common.ConvertEx.ToString(ConProMdl.ConstructionProjectID);
                    }
                }
            }
        }
Exemple #4
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(DigiPower.Onlinecol.Standard.Model.T_EFile_MDL model)
 {
     dal.Update(model);
 }
Exemple #5
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int Add(DigiPower.Onlinecol.Standard.Model.T_EFile_MDL model)
 {
     return(dal.Add(model));
 }