コード例 #1
0
        ///// <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; }
        }
コード例 #2
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            Model.T_CellTmp_MDL model = new DigiPower.Onlinecol.Standard.Model.T_CellTmp_MDL();
            BLL.T_CellTmp_BLL   bll   = new DigiPower.Onlinecol.Standard.BLL.T_CellTmp_BLL();

            if (Convert.ToInt32(ID) != 0)
            {
                model = bll.GetModel(Convert.ToInt32(ID));
            }
            model = (Model.T_CellTmp_MDL)Comm.GetValueToObject(model, this.tbl);

            string UploadFileNameResult = UploadCellFile();

            if (UploadFileNameResult != "")
            {
                model.FilePath = UploadFileNameResult;
            }

            if (Convert.ToInt32(ID) == 0)
            {
                ID = bll.Add(model).ToString();
            }
            else
            {
                bll.Update(model);
            }
            Response.Redirect("CellList.aspx?sqlwhere=" + SqlWhere + "&PageIndex=" + pPageIndex + "");
        }
コード例 #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;
     }
 }
コード例 #4
0
        /// <summary>
        /// 绑定页面
        /// </summary>
        /// <param name="ID"></param>
        private void BindPage(string ID)
        {
            Model.T_CellTmp_MDL model = new DigiPower.Onlinecol.Standard.Model.T_CellTmp_MDL();

            BLL.T_CellTmp_BLL bll = new DigiPower.Onlinecol.Standard.BLL.T_CellTmp_BLL();

            model = bll.GetModel(Convert.ToInt32(ID));
            DigiPower.Onlinecol.Standard.Web.Comm.SetValueToPage(model, this.tbl);
            if (model != null)
            {
                FilePath.Text = model.FilePath;
            }
        }