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> private void BindGridView() { BLL.T_CellTmp_BLL bll = new DigiPower.Onlinecol.Standard.BLL.T_CellTmp_BLL(); DataSet ds = new DataSet(); ds = bll.GetList(""); if (ds.Tables.Count > 0) { DataTable outDT = ds.Tables[0].Copy(); outDT.Clear(); Recursion(ds.Tables[0], 0, 0, ref outDT); ds.Tables.Clear(); ds.Tables.Add(outDT); if (ViewState["sqlwhere"] != null && !String.IsNullOrEmpty(ViewState["sqlwhere"].ToString())) { if (ds.Tables.Count > 0) { DataView dv = ds.Tables[0].Copy().DefaultView; dv.RowFilter = ViewState["sqlwhere"].ToString(); if (dv.Count != ds.Tables[0].Rows.Count) { ds.Tables[0].Clear(); ds.Tables.RemoveAt(0); ds.Tables.Add(dv.ToTable()); } } } List <string> l1 = new List <string>(); l1.Add("Title"); l1.Add("FilePath"); //l1.Add("JS"); //l1.Add("SG"); //l1.Add("SJ"); //l1.Add("JL"); //l1.Add("NeedArchive"); //l1.Add("IsFolder"); //l1.Add("archive_form_name"); //l1.Add("OrderIndex"); //ctrlGridEx1.PageCount = Common.ConvertEx.ToInt(Common.Session.GetSession("PageCount")); ctrlGridEx1.InitGrid("CellID", l1, ds, "~/SystemManage/CellListAdd.aspx?Action=edit"); } }
/// <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 + ""); }