Example #1
0
        public static string GetIma021(string sid)
        {
            string returnFlag = "";

            using (OraDBContext dbContext = new OraDBContext())
            {
                IMA_FILE model = dbContext.IMA_FILE.Where(u => u.IMA01 == sid).FirstOrDefault();
                if (model != null)
                {
                    returnFlag = model.IMA021;
                }
            }
            return(returnFlag);
        }
Example #2
0
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public static bool AddModel(IMA_FILE model)
        {
            bool returnFlag = false;

            using (OraDBContext dbContext = new OraDBContext())
            {
                //增加
                dbContext.IMA_FILE.Add(model);

                dbContext.SaveChanges();

                returnFlag = true;
            }
            return(returnFlag);
        }