Пример #1
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            T_FileListTmp_MDL model = new T_FileListTmp_MDL();

            if (ViewState["model"] != null)
            {
                model = (Model.T_FileListTmp_MDL)ViewState["model"];
            }
            object obj = Comm.GetValueToObject(model, this.tbl);

            if (obj != null)
            {
                Model.T_FileListTmp_MDL Newmodel = (Model.T_FileListTmp_MDL)obj;
                switch ((CommonEnum.PageState)ViewState["ps"])
                {
                case CommonEnum.PageState.ADD:
                    ID = fileTmpBLL.Add(Newmodel).ToString();

                    PublicModel.writeLog(SystemSet.EumLogType.AddData.ToString(), string.Concat("T_FileListTmp;key=", ID,
                                                                                                ";archive_form_no=", Newmodel.archive_form_no, ";bh=", Newmodel.bh, ";title=", Newmodel.title));
                    break;

                case CommonEnum.PageState.EDIT: {
                    Newmodel.recid = Convert.ToInt32(ID);
                    fileTmpBLL.Update(Newmodel);

                    PublicModel.writeLog(SystemSet.EumLogType.UpdData.ToString(), string.Concat("T_FileListTmp;key=", Newmodel.recid,
                                                                                                ";archive_form_no=", Newmodel.archive_form_no, ";bh=", Newmodel.bh, ";title=", Newmodel.title));
                }
                break;
                }
            }
            Common.MessageBox.CloseLayerOpenWeb(this.Page);
        }
Пример #2
0
 public void Recursion(DataTable dt, int PID, int LevelID)
 {
     DataRow[] dr = dt.Select("PID='" + PID + "'", "OrderIndex");
     foreach (DataRow drr in dr)
     {
         T_FileListTmp_MDL mdl1 = new T_FileListTmp_MDL();
         mdl1.recid = Common.ConvertEx.ToInt(drr["recid"].ToString());
         mdl1.title = Comm.AddEmpty(drr["title"].ToString(), LevelID);
         arealist.Add(mdl1);
         int NewLevelID = LevelID + 1;
         Recursion(dt, Int32.Parse(drr["recid"].ToString()), NewLevelID);
     }
 }
Пример #3
0
 /// <summary>
 /// 绑定页面
 /// </summary>
 /// <param name="ID"></param>
 private void BindPage(string ID)
 {
     if (!String.IsNullOrWhiteSpace(ID))
     {
         T_FileListTmp_MDL model = new T_FileListTmp_MDL();
         model = fileTmpBLL.GetModel(Convert.ToInt32(ID));
         if (model != null)
         {
             PID.DataBindEx(model.archive_form_no);
             Comm.SetValueToPage(model, this.tbl);
             ViewState["model"] = model;
         }
     }
 }
        /// <summary>
        /// 绑定文件类型
        /// </summary>
        private void DataBindFileType()
        {
            string strWhere = string.Empty;

            strWhere = "PID=0 and archive_form_no in(select ProjectType from T_SingleProject where SingleProjectID=" + DNTRequest.GetQueryString("SingleProjectID") + ")";
            List <T_FileListTmp_MDL> list = fileListTmpBLL.GetModelList(strWhere);

            T_FileListTmp_MDL fileListTmpMDL = new T_FileListTmp_MDL();

            fileListTmpMDL.bh    = "";
            fileListTmpMDL.title = "全部";

            list.Insert(0, fileListTmpMDL);
            ddlFileType.DataValueField = "bh";
            ddlFileType.DataTextField  = "title";
            ddlFileType.DataSource     = list;
            ddlFileType.DataBind();
        }
        public bool DeleteFileListTmp(string recID)
        {
            bool flag = false;

            if (fileListTmpBLL.GetCount("PID=" + recID + "") < 1)
            {
                T_FileListTmp_MDL fileListTmpMDL = fileListTmpBLL.GetModel(ConvertEx.ToInt(recID));
                if (fileListTmpMDL != null)
                {
                    fileListTmpBLL.Delete(ConvertEx.ToInt(recID));
                    signatureTmpBll.DeleteForFileListID(ConvertEx.ToInt(recID));
                    PublicModel.writeLog(SystemSet.EumLogType.DelData.ToString(), string.Concat("T_FileListTmp;key=", fileListTmpMDL.recid,
                                                                                                ";archive_form_no=", fileListTmpMDL.archive_form_no, ";bh=", fileListTmpMDL.bh, ";title=", fileListTmpMDL.title));
                }
                flag = true;
            }
            return(flag);
        }
 public string AddFile(string recidList, string singleProjectID)
 {
     try
     {
         string[]       SelectList  = recidList.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
         T_FileList_BLL fileListBLL = new T_FileList_BLL();
         foreach (string ID in SelectList)
         {
             T_FileListTmp_MDL mdl = fileListTmpBLL.GetModel(ConvertEx.ToInt(ID));
             mdl.MustSubmitFlag = true;
             fileListBLL.Add(singleProjectID, mdl, true);
         }
         return(SystemSet._RETURN_SUCCESS_VALUE);
     }
     catch (Exception ex)
     {
         return(SystemSet._RETURN_SUCCESS_VALUE + ex.Message);
     }
 }