Beispiel #1
0
        private bool WriteLog(Miles.Coro.ORM.Repository r, Model.Tb_order_log log, object obj)
        {
            string strSerializeJSON = JsonConvert.SerializeObject(obj);

            log.Oper_Info = strSerializeJSON;
            return(this.Add(r, log));
        }
Beispiel #2
0
        private bool DoAdoptOrder(Miles.Coro.ORM.Repository r, Model.Info_OrderMain info)
        {
            int odrState = (int)Enum.OrderState.Pass;//2;

            info.Odr_State = odrState;
            Model.Tb_order_log log = new Model.Tb_order_log();
            log.Odr_No   = info.Odr_No;
            log.Oper_log = "合同审核通过";
            log.Msg      = "合同审核通过";
            if (!WriteLog(r, log, info))
            {
                return(false);
            }

            if (!UpdateOrderState(r, info))
            {
                return(false);
            }

            //新建合同摘要表部分数据
            if (!DoNewFinOrderGen(r, info))
            {
                return(false);
            }

            //新建项目联络单要表部分数据
            if (!DoNewLinkBill(r, info))
            {
                return(false);
            }

            return(true);
        }
Beispiel #3
0
        public bool UpdateOrderState(Miles.Coro.ORM.Repository r, Model.Info_OrderMain info)
        {
            if (r.Update <Model.Info_OrderMain>()
                .Set()
                .Field(Model.Tb_order_main.Table.Odr_State, info.Odr_State)
                .EndSet()
                .Where().And(Model.Info_OrderMain.Table.Odr_No, info.Odr_No)
                .EndWhere()
                .Save() < 1)
            {
                return(false);
            }

            return(true);
        }
Beispiel #4
0
        public bool Add(Miles.Coro.ORM.Repository repository, object obj, List <string> operCodes = null, List <string> operDates = null)
        {
            List <string> listCodes = new List <string>();

            listCodes.Add("Oper_Code");
            if (operCodes != null)
            {
                listCodes.AddRange(operCodes);
            }

            List <string> listDates = new List <string>();

            listDates.Add("Oper_Date");
            if (operDates != null)
            {
                listDates.AddRange(operDates);
            }

            SetOperateInfo(obj, listCodes, listDates);
            return(repository.Add(obj));
        }
Beispiel #5
0
 public ExeBatchTrans(Miles.Coro.ORM.Repository repository)
 {
     this.repository = repository;
 }