Example #1
0
        public bool AddCddw(Xm_Xmdw cddw)
        {
            ArrayList sqls = new ArrayList();

            sqls.Add(SqlBuilder.BuildInsertSql(cddw));
            return(OracleHelper.ExecuteCommand(sqls));
        }
Example #2
0
        public bool UpdateJlData(ActionEnum action, Xm_Xmdw xmdw, List <Xm_Ss_Gcjl_Jlry> jlrys, List <Xm_Ss_Gcjl_Jlht> jlhts, List <Item_File> jlhtFiles)
        {
            ArrayList sqls = new ArrayList();
            string    tmpSql;

            switch (action)
            {
            case ActionEnum.Insert:
                sqls.Add(SqlBuilder.BuildInsertSql(xmdw));
                break;

            case ActionEnum.Update:
                sqls.Add(SqlBuilder.BuildUpdateSql(xmdw));

                //清空项目所有的文件。
                tmpSql = "delete from item_file where itemcode = '{0}' and nodeid = '{1}' and filecode in ('{2}')";
                tmpSql = string.Format(tmpSql, xmdw.ItemCode, (int)WorkFlowNode.ShiShi, "20");
                sqls.Add(tmpSql);

                Dictionary <string, string> delJlInfoCondition = new Dictionary <string, string>();
                delJlInfoCondition.Add("itemcode", xmdw.ItemCode);

                //清空所有监理人员记录。
                sqls.Add(SqlBuilder.BuildDeleteSql <Xm_Ss_Gcjl_Jlry>(delJlInfoCondition));

                //清空所有监理合同记录。
                sqls.Add(SqlBuilder.BuildDeleteSql <Xm_Ss_Gcjl_Jlht>(delJlInfoCondition));
                break;
            }

            //插入基本信息的文件。
            foreach (Item_File fileInfo in jlhtFiles)
            {
                sqls.Add(SqlBuilder.BuildInsertSql(fileInfo));
            }
            foreach (var jlry in jlrys)
            {
                sqls.Add(SqlBuilder.BuildInsertSql(jlry));
            }
            foreach (var jlht in jlhts)
            {
                sqls.Add(SqlBuilder.BuildInsertSql(jlht));
            }
            return(OracleHelper.ExecuteCommand(sqls));
        }
Example #3
0
        public bool SaveItem(Xm_GhsjYsxx itemGhys, List <Item_File> itemFile,
                             Xm_Xmzj itemZj, Xm_Gcxx itemGcxx, Xm_Xmdw itemDw)
        {
            ArrayList strSql = new ArrayList();
            string    tmpSql = string.Empty;

            ////项目规划设计信息
            strSql.Add(SqlBuilder.BuildDeleteSql <Xm_GhsjYsxx>(CommonManage.delWhere(itemGhys.ItemCode)));
            strSql.Add(SqlBuilder.BuildInsertSql(itemGhys));
            ////文件
            new BusiItemManage().SaveItemFile(itemGhys.ItemCode, WorkFlowNode.GHSJYS, itemFile, ref strSql);
            ////资金
            new BusiItemManage().SaveItemMoney(itemGhys.ItemCode, WorkFlowNode.GHSJYS, itemZj, ref strSql);
            ////工程
            new BusiItemManage().SaveItemGcxx(itemGhys.ItemCode, itemGcxx, ref strSql);
            ////单位
            new BusiItemManage().SaveItemCompany(itemGhys.ItemCode, ItemCompanyType.GH, itemDw, ref strSql);

            return(OracleHelper.ExecuteCommand(strSql));
        }
Example #4
0
        public bool UpdateYsxx(Xm_Ysxx ysxx, Xm_Xmdw xmdw, List <Item_File> fileInfos, WorkFlowNode ysType)
        {
            ArrayList sqls = new ArrayList();
            Dictionary <string, string> deleteCondition = new Dictionary <string, string>();
            string tmpSql;

            sqls.Add(SqlBuilder.BuildUpdateSql(ysxx));

            tmpSql = "update xm_xmxx set YSWH = '{0}' where ITEMCODE = '{1}'";
            tmpSql = string.Format(tmpSql, ysxx.YSWH, ysxx.ITEMCODE);
            sqls.Add(tmpSql);

            if (xmdw != null)
            {
                //清空技术复合单位记录。
                deleteCondition.Clear();
                deleteCondition.Add("itemcode", ysxx.ITEMCODE);
                deleteCondition.Add("TYPE", ((int)ItemCompanyType.JSFH).ToString());
                sqls.Add(SqlBuilder.BuildDeleteSql <Xm_Xmdw>(deleteCondition));

                //添加技术复合单位记录。
                sqls.Add(SqlBuilder.BuildInsertSql(xmdw));
            }

            //清空项目所有的文件。
            tmpSql = "delete from item_file where itemcode = '{0}' and nodeid = '{1}'";
            tmpSql = string.Format(tmpSql, ysxx.ITEMCODE, (int)ysType);
            sqls.Add(tmpSql);

            //插入基本信息的文件。
            foreach (Item_File fileInfo in fileInfos)
            {
                sqls.Add(SqlBuilder.BuildInsertSql(fileInfo));
            }

            return(OracleHelper.ExecuteCommand(sqls));
        }
        public bool SaveItem(Xm_Xmxx itemInfo, Xm_Ky_Jbxx itemKy,
                             List <Item_File> itemFile, Xm_Xmzj itemZj, Xm_Gcxx itemGcxx, Xm_Xmdw itemDw)
        {
            ArrayList strSql = new ArrayList();
            string    tmpSql = string.Empty;

            //// 项目主表
            strSql.Add(SqlBuilder.BuildUpdateSql(itemInfo));
            ////项目可研信息
            strSql.Add(SqlBuilder.BuildDeleteSql <Xm_Ky_Jbxx>(CommonManage.delWhere(itemKy.ItemCode)));
            strSql.Add(SqlBuilder.BuildInsertSql(itemKy));
            ////文件
            new BusiItemManage().SaveItemFile(itemInfo.ItemCode, WorkFlowNode.KY, itemFile, ref strSql);
            ////资金
            new BusiItemManage().SaveItemMoney(itemInfo.ItemCode, WorkFlowNode.KY, itemZj, ref strSql);
            ////工程
            new BusiItemManage().SaveItemGcxx(itemInfo.ItemCode, itemGcxx, ref strSql);
            ////单位
            new BusiItemManage().SaveItemCompany(itemInfo.ItemCode, ItemCompanyType.KY, itemDw, ref strSql);
            ////GIS信息

            return(OracleHelper.ExecuteCommand(strSql));
        }
Example #6
0
        /// <summary>
        /// 保存验收信息
        /// </summary>
        /// <param name="node"></param>
        /// <param name="ysxx"></param>
        /// <param name="itemFile"></param>
        /// <param name="xmdw"></param>
        /// <param name="gcxx"></param>
        /// <returns></returns>
        public bool SaveItem(WorkFlowNode node, Xm_Ysxx ysxx, List <Item_File> itemFile, Xm_Xmdw xmdw, Xm_Gcxx gcxx)
        {
            ArrayList strSql = new ArrayList();
            string    tmpSql = string.Empty;

            ////文件
            new BusiItemManage().SaveItemFile(ysxx.ITEMCODE, node, itemFile, ref strSql);
            ////预算信息
            strSql.Add(SqlBuilder.BuildUpdateSql(ysxx));

            if (node == WorkFlowNode.ZhongYan)
            {
                ////工程信息
                new BusiItemManage().SaveItemGcxx(ysxx.ITEMCODE, gcxx, ref strSql);
                ////单位信息
                new BusiItemManage().SaveItemCompany(ysxx.ITEMCODE, ItemCompanyType.JSFH, xmdw, ref strSql);
                ////更新主表信息(验收时间、验收文号)
                tmpSql = "update xm_xmxx set YSSJ = to_date('{1}','yyyy-mm-dd'), YsWh = '{2}' where ITEMCODE = '{0}'";
                tmpSql = string.Format(tmpSql, ysxx.ITEMCODE,
                                       ysxx.ZYSJ.HasValue ? ysxx.ZYSJ.Value.ToString("yyyy-MM-dd") : string.Empty, ysxx.YSWH);
                strSql.Add(tmpSql);
            }
            return(OracleHelper.ExecuteCommand(strSql));
        }
Example #7
0
        public bool UpdateZtbData(ActionEnum action, Xm_Ss_Ztb_Jbxx ztbJbxx, Xm_Xmdw xmdw, List <Xm_Ss_Ztb_Zbqk> zbqks, List <Xm_Ss_Ztb_Sght> sghts, List <Item_File> fileInfos)
        {
            List <string> sgdwNames = (from record in sghts
                                       select record.CBF).Distinct().ToList();
            List <Xm_Xmdw> sgdws = new List <Xm_Xmdw>();

            foreach (var item in sgdwNames)
            {
                sgdws.Add(new Xm_Xmdw()
                {
                    ItemCode = ztbJbxx.ItemCode, Type = ItemCompanyType.SG, Name = item
                });
            }

            ArrayList sqls = new ArrayList();
            string    tmpSql;

            switch (action)
            {
            case ActionEnum.Insert:
                sqls.Add(SqlBuilder.BuildInsertSql(ztbJbxx));
                sqls.Add(SqlBuilder.BuildInsertSql(xmdw));
                break;

            case ActionEnum.Update:
                sqls.Add(SqlBuilder.BuildUpdateSql(ztbJbxx));
                sqls.Add(SqlBuilder.BuildUpdateSql(xmdw));

                //清空项目所有的文件。
                tmpSql = "delete from item_file where itemcode = '{0}' and nodeid = '{1}' and filecode in ('16','17','18','19')";
                tmpSql = string.Format(tmpSql, ztbJbxx.ItemCode, (int)WorkFlowNode.ShiShi);
                sqls.Add(tmpSql);

                //清空所有中标情况记录。
                tmpSql = "delete from xm_ss_ztb_zbqk where itemcode = '{0}'";
                tmpSql = string.Format(tmpSql, ztbJbxx.ItemCode);
                sqls.Add(tmpSql);

                //清空所有施工合同记录。
                tmpSql = "delete from xm_ss_ztb_sght where itemcode = '{0}'";
                tmpSql = string.Format(tmpSql, ztbJbxx.ItemCode);
                sqls.Add(tmpSql);

                //清空所有施工单位记录。
                tmpSql = "delete from xm_xmdw where itemcode = '{0}' and TYPE = '{1}'";
                tmpSql = string.Format(tmpSql, ztbJbxx.ItemCode, (int)ItemCompanyType.SG);
                sqls.Add(tmpSql);
                break;
            }

            tmpSql = "update xm_xmxx set KBSJ = to_date('{0}','yyyy-mm-dd hh24:mi:ss') where ITEMCODE = '{1}'";
            tmpSql = string.Format(tmpSql, ztbJbxx.KBSJ, ztbJbxx.ItemCode);
            sqls.Add(tmpSql);

            //插入基本信息的文件。
            foreach (Item_File fileInfo in fileInfos)
            {
                sqls.Add(SqlBuilder.BuildInsertSql(fileInfo));
            }
            foreach (var zbqk in zbqks)
            {
                sqls.Add(SqlBuilder.BuildInsertSql(zbqk));
            }
            foreach (var sght in sghts)
            {
                sqls.Add(SqlBuilder.BuildInsertSql(sght));
            }
            foreach (var sgdw in sgdws)
            {
                sqls.Add(SqlBuilder.BuildInsertSql(sgdw));
            }
            return(OracleHelper.ExecuteCommand(sqls));
        }