Esempio n. 1
0
 public static void InitOrderBLL()
 {
     using (FBEntityBLL bll = new FBEntityBLL())
     {
         listOrderCode = bll.GetTable <T_FB_ORDERCODE>().ToList();
     }
 }
Esempio n. 2
0
 public static void SaveSetting()
 {
     using (FBEntityBLL bll = new FBEntityBLL())
     {
         bll.BassBllSave(etityT_FB_SYSTEMSETTINGS, FBEntityState.Modified);
     }
 }
Esempio n. 3
0
 public static void SaveSetting()
 {
     using (FBEntityBLL bll = new FBEntityBLL())
     {
         bll.BassBllSave(etityT_FB_SYSTEMSETTINGS, FBEntityState.Modified);
     }
 }
Esempio n. 4
0
        public FBEntity ReSubmitT_FB_EXTENSIONALORDER(T_FB_EXTENSIONALORDER entity)
        {
            FBEntityBLL bll         = this;
            FBEntity    fbOldEntity = GetFBEntityByEntityKey(entity.EntityKey);


            var master  = fbOldEntity.Entity as T_FB_EXTENSIONALORDER;
            var details = fbOldEntity.GetRelationFBEntities(typeof(T_FB_EXTENSIONORDERDETAIL).Name);

            details.ForEach(item =>
            {
                bll.InnerRemove(item.Entity);
            });

            master.INNERORDERID = string.Empty;
            master.CHECKSTATES  = (int)CheckStates.Approving;
            master.TOTALMONEY   = entity.TOTALMONEY;

            var             result     = master.ToFBEntity();
            List <FBEntity> listDetail = entity.T_FB_EXTENSIONORDERDETAIL.ToList().CreateList(item =>
            {
                T_FB_EXTENSIONORDERDETAIL detail = new T_FB_EXTENSIONORDERDETAIL();
                detail.EXTENSIONORDERDETAILID    = Guid.NewGuid().ToString();

                detail.APPLIEDMONEY          = item.APPLIEDMONEY;
                detail.CHARGETYPE            = item.CHARGETYPE;
                detail.CREATEDATE            = DateTime.Now;
                detail.CREATEUSERID          = item.CREATEUSERID;
                detail.REMARK                = item.REMARK;
                detail.T_FB_SUBJECT          = item.T_FB_SUBJECT;
                detail.UPDATEUSERID          = item.UPDATEUSERID;
                detail.USABLEMONEY           = item.USABLEMONEY;
                detail.T_FB_EXTENSIONALORDER = entity;

                FBEntity fbEntityDetail      = detail.ToFBEntity();
                fbEntityDetail.FBEntityState = FBEntityState.Added;
                return(fbEntityDetail);
            });

            result.AddFBEntities <T_FB_EXTENSIONORDERDETAIL>(listDetail);

            result.FBEntityState = FBEntityState.ReSubmit;
            SaveT_FB_EXTENSIONALORDER(result);
            return(result);
        }
Esempio n. 5
0
        public static T_FB_SYSTEMSETTINGS GetSetting(QueryExpression qe)
        {
            try
            {
                if (etityT_FB_SYSTEMSETTINGS == null)
                {
                    using (FBEntityBLL bll = new FBEntityBLL())
                    {
                        etityT_FB_SYSTEMSETTINGS = bll.GetTable<T_FB_SYSTEMSETTINGS>().FirstOrDefault();
                    }
                }
                etityT_FB_SYSTEMSETTINGS.Settings = Settings;

                return etityT_FB_SYSTEMSETTINGS;
            }
            catch (Exception ex)
            {
                Tracer.Debug("获取预算初始化信息出错,出错信息:" + ex.ToString());
                throw ex;
            }
        }
Esempio n. 6
0
        public static T_FB_SYSTEMSETTINGS GetSetting(QueryExpression qe)
        {
            try
            {
                if (etityT_FB_SYSTEMSETTINGS == null)
                {
                    using (FBEntityBLL bll = new FBEntityBLL())
                    {
                        etityT_FB_SYSTEMSETTINGS = bll.GetTable <T_FB_SYSTEMSETTINGS>().FirstOrDefault();
                    }
                }
                etityT_FB_SYSTEMSETTINGS.Settings = Settings;

                return(etityT_FB_SYSTEMSETTINGS);
            }
            catch (Exception ex)
            {
                Tracer.Debug("获取预算初始化信息出错,出错信息:" + ex.ToString());
                throw ex;
            }
        }
Esempio n. 7
0
        public static string GetOrderCode(T_FB_ORDERCODE orderCode)
        {
            lock (lockObject)
            {
                DateTime CurrentDate = orderCode.CURRENTDATE.Value;
                if (CurrentDate.Date != System.DateTime.Now.Date)
                {
                    orderCode.CURRENTDATE   = System.DateTime.Now.Date;
                    orderCode.RUNNINGNUMBER = 1;
                }

                string  shortName = orderCode.PRENAME;
                decimal curNumber = orderCode.RUNNINGNUMBER.Value;
                string  strDate   = orderCode.CURRENTDATE.Value.ToString("yyyyMMdd");
                string  code      = shortName + "_" + strDate + curNumber.ToString().PadLeft(6, '0');

                orderCode.RUNNINGNUMBER = Convert.ToInt32(curNumber + 1);
                using (FBEntityBLL bll = new FBEntityBLL())
                {
                    bll.BassBllSave(orderCode, FBEntityState.Modified);
                }
                return(code);
            }
        }
Esempio n. 8
0
        public static string GetOrderCode(T_FB_ORDERCODE orderCode)
        {
            lock (lockObject)
            {
                DateTime CurrentDate = orderCode.CURRENTDATE.Value;
                if (CurrentDate.Date != System.DateTime.Now.Date)
                {
                    orderCode.CURRENTDATE = System.DateTime.Now.Date;
                    orderCode.RUNNINGNUMBER = 1;

                }

                string shortName = orderCode.PRENAME;
                decimal curNumber = orderCode.RUNNINGNUMBER.Value;
                string strDate = orderCode.CURRENTDATE.Value.ToString("yyyyMMdd");
                string code = shortName + "_" + strDate + curNumber.ToString().PadLeft(6, '0');

                orderCode.RUNNINGNUMBER = Convert.ToInt32(curNumber + 1);
                using (FBEntityBLL bll = new FBEntityBLL())
                {
                    bll.BassBllSave(orderCode, FBEntityState.Modified);
                }
                return code;
            }

        }
Esempio n. 9
0
 public static void InitOrderBLL()
 {
     using (FBEntityBLL bll = new FBEntityBLL())
     {
         listOrderCode = bll.GetTable<T_FB_ORDERCODE>().ToList();
     }
 }