Beispiel #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("ArchiveCellReportAdd.aspx?Action=add&ID=0&recid="+ID+"&sqlwhere = " + SqlWhere + "");
        //    //List<string> sellist = ctrlGridEx1.GetSelects();
        //    //if (sellist.Count > 0)
        //    //{
        //        //T_SingleProject_MDL model = (new T_SingleProject_BLL()).GetModel(ConvertEx.ToInt(sellist[0].ToString()));

        //    //}
        //}
        private void SaveSelect()
        {
            //try
            //{
            string SelectIDList = Common.Session.GetSession("SelectIDList");

            if (!String.IsNullOrEmpty(SelectIDList))
            {
                //List<string> SelectList = (List<string>)Session["SelectList"];
                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();
                foreach (string CellReportID in SelectIDList.Split(','))
                {
                    if (CellReportID != "" && !bll2.Exists("recID=" + ID + " AND CellFilePath='" + CellReportID + "'"))
                    {
                        Model.T_CellTmp_MDL mdl = bll1.GetModel(Common.ConvertEx.ToInt(CellReportID));
                        if (mdl != null)
                        {
                            Model.T_FileListTmp_CellRptTmp_MDL mdl2 = new DigiPower.Onlinecol.Standard.Model.T_FileListTmp_CellRptTmp_MDL();
                            mdl2.CellFilePath = CellReportID;
                            mdl2.recID        = Common.ConvertEx.ToInt(ID);
                            mdl2.Title        = mdl.Title;
                            mdl2.OrderIndex   = Common.ConvertEx.ToInt(mdl.OrderIndex);
                            bll2.Add(mdl2);
                        }
                    }
                }
                Session["SelectIDList"] = null;
            }
            //}
            //catch { Session["SelectIDList"] = null; }
        }
Beispiel #3
0
 protected void PID_SelectedIndexChanged(object sender, EventArgs e)
 {
     BLL.T_CellTmp_BLL   docBLL = new DigiPower.Onlinecol.Standard.BLL.T_CellTmp_BLL();
     Model.T_CellTmp_MDL docMDL = docBLL.GetModel(Common.ConvertEx.ToInt(PID.SelectedValue));
     if (docMDL != null)
     {
         PID_Show.Text = docMDL.MyCode;
     }
 }
        /// <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 + "");
        }