Beispiel #1
0
        private SOWInfoModel GetUpdateStateModel(int sowPK)
        {
            SOWInfoModel sowInfo = CreateModel(sowPK);

            if (sowInfo == null)
            {
                throw new KairosException($"SOW with primary key '{sowPK}' is not found.");
            }
            return(sowInfo);
        }
Beispiel #2
0
        private SOWInfoModel CreateModel(int pk)
        {
            var          now = DateTime.Now;
            SOWInfoModel sow = sowQuery.GetByPrimaryKey(pk).ToObject <SOWInfoModel>();

            if (sow != null)
            {
                sow.SOWAssigns = new SOWAssignQuery(Db).GetWithSP_BySOW_FK(pk);
                sow.BTSInfo    = new BTSQuery(Db).GetByPrimaryKey(sow.BTS_FK);
                sow.SOWResults = GetSOWResultsBySOWPK(sow.SOW_PK);
            }
            return(sow);
        }