Esempio n. 1
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnSave_Click(object sender, EventArgs e)
        {
            BLL.T_CellAndEFile_BLL cellAndFile_bll = new BLL.T_CellAndEFile_BLL();
            BLL.T_FileList_BLL     fileList_bll    = new BLL.T_FileList_BLL();
            int OrderIndex = 1;

            foreach (DataGridViewRow px_ros in dgv_PX.Rows)
            {
                try
                {
                    if (_Flg == 0)
                    {
                        //文件级
                        MDL.T_FileList fileMDL1 = fileList_bll.Find(px_ros.Cells["cl_ID"].Value.ToString(), Globals.ProjectNO);
                        fileMDL1.GdFileOrderIndex = OrderIndex;
                        fileList_bll.Update(fileMDL1);
                    }
                    else
                    {
                        //电子文件
                        MDL.T_CellAndEFile cellMDL = cellAndFile_bll.Find(px_ros.Cells["cl_ID"].Value.ToString(), Globals.ProjectNO);
                        cellMDL.GdOrderIndex = OrderIndex;
                        cellAndFile_bll.Update(cellMDL);
                    }
                    OrderIndex++;
                }
                catch (Exception ex)
                {
                    TXMessageBoxExtensions.Info("排序更新失败!" + ex.Message);
                }
            }
            TXMessageBoxExtensions.Info("修改成功!");
            this.DialogResult = DialogResult.OK;
        }
        private void UpdateSignatureStatus(string fileID, string pdfPath, HttpContext context)
        {
            string fileName = Path.GetFileName(pdfPath);

            if (!string.IsNullOrWhiteSpace(fileID) && !string.IsNullOrWhiteSpace(pdfPath))
            {
                T_FileList_MDL fileList = fileBLL.GetModel(Convert.ToInt32(fileID));
                if (fileList != null)
                {
                    fileList.SIGNATURE_FLAG = true;
                    fileList.SIGNATURE_DT   = DateTime.Now.ToShortTimeString();
                    fileBLL.Update(fileList);
                }

                #region 增加个人签章保存
                T_FileList_SignatureLog_BLL logBLL = new BLL.T_FileList_SignatureLog_BLL();
                T_FileList_SignatureLog_MDL logMDL = new Model.T_FileList_SignatureLog_MDL();
                logMDL.Signature_DT           = DateTime.Now;
                logMDL.SignatureFinish_DT     = null;
                logMDL.SingleProjectID        = ConvertEx.ToInt(fileList.SingleProjectID);
                logMDL.FileListID             = Common.ConvertEx.ToInt(fileList.FileListID);
                logMDL.FileListTmpID          = Common.ConvertEx.ToInt(fileList.OldRecID);
                logMDL.Signature_UserID       = Common.Session.GetSessionInt("UserID");
                logMDL.Signature_UserRoleCode = Common.Session.GetSession("RoleCode");
                logMDL.OperationType          = SystemSet.EumSignatureOperationType.SignatureSave.ToString();
                logMDL.Message = "联合签章-个人签章保存";
                logBLL.Add(logMDL);
                #endregion
            }
        }
Esempio n. 3
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            int           OperateUserID   = Common.ConvertEx.ToInt(SingleProjectUsers.SelectValue);
            string        OperateUserName = SingleProjectUsers.SelectText;
            List <String> ltKey           = ctrlGridEx1.GetSelects();

            if (OperateUserID > 0 && ltKey.Count > 0)
            {
                foreach (string Key in ltKey)
                {
                    T_FileList_MDL Mdl = bll.GetModel(Common.ConvertEx.ToInt(Key));
                    if (Mdl != null)
                    {
                        Mdl.OperateUserID   = OperateUserID;
                        Mdl.OperateUserName = OperateUserName;
                        bll.Update(Mdl);
                    }
                }
                BindGridView();
            }
        }
Esempio n. 4
0
        private void SaveInfo(int a_flg, MDL.T_FileList File_MDL, MDL.T_CellAndEFile Cell_MDL,
                              BLL.T_FileList_BLL File_BLL, BLL.T_CellAndEFile_BLL Cell_BLL)
        {
            switch (a_flg)
            {
            case 1:    //首次或多条记录 添加
                File_MDL.ParentID         = _gdID;
                File_MDL.FromFileID       = File_MDL.FileID;
                File_MDL.FileID           = Guid.NewGuid().ToString();
                File_MDL.GDID             = _gdID;
                File_MDL.FL               = 1;
                File_MDL.GdFileOrderIndex =
                    File_BLL.GetMaxGdFileOrderIndex(File_MDL.GDID, Globals.ProjectNO) + 1;
                File_BLL.Add(File_MDL);
                if (Cell_MDL != null)
                {
                    Cell_MDL.GdFileID     = File_MDL.FileID;
                    Cell_MDL.DoStatus     = 1;
                    Cell_MDL.GdOrderIndex =
                        Cell_BLL.GetMaxGdFileOrderIndex(Cell_MDL.GdFileID, Globals.ProjectNO) + 1;
                    Cell_BLL.Update(Cell_MDL);

                    //添加原文信息
                    if (File.Exists(Globals.ProjectPath + Cell_MDL.filepath))
                    {
                        MyCommon.InsertOldEfile(Cell_MDL.CellID, Globals.ProjectNO, Globals.LoginUser, "资料用表-保存并归档-首次或多条记录 添加", Globals.ProjectPath + Cell_MDL.filepath);
                    }
                }
                break;

            case 2:    //一条记录,修改文件级
                File_MDL.GDID             = _gdID;
                File_MDL.GdFileOrderIndex =
                    File_BLL.GetMaxGdFileOrderIndex(File_MDL.GDID, Globals.ProjectNO) + 1;
                File_BLL.Update(File_MDL);
                break;

            case 3:    //多个表格设置 以前的文件条目是否要删除?还是不动
                File_MDL.ParentID   = _gdID;
                File_MDL.FromFileID = File_MDL.FileID;
                File_MDL.FileID     = Guid.NewGuid().ToString();
                File_MDL.GDID       = _gdID;
                File_MDL.FL         = 1;
                File_BLL.Add(File_MDL);

                ArrayList gdFileList = new ArrayList();

                string[] cell_list = _CellID.Split(new char[] { ';' });
                foreach (string c_id in cell_list)
                {
                    if (c_id != null && c_id.Trim() == "")
                    {
                        continue;
                    }

                    MDL.T_CellAndEFile cell_m =
                        Cell_BLL.Find(c_id, Globals.ProjectNO);

                    if (!string.IsNullOrWhiteSpace(cell_m.GdFileID))
                    {
                        gdFileList.Add(cell_m.GdFileID);
                    }

                    if (cell_m != null)
                    {
                        cell_m.GdFileID     = File_MDL.FileID;
                        cell_m.DoStatus     = 1;
                        cell_m.GdOrderIndex =
                            Cell_BLL.GetMaxGdFileOrderIndex(cell_m.GdFileID, Globals.ProjectNO) + 1;
                        Cell_BLL.Update(cell_m);

                        //添加原文信息
                        if (File.Exists(Globals.ProjectPath + cell_m.filepath))
                        {
                            MyCommon.InsertOldEfile(cell_m.CellID, Globals.ProjectNO, Globals.LoginUser, "资料用表-保存并归档-多个表格设置", Globals.ProjectPath + cell_m.filepath);
                        }
                    }
                }
                //修改前可以判断下文件级,如果要删除,就在修改前删除
                //表格更新完成之后,再删除
                for (int i = 0; i < gdFileList.Count; i++)
                {
                    string         gdf_id       = gdFileList[i].ToString();
                    MDL.T_FileList file_mdl_del =
                        File_BLL.Find(gdf_id, Globals.ProjectNO);

                    if (file_mdl_del != null)
                    {
                        IList <MDL.T_CellAndEFile> CellMDL_checklist =
                            Cell_BLL.FindByGdFileID(gdf_id, Globals.ProjectNO);

                        if (CellMDL_checklist == null ||
                            CellMDL_checklist.Count == 0)
                        {
                            //文件条目只有一条记录的,就删掉
                            File_BLL.Delete(file_mdl_del);
                        }
                    }
                }
                break;
            }
        }
Esempio n. 5
0
        /// <summary>
        /// 保存
        /// </summary>
        public void Save(string text)
        {
            //CBLL.FileRegist cbll = new ERM.CBLL.FileRegist();



            if (!String.IsNullOrEmpty(text))
            {
                if (!MyCommon.IsMatchCode(text))
                {
                    TXMessageBoxExtensions.Info("包含非法字符,不能保存!");
                    return;
                }
                //for (int i = 0; i < NewNode.Parent.Nodes.Count; i++)
                //{
                //    string newtext = NewNode.Parent.Nodes[i].Text.Trim().Substring(NewNode.Parent.Nodes[i].Text.Trim().LastIndexOf("]") + 1);
                //    if (text.Trim().Equals(newtext))
                //    {
                //        TXMessageBoxExtensions.Info("重命名失败,同一层级下节点名字不能重复!");
                //        return;
                //    }
                //}
                try
                {
                    if (NewNode.ImageIndex == 3)
                    {
                        BLL.T_CellAndEFile_BLL cellAndFile_bll = new BLL.T_CellAndEFile_BLL();
                        MDL.T_CellAndEFile     cellMDL         = cellAndFile_bll.Find(NewNode.Name, Globals.ProjectNO);
                        cellMDL.title = text;
                        cellAndFile_bll.Update(cellMDL);

                        //cbll.UpdateAttachmentTitle(OpeartPath((TreeNodeEx)(NewNode.Parent)), Globals.ProjectNO, OldTitle, text);
                    }
                    else
                    {
                        BLL.T_FileList_BLL fileList_bll = new BLL.T_FileList_BLL();
                        MDL.T_FileList     fileMDL1     = fileList_bll.Find(NewNode.Name, Globals.ProjectNO);
                        fileMDL1.wjtm = text;
                        fileMDL1.gdwj = text;
                        fileList_bll.Update(fileMDL1);
                        //string OldPath = OpeartPath((TreeNodeEx)NewNode);
                        //string NewPath = OldPath.Substring(0, OldPath.LastIndexOf("\\") + 1) + text;
                        //cbll.UpdateFinal_fileTitle(NewPath, Globals.ProjectNO, OldPath);
                        //cbll.UpdateCell_TempletTitle(NewPath, Globals.ProjectNO, OldPath, text);
                        //cbll.UpdateAttachmentFilePath(NewPath, OldPath, Globals.ProjectNO);
                    }
                    NewNode.Text = text;
                    TXMessageBoxExtensions.Info("修改成功!");
                    this.Close();
                }
                catch
                {
                    TXMessageBoxExtensions.Info("重命名失败!");
                }
            }
            else
            {
                TXMessageBoxExtensions.Info("名称不能为空!");
                return;
            }
        }