Example #1
0
        public bool SaveModelListToDB(User.UserModel user, List <TBase_Model> modelList, ref string strError)
        {
            try
            {
                bool succ = false;
                List <OracleParameter[]> ParameterList = new List <OracleParameter[]>();

                //把creater、createTime、modifyer等信息填到model中去.

                for (int i = 0; i < modelList.Count; i++)
                {
                    TBase_Model model = modelList[i];
                    AddModelOperatorInfo(user, ref model);

                    OracleParameter[] param = GetSaveModelOracleParameter(model);
                    ParameterList.Add(param);
                }

                succ = OracleDBHelper.RunProcedures(this.GetSaveProcedureName(), ParameterList);

                return(succ);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }