Пример #1
0
        public Result SaveSchool(School sch)
        {
            Result result = new Result();

            try
            {
                if (!sch.IsValid())
                {
                    result.StatusCode = sch.StatusCode;
                    result.StatusDesc = sch.StatusDesc;
                    return(result);
                }

                Bussinesslogic bll = new Bussinesslogic();
                result = bll.SaveSchool(sch);
            }
            catch (Exception ex)
            {
                string msg = $"EXCEPTION: {ex.Message}";
                DatabaseHandler.LogError(msg, ex.StackTrace, sch.SchoolCode);
                result.StatusCode = Globals.FAILURE_STATUS_CODE;
                result.StatusDesc = msg;//"{0} is an {1}",0,1
            }
            return(result);
        }