///// <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; } }
/// <summary> /// 保存 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnSave_Click(object sender, EventArgs e) { Model.T_FileListTmp_CellRptTmp_MDL model = new DigiPower.Onlinecol.Standard.Model.T_FileListTmp_CellRptTmp_MDL(); BLL.T_FileListTmp_CellRptTmp_BLL bll = new DigiPower.Onlinecol.Standard.BLL.T_FileListTmp_CellRptTmp_BLL(); if (Convert.ToInt32(ID) != 0) { model = bll.GetModel(Convert.ToInt32(ID)); } model = (Model.T_FileListTmp_CellRptTmp_MDL)Comm.GetValueToObject(model, this.tbl); if (Convert.ToInt32(ID) == 0) { ID = bll.Add(model).ToString(); } else { bll.Update(model); } Response.Redirect("ArchiveCellReportList.aspx?sqlwhere=" + SqlWhere + "&PageIndex=" + pPageIndex + "&ID=" + Common.DNTRequest.GetString("recid")); }