예제 #1
0
        /// <summary>
        /// 组卷
        /// </summary>
        /// <returns></returns>
        private int CreateAj()
        {
            T_Archive_MDL model = new T_Archive_MDL();

            model.ajtm            = ajtm.Text;
            model.bzdw            = bzdw.Text;
            model.lrr             = lrr.Text;
            model.lrsj            = ConvertEx.ToDate(lrsj.Text);
            model.ajlx            = ajlx.SelectValue;
            model.BoxType         = boxType.SelectValue;
            model.qssj            = DateTime.Now;
            model.zzsj            = DateTime.Now;
            model.SingleProjectID = Common.ConvertEx.ToInt(singleProjectID);
            model.xh = archiveBLL.getMaxArchiveXhBySingleProjectID(singleProjectID) + 10;;

            model.note = note.Text;
            model.bgqx = SystemSet._DEFAULT_ARCHIVE_BGQX;
            model.mj   = SystemSet._DEFAULT_ARCHIVE_MJ;

            int archiveID = archiveBLL.Add(model);

            PublicModel.writeLog(SystemSet.EumLogType.AddData.ToString(), string.Concat("T_Archive;ArchiveID=", archiveID,
                                                                                        ";SingleProjectID=", model.SingleProjectID, ";ajtm=", model.ajtm, ";xh=", model.xh, ";案卷补录-组卷"));

            return(archiveID);
        }
예제 #2
0
        public bool ClearShortDH(string ArchiveID)
        {
            T_Archive_MDL mdl = dal.GetModel(int.Parse(ArchiveID));
            DataSet       ds  = dal.GetList("SingleProjectID=" + mdl.SingleProjectID);

            if (ds != null && ds.Tables.Count > 0)
            {
                DataRow[] drList     = ds.Tables[0].Select("", "xh DESC,ShortDH DESC");
                int       maxShortDH = dal.GetMaxShortDH();
                if (drList != null && drList.Length > 0)
                {
                    DataRow dr = drList[0];
                    if (Common.ConvertEx.ToInt(dr["ShortDH"]) == maxShortDH)
                    {
                        dal.ClearShortDH(mdl.SingleProjectID.ToString());
                        return(true);
                    }
                    else
                    {
                        return(false);
                    }
                }
            }
            return(false);
        }
예제 #3
0
        public void UpdatedhNew(string ArchiveID)
        {
            int           wzCount_P = 0;
            int           tzCount_P = 0;
            int           zpCount_P = 0;
            T_Archive_MDL mdl       = dal.GetModel(int.Parse(ArchiveID));
            DataSet       ds        = dal.GetList("ShortDH='' AND SingleProjectID=" + mdl.SingleProjectID);

            if (ds != null && ds.Tables.Count > 0)
            {
                DataRow[] drList     = ds.Tables[0].Select("", "xh");
                int       maxShortDH = dal.GetMaxShortDH();
                maxShortDH++;
                BLL.T_FileList_BLL fileBLL = new T_FileList_BLL();

                foreach (DataRow dr in drList)
                {
                    mdl         = dal.GetModel(int.Parse(dr["archiveid"].ToString()));
                    mdl.ShortDH = maxShortDH.ToString();

                    //Leo 案卷sl统计 2012-09-26
                    int ManualCount = fileBLL.GetManualCountByArchiveID(mdl.ArchiveID);
                    if (mdl.ajlx == "183")
                    {
                        mdl.wzCount = ManualCount;
                        wzCount_P  += ManualCount;
                    }
                    if (mdl.ajlx == "184")
                    {
                        mdl.tzCount = ManualCount;
                        tzCount_P  += ManualCount;
                    }
                    if (mdl.ajlx == "185")
                    {
                        mdl.zpCount = ManualCount;
                        zpCount_P  += ManualCount;
                    }

                    dal.Update(mdl);
                    maxShortDH++;
                }
            }

            //Leo 2012-09-26
            if (mdl.SingleProjectID != null)
            {
                BLL.T_SingleProject_BLL   projBLL = new T_SingleProject_BLL();
                Model.T_SingleProject_MDL projMDL = projBLL.GetModel(int.Parse(mdl.SingleProjectID.ToString()));
                projMDL.wzCount = wzCount_P;
                projMDL.tzCount = tzCount_P;
                projMDL.zpCount = zpCount_P;
                projBLL.Update(projMDL);
            }
        }
        public void UpdateArchiveXH(string archiveID, string XH)
        {
            T_Archive_MDL arMDL = archiveBLL.GetModel(ConvertEx.ToInt(archiveID));

            if (arMDL != null)
            {
                arMDL.xh = ConvertEx.ToInt(XH);
                archiveBLL.Update(arMDL);

                PublicModel.writeLog(SystemSet.EumLogType.UpdData.ToString(), string.Concat("T_Archive;key=", arMDL.ArchiveID,
                                                                                            ";SingleProjectID=", arMDL.SingleProjectID, ";ajtm=", arMDL.ajtm, ";xh=", arMDL.xh, ";案卷管理-更新案卷序号"));
            }
        }
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            if (((CommonEnum.PageState)ViewState["ps"]) == CommonEnum.PageState.EDIT)
            {
                T_Archive_MDL Mdl = new T_Archive_MDL();
                if (ViewState["model"] != null)
                {
                    Mdl = ViewState["model"] as T_Archive_MDL;
                    object        obj    = Comm.GetValueToObject(Mdl, this.tbl);
                    T_Archive_MDL newMdl = obj as T_Archive_MDL;

                    new T_Archive_BLL().Update(newMdl);

                    PublicModel.writeLog(SystemSet.EumLogType.UpdData.ToString(), string.Concat("T_Archive;key=", newMdl.ArchiveID,
                                                                                                ";SingleProjectID=", newMdl.SingleProjectID, ";ajtm=", newMdl.ajtm, ";xh=", newMdl.xh, ";案卷管理"));
                }
            }
            Common.MessageBox.CloseLayerOpenWeb(this.Page);
        }
예제 #6
0
        /// <summary>
        /// 拆卷
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnDel_Click(object sender, EventArgs e)
        {
            if (TreeView2.Nodes[0].ChildNodes.Count > 0)
            {
                foreach (TreeNode tNode in TreeView2.Nodes[0].ChildNodes)
                {
                    int iCount = 0;
                    if (tNode.Checked)//选中案卷
                    {
                        string ArchiveID = tNode.Value.ToString();
                        foreach (TreeNode tNode1 in tNode.ChildNodes)
                        {
                            if (tNode1.Checked)
                            {
                                iCount++;
                                Model.T_FileList_MDL flMDL = fileListBLL.GetModel(Common.ConvertEx.ToInt(tNode1.Value.ToString()));
                                flMDL.Status    = flMDL.OldStatus;
                                flMDL.ArchiveID = 0;//拆卷,则将文件对应的案卷设置为0
                                fileListBLL.Update(flMDL);

                                PublicModel.writeLog(SystemSet.EumLogType.UpdData.ToString(), string.Concat("T_FileList;FileListID=", flMDL.FileListID,
                                                                                                            ";SingleProjectID=", flMDL.SingleProjectID, ";BH=", flMDL.BH, ";Title=", flMDL.Title, ";流程(接收整理)-拆卷"));
                            }
                        }
                        archiveBLL.updateFileOrderIndexByArchiveID(ArchiveID.ToString());
                    }
                    if (tNode.ChildNodes.Count == iCount)//==0为空卷,直接删掉
                    {
                        T_Archive_MDL archiveMDL = archiveBLL.GetModel(Common.ConvertEx.ToInt(tNode.Value.ToString()));
                        if (archiveMDL != null)
                        {
                            archiveBLL.Delete(Common.ConvertEx.ToInt(tNode.Value.ToString()));
                            PublicModel.writeLog(SystemSet.EumLogType.DelData.ToString(), string.Concat("T_Archive;ArchiveID=", archiveMDL.ArchiveID,
                                                                                                        ";SingleProjectID=", archiveMDL.SingleProjectID, ";ajtm=", archiveMDL.ajtm, ";xh=", archiveMDL.xh, ";流程(接收整理)-拆卷"));
                        }
                    }
                }
                Redirect();
            }
        }