示例#1
0
        public bool UpdateGcxx(ActionEnum action, Xm_Gcxx gcxx)
        {
            ArrayList sqls = new ArrayList();

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

            case ActionEnum.Update:
                sqls.Add(SqlBuilder.BuildUpdateSql(gcxx));
                break;
            }

            return(OracleHelper.ExecuteCommand(sqls));
        }
示例#2
0
        public bool UpdateBgxxData(Xm_Ss_Bgxx bgxx, ActionEnum gcxxAction, Xm_Gcxx gcxx, Xm_Xmzj xmzjgs, List <Item_File> files)
        {
            ArrayList sqls = new ArrayList();
            string    tmpSql;

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

            if (gcxx != null)
            {
                switch (gcxxAction)
                {
                case ActionEnum.Insert:
                    tmpSql = "delete from xm_gcxx where itemcode = '{0}' and stage = '{1}' and xh >= {2}";
                    tmpSql = string.Format(tmpSql, gcxx.ItemCode, (int)gcxx.Stage, gcxx.Xh);
                    sqls.Add(tmpSql);
                    sqls.Add(SqlBuilder.BuildInsertSql(gcxx));
                    break;

                case ActionEnum.Update:
                    sqls.Add(SqlBuilder.BuildUpdateSql(gcxx));
                    break;
                }
            }

            if (xmzjgs != null)
            {
                tmpSql = "delete from xm_xmzj where itemcode = '{0}' and stage = '{1}' and xh = '{2}'";
                tmpSql = string.Format(tmpSql, xmzjgs.ItemCode, (int)xmzjgs.Stage, xmzjgs.Xh);
                sqls.Add(tmpSql);
                sqls.Add(SqlBuilder.BuildInsertSql(xmzjgs));

                //清空项目所有的文件。
                tmpSql = "delete from item_file where itemcode = '{0}' and stage = '{1}' and xh = '{2}' and filecode in ('{3}')";
                tmpSql = string.Format(tmpSql, xmzjgs.ItemCode, (int)xmzjgs.Stage, xmzjgs.Xh, (int)FileCode.预算补充文件);
                sqls.Add(tmpSql);

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

            return(OracleHelper.ExecuteCommand(sqls));
        }
示例#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));
        }
        public bool SaveItem(Xm_Xmxx itemInfo, Xm_Sb_Jbxx itemSb,
                             List <Item_File> itemFile, Xm_Xmzj itemZj, Xm_Gcxx itemGcxx)
        {
            ArrayList strSql = new ArrayList();
            string    tmpSql = string.Empty;

            //// 项目主表
            strSql.Add(SqlBuilder.BuildDeleteSql <Xm_Xmxx>(CommonManage.delWhere(itemInfo.ItemCode)));
            strSql.Add(SqlBuilder.BuildInsertSql(itemInfo));
            ////项目申报信息
            strSql.Add(SqlBuilder.BuildDeleteSql <Xm_Sb_Jbxx>(CommonManage.delWhere(itemSb.ItemCode)));
            strSql.Add(SqlBuilder.BuildInsertSql(itemSb));
            ////文件
            new BusiItemManage().SaveItemFile(itemInfo.ItemCode, WorkFlowNode.TB, itemFile, ref strSql);
            ////资金
            new BusiItemManage().SaveItemMoney(itemInfo.ItemCode, WorkFlowNode.TB, itemZj, ref strSql);
            ////工程
            new BusiItemManage().SaveItemGcxx(itemInfo.ItemCode, itemGcxx, ref strSql);
            ////GIS信息

            return(OracleHelper.ExecuteCommand(strSql));
        }
        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));
        }
        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);
        }
示例#7
0
        public bool SaveItem(Xm_Xmxx itemInfo, Xm_Sb_Jbxx itemSb,
            List<Item_File> itemFile, Xm_Xmzj itemZj, Xm_Gcxx itemGcxx)
        {
            ArrayList strSql = new ArrayList();
            string tmpSql = string.Empty;
            //// 项目主表
            strSql.Add(SqlBuilder.BuildDeleteSql<Xm_Xmxx>(CommonManage.delWhere(itemInfo.ItemCode)));
            strSql.Add(SqlBuilder.BuildInsertSql(itemInfo));
            ////项目申报信息
            strSql.Add(SqlBuilder.BuildDeleteSql<Xm_Sb_Jbxx>(CommonManage.delWhere(itemSb.ItemCode)));
            strSql.Add(SqlBuilder.BuildInsertSql(itemSb));
            ////文件
            new BusiItemManage().SaveItemFile(itemInfo.ItemCode, WorkFlowNode.TB, itemFile, ref strSql);
            ////资金
            new BusiItemManage().SaveItemMoney(itemInfo.ItemCode, WorkFlowNode.TB, itemZj, ref strSql);
            ////工程
            new BusiItemManage().SaveItemGcxx(itemInfo.ItemCode, itemGcxx, ref strSql);
            ////GIS信息

            return OracleHelper.ExecuteCommand(strSql);
        }
示例#8
0
        public bool UpdateBgxxData(Xm_Ss_Bgxx bgxx, ActionEnum gcxxAction, Xm_Gcxx gcxx, Xm_Xmzj xmzjgs, List<Item_File> files)
        {
            ArrayList sqls = new ArrayList();
            string tmpSql;

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

            if (gcxx != null)
            {
                switch (gcxxAction)
                {
                    case ActionEnum.Insert:
                        tmpSql = "delete from xm_gcxx where itemcode = '{0}' and stage = '{1}' and xh >= {2}";
                        tmpSql = string.Format(tmpSql, gcxx.ItemCode, (int)gcxx.Stage, gcxx.Xh);
                        sqls.Add(tmpSql);
                        sqls.Add(SqlBuilder.BuildInsertSql(gcxx));
                        break;
                    case ActionEnum.Update:
                        sqls.Add(SqlBuilder.BuildUpdateSql(gcxx));
                        break;
                }
            }

            if (xmzjgs != null)
            {
                tmpSql = "delete from xm_xmzj where itemcode = '{0}' and stage = '{1}' and xh = '{2}'";
                tmpSql = string.Format(tmpSql, xmzjgs.ItemCode, (int)xmzjgs.Stage, xmzjgs.Xh);
                sqls.Add(tmpSql);
                sqls.Add(SqlBuilder.BuildInsertSql(xmzjgs));

                //清空项目所有的文件。
                tmpSql = "delete from item_file where itemcode = '{0}' and stage = '{1}' and xh = '{2}' and filecode in ('{3}')";
                tmpSql = string.Format(tmpSql, xmzjgs.ItemCode, (int)xmzjgs.Stage, xmzjgs.Xh, (int)FileCode.预算补充文件);
                sqls.Add(tmpSql);

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

            return OracleHelper.ExecuteCommand(sqls);
        }
示例#9
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));
        }
示例#10
0
        /// <summary>
        /// 项目工程量
        /// </summary>
        /// <param name="itemCode"></param>
        /// <param name="node"></param>
        /// <param name="itemGcxx"></param>
        /// <param name="strSql"></param>
        public void SaveItemGcxx(string itemCode, Xm_Gcxx itemGcxx, ref ArrayList strSql)
        {
            string tmpSql = string.Empty;

            tmpSql = "delete from xm_gcxx where itemCode in ({0}) and Stage = '{1}' and Xh = '{2}'";
            tmpSql = string.Format(tmpSql, itemCode.Trim(), ((int)itemGcxx.Stage).ToString(), itemGcxx.Xh);
            strSql.Add(tmpSql);

            tmpSql = SqlBuilder.BuildInsertSql(itemGcxx);
            strSql.Add(tmpSql);
        }
示例#11
0
        public bool UpdateGcxx(ActionEnum action, Xm_Gcxx gcxx)
        {
            ArrayList sqls = new ArrayList();

            switch (action)
            {
                case ActionEnum.Insert:
                    sqls.Add(SqlBuilder.BuildInsertSql(gcxx));
                    break;
                case ActionEnum.Update:
                    sqls.Add(SqlBuilder.BuildUpdateSql(gcxx));
                    break;
            }

            return OracleHelper.ExecuteCommand(sqls);
        }
示例#12
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);
        }