コード例 #1
0
        internal void PrintOrSentTsd(Guid useroid, DEBusinessItem item, string action, out StringBuilder strErr)
        {
            DBParameter dbParameter = DBUtil.GetDbParameter(true);

            try
            {
                dbParameter.Open();
                new DaArchivManager(dbParameter).PrintOrSentTsd(useroid, item, action, out strErr);
                if (strErr.Length > 0)
                {
                    dbParameter.Rollback();
                }
                else
                {
                    dbParameter.Commit();
                }
            }
            catch (Exception exception)
            {
                dbParameter.Rollback();
                throw new PLMException("托晒单发送打印失败", exception);
            }
            finally
            {
                dbParameter.Close();
            }
        }
コード例 #2
0
        internal void SignSentList(ArrayList lisItems, string unit, string signer, string sm)
        {
            Hashtable   hashtable;
            DBParameter dbParameter = DBUtil.GetDbParameter(false);

            try
            {
                dbParameter.Open();
                var manager = new DaArchivManager(dbParameter);
                manager.SignSentBefore(unit, signer);
                foreach (DEBusinessItem item in lisItems)
                {
                    manager.SignSentItem(item, unit, signer, sm);
                }
            }
            catch (Exception exception)
            {
                throw new PLMException("SignSentList错误", exception);
            }
            finally
            {
                dbParameter.Close();
            }
            return;
        }
コード例 #3
0
        internal DataSet GetSentResultForOutPut(DEBusinessItem item, string username)
        {
            DataSet     set2;
            DBParameter dbParameter = DBUtil.GetDbParameter(false);

            try
            {
                dbParameter.Open();
                DataSet sentResultForOutPut = new DaArchivManager(dbParameter).GetSentResultForOutPut(item.IterOid);
                if (sentResultForOutPut.Tables.Contains("FF"))
                {
                    DataTable table = sentResultForOutPut.Tables["FF"];
                    sentResultForOutPut.Tables.Remove(table);
                    if (table.Rows.Count > 0)
                    {
                        DataTable table2 = this.GetNewTableForOutPut(item, table, username);
                        sentResultForOutPut.Tables.Add(table2);
                    }
                }
                if (sentResultForOutPut.Tables.Contains("HS"))
                {
                    DataTable table3 = sentResultForOutPut.Tables["HS"];
                    sentResultForOutPut.Tables.Remove(table3);
                    if (table3.Rows.Count > 0)
                    {
                        DataTable table4 = this.GetNewTableForOutPut(item, table3, username);
                        sentResultForOutPut.Tables.Add(table4);
                    }
                }
                sentResultForOutPut.AcceptChanges();
                set2 = sentResultForOutPut;
            }
            catch (Exception exception)
            {
                throw new PLMException("获取用于收发登记的收发帐明细失败", exception);
            }
            finally
            {
                dbParameter.Close();
            }
            return(set2);
        }
コード例 #4
0
        internal DataSet GetSentLstSuiJi(string docCode, string wkinfo, string tsdId, string tUnit, string tstype, string sentstate, DateTime dFrom, DateTime dTo)
        {
            DataSet     set;
            DBParameter dbParameter = DBUtil.GetDbParameter(false);

            try
            {
                dbParameter.Open();
                set = new DaArchivManager(dbParameter).GetSentLstSuiJi(docCode, wkinfo, tsdId, tUnit, tstype, sentstate, dFrom, dTo);
            }
            catch (Exception exception)
            {
                throw new PLMException("获取收发清单出错", exception);
            }
            finally
            {
                dbParameter.Close();
            }
            return(set);
        }
コード例 #5
0
        internal ArrayList GetDocClsById(string doccode)
        {
            ArrayList   docClsById;
            DBParameter dbParameter = DBUtil.GetDbParameter(false);

            try
            {
                dbParameter.Open();
                docClsById = new DaArchivManager(dbParameter).GetDocClsById(doccode);
            }
            catch (Exception exception)
            {
                throw new PLMException("根据图号获取图档类型失败", exception);
            }
            finally
            {
                dbParameter.Close();
            }
            return(docClsById);
        }
コード例 #6
0
        internal Hashtable GetViewOfCol(string v_type, out ArrayList lstOrder, out Hashtable hswide)
        {
            Hashtable   hashtable;
            DBParameter dbParameter = DBUtil.GetDbParameter(false);

            try
            {
                dbParameter.Open();
                hashtable = new DaArchivManager(dbParameter).GetViewOfCol(v_type, out lstOrder, out hswide);
            }
            catch (Exception exception)
            {
                throw new PLMException("获取显示列出错", exception);
            }
            finally
            {
                dbParameter.Close();
            }
            return(hashtable);
        }
コード例 #7
0
        internal DataSet GetTsRes(Hashtable hsGetResType)
        {
            DataSet     tsRes;
            DBParameter dbParameter = DBUtil.GetDbParameter(false);

            try
            {
                dbParameter.Open();
                tsRes = new DaArchivManager(dbParameter).GetTsRes(hsGetResType);
            }
            catch (Exception exception)
            {
                throw new PLMException("获取资源数据出错", exception);
            }
            finally
            {
                dbParameter.Close();
            }
            return(tsRes);
        }
コード例 #8
0
        internal DataSet GetBpmNameByUserOid(Guid useroid)
        {
            DataSet     bpmNameByUserOid;
            DBParameter dbParameter = DBUtil.GetDbParameter(false);

            try
            {
                dbParameter.Open();
                bpmNameByUserOid = new DaArchivManager(dbParameter).GetBpmNameByUserOid(useroid);
            }
            catch (Exception exception)
            {
                throw new PLMException("根据登录用户获取流程信息失败", exception);
            }
            finally
            {
                dbParameter.Close();
            }
            return(bpmNameByUserOid);
        }
コード例 #9
0
        internal DataSet GetTSD(string docCode, string bpmInfo, string TsStatue, string TsType, string OrgPrintUser, string ftlx, string unit, DateTime dFromTime, DateTime dToTime, bool isPrint)
        {
            DataSet     set;
            DBParameter dbParameter = DBUtil.GetDbParameter(false);

            try
            {
                dbParameter.Open();
                set = new DaArchivManager(dbParameter).GetTsd(docCode, bpmInfo, TsStatue, TsType, OrgPrintUser, ftlx, unit, dFromTime, dToTime, isPrint);
            }
            catch (Exception exception)
            {
                throw new PLMException("托晒单快速查询出错", exception);
            }
            finally
            {
                dbParameter.Close();
            }
            return(set);
        }
コード例 #10
0
        internal DataSet GetTSD(string docId, string wkName)
        {
            DataSet     tsd;
            DBParameter dbParameter = DBUtil.GetDbParameter(false);

            try
            {
                dbParameter.Open();
                tsd = new DaArchivManager(dbParameter).GetTsd(docId, wkName);
            }
            catch (Exception exception)
            {
                throw new PLMException("根据图号与流程获取托晒单出错", exception);
            }
            finally
            {
                dbParameter.Close();
            }
            return(tsd);
        }
コード例 #11
0
        internal DataSet GetSecondDocStandard()
        {
            DataSet     secondDocStandard;
            DBParameter dbParameter = DBUtil.GetDbParameter(false);

            try
            {
                dbParameter.Open();
                secondDocStandard = new DaArchivManager(dbParameter).GetSecondDocStandard();
            }
            catch (Exception exception)
            {
                throw new PLMException("获取二次图默认数量失败", exception);
            }
            finally
            {
                dbParameter.Close();
            }
            return(secondDocStandard);
        }
コード例 #12
0
        internal DataSet GetDrawingForTsOutput(Guid iroid)
        {
            DataSet     drawingForTsOutput;
            DBParameter dbParameter = DBUtil.GetDbParameter(false);

            try
            {
                dbParameter.Open();
                drawingForTsOutput = new DaArchivManager(dbParameter).GetDrawingForTsOutput(iroid);
            }
            catch (Exception exception)
            {
                throw new PLMException("托晒单輸出失敗", exception);
            }
            finally
            {
                dbParameter.Close();
            }
            return(drawingForTsOutput);
        }
コード例 #13
0
        internal ArrayList CheckTsdRight(ArrayList lstItems, string action, out StringBuilder strInfo, string clslb)
        {
            ArrayList   list2;
            DBParameter dbParameter = DBUtil.GetDbParameter(true);

            try
            {
                dbParameter.Open();
                ArrayList list = new DaArchivManager(dbParameter).CheckTsdRight(lstItems, action, out strInfo, clslb);
                dbParameter.Commit();
                list2 = list;
            }
            catch (Exception exception)
            {
                throw new PLMException("验证是否可处理出错", exception);
            }
            finally
            {
                dbParameter.Close();
            }
            return(list2);
        }
コード例 #14
0
        internal DataSet GetTsdFsdwByDoc(Guid useroid, string doccode, string clsname, string docname, string yct, string ftlx)
        {
            DataSet     set2;
            DBParameter dbParameter = DBUtil.GetDbParameter(true);

            try
            {
                dbParameter.Open();
                DataSet set = new DaArchivManager(dbParameter).GetTsdFsdwByDoc(useroid, doccode, clsname, docname, yct, ftlx);
                dbParameter.Commit();
                set2 = set;
            }
            catch (Exception exception)
            {
                dbParameter.Rollback();
                throw new PLMException("获取托晒单发送单位失败", exception);
            }
            finally
            {
                dbParameter.Close();
            }
            return(set2);
        }
コード例 #15
0
        internal DataSet GetTSDForPrint(string docId, Guid useroid, string wkName)
        {
            DataSet     set2;
            DBParameter dbParameter = DBUtil.GetDbParameter(true);

            try
            {
                dbParameter.Open();
                DataSet set = new DaArchivManager(dbParameter).GetTSDForPrint(useroid, docId, wkName);
                dbParameter.Commit();
                set2 = set;
            }
            catch (Exception exception)
            {
                dbParameter.Rollback();
                throw new PLMException("获取用于打印的托晒单失败", exception);
            }
            finally
            {
                dbParameter.Close();
            }
            return(set2);
        }
コード例 #16
0
        public DataSet GetSentResultForOutPut(ArrayList lstUnit, ArrayList lstItems, out Hashtable hsTbIdx, string username)
        {
            DataSet     set4;
            DBParameter dbParameter = DBUtil.GetDbParameter(false);

            try
            {
                DEBusinessItem current;
                dbParameter.Open();
                DaArchivManager manager = new DaArchivManager(dbParameter);
                DataSet         set     = new DataSet();
                hsTbIdx = new Hashtable();
                Hashtable   hashtable  = new Hashtable();
                Hashtable   hashtable2 = new Hashtable();
                ArrayList   lstTH      = new ArrayList();
                DataTable   newTable   = null;
                DataTable   table2     = null;
                IEnumerator enumerator = lstItems.GetEnumerator();
                {
                    while (enumerator.MoveNext())
                    {
                        current = (DEBusinessItem)enumerator.Current;
                        DataSet sentResultForOutPut = manager.GetSentResultForOutPut(current.IterOid);
                        if (newTable == null)
                        {
                            newTable = this.GetNewTable("FF", sentResultForOutPut);
                        }
                        if (table2 == null)
                        {
                            table2 = this.GetNewTable("HS", sentResultForOutPut);
                        }
                        string tH = this.GetTH(current);
                        hashtable[tH]  = current;
                        hashtable2[tH] = sentResultForOutPut;
                        lstTH.Add(tH);
                    }
                }
                lstTH.Sort();
                int       num          = 0;
                Hashtable MapUnitLstTH = new Hashtable();
                Hashtable hashtable4   = new Hashtable();
                foreach (string unit in lstUnit)
                {
                    DataSet   datasetList;
                    ArrayList lstUsedTH2;
                    DataTable table4;
                    num++;
                    hsTbIdx[unit] = num;
                    foreach (string tuhao in lstTH)
                    {
                        datasetList = hashtable2[tuhao] as DataSet;

                        /*
                         * if (datasetList.Tables.Contains("FF") && this.IsAllDocContainsUnit(datasetList.Tables["FF"], unit))
                         * {
                         *  ArrayList lstUsedTH;
                         *  if (MapUnitLstTH.Contains(unit))
                         *  {
                         *      lstUsedTH = MapUnitLstTH[unit] as ArrayList;
                         *  }
                         *  else
                         *  {
                         *      lstUsedTH = new ArrayList();
                         *  }
                         *  lstUsedTH.Add(tuhao);
                         *  MapUnitLstTH[unit] = lstUsedTH;
                         * }
                         * if (datasetList.Tables.Contains("HS") && this.IsAllDocContainsUnit(datasetList.Tables["HS"], unit))
                         * {
                         *  ArrayList list3;
                         *  if (hashtable4.Contains(unit))
                         *  {
                         *      list3 = hashtable4[unit] as ArrayList;
                         *  }
                         *  else
                         *  {
                         *      list3 = new ArrayList();
                         *  }
                         *  list3.Add(tuhao);
                         *  hashtable4[unit] = list3;
                         * }
                         * */
                    }
                    ArrayList lstTH2 = new ArrayList(lstTH);
                    if (newTable != null)
                    {
                        DataTable tbObj = newTable.Clone();
                        tbObj.TableName = "FF" + num.ToString();
                        if (MapUnitLstTH.Contains(unit))
                        {
                            lstUsedTH2 = MapUnitLstTH[unit] as ArrayList;
                            foreach (string usedTH in lstUsedTH2)
                            {
                                lstTH2.Remove(usedTH);
                                datasetList = hashtable2[usedTH] as DataSet;
                                table4      = datasetList.Tables["FF"];
                                current     = hashtable[usedTH] as DEBusinessItem;
                                this.GetNewRowByUnit(current, table4, true, tbObj, unit, username);
                            }
                        }
                        foreach (string str3 in lstTH2)
                        {
                            datasetList = hashtable2[str3] as DataSet;
                            table4      = datasetList.Tables["FF"];
                            current     = hashtable[str3] as DEBusinessItem;
                            this.GetNewRowByUnit(current, table4, false, tbObj, unit, username);
                        }

                        if (tbObj.Rows.Count > 0)
                        {
                            DataView dv = tbObj.DefaultView;
                            dv.Sort = "图号";
                            DataTable sortedtbObj = dv.ToTable();
                            set.Tables.Add(sortedtbObj);
                        }
                    }
                    if (table2 != null)
                    {
                        DataTable table5 = table2.Clone();
                        table5.TableName = "HS" + num.ToString();
                        lstTH2           = new ArrayList(lstTH);
                        if (hashtable4.Contains(unit))
                        {
                            lstUsedTH2 = hashtable4[unit] as ArrayList;
                            foreach (string str3 in lstUsedTH2)
                            {
                                lstTH2.Remove(str3);
                                datasetList = hashtable2[str3] as DataSet;
                                table4      = datasetList.Tables["HS"];
                                current     = hashtable[str3] as DEBusinessItem;
                                this.GetNewRowByUnit(current, table4, true, table5, unit, username);
                            }
                        }
                        foreach (string str3 in lstTH2)
                        {
                            datasetList = hashtable2[str3] as DataSet;
                            table4      = datasetList.Tables["HS"];
                            current     = hashtable[str3] as DEBusinessItem;
                            this.GetNewRowByUnit(current, table4, false, table5, unit, username);
                        }
                        if (table5.Rows.Count > 0)
                        {
                            DataView dv = table5.DefaultView;
                            dv.Sort = "图号";
                            DataTable sortedtbObj = dv.ToTable();
                            set.Tables.Add(sortedtbObj);
                        }
                    }
                }
                set.AcceptChanges();
                set4 = set;
            }
            catch (Exception exception)
            {
                throw new PLMException("获取用于收发登记的收发帐明细失败", exception);
            }
            finally
            {
                dbParameter.Close();
            }
            return(set4);
        }