コード例 #1
0
ファイル: ProcesExtended.cs プロジェクト: andpsy/socisaV2
        public ProcesExtended(Proces p, bool _selected, int?_ID_SOCIETATE)
        {
            this.Proces = p;
            //this.Dosar = (Dosar)p.GetDosar().Result;
            try { this.TipProces = (Nomenclator)p.GetTipProces().Result; }
            catch { this.TipProces = new Nomenclator(); }
            try { this.Instanta = (Nomenclator)p.GetInstanta().Result; }
            catch { this.Instanta = new Nomenclator(); }
            try { this.Complet = (Nomenclator)p.GetComplet().Result; }
            catch { this.Complet = new Nomenclator(); }
            try { this.Contract = (Contract)p.GetContract().Result; }
            catch { this.Contract = new Contract(); }
            try
            {
                ProcesStadiu ps = (ProcesStadiu)p.GetStadiuCurent().Result;
                this.StadiuCurent = new ProcesStadiuExtended(ps);
            }
            catch
            {
                this.StadiuCurent = new ProcesStadiuExtended(new ProcesStadiu());
            }

            /*
             * try
             * {
             *  ProcesStadiu[] pss = (ProcesStadiu[])p.GetStadii().Result;
             *  this.Stadii = new ProcesStadiuExtended[pss.Length];
             *  for (int i = 0; i < pss.Length; i++)
             *  {
             *      this.Stadii[i] = new ProcesStadiuExtended(pss[i]);
             *  }
             * }
             * catch
             * {
             *  this.StadiuCurent = new ProcesStadiuExtended(new ProcesStadiu());
             *  this.Stadii = null;
             * }
             */

            this.Reclamant = this.Proces.GetReclamant(_ID_SOCIETATE).Result;
            this.Parat     = this.Proces.GetParat(_ID_SOCIETATE).Result;
            this.Tert      = this.Proces.GetTert(_ID_SOCIETATE).Result;
            if (_ID_SOCIETATE != null)
            {
                this.Calitate = (Nomenclator)(this.Proces.GetCalitate(Convert.ToInt32(_ID_SOCIETATE)).Result);
            }
            this.selected = _selected;
        }
コード例 #2
0
ファイル: IProceseRepository.cs プロジェクト: andpsy/socisaV2
 public response GetTipProces(Proces item)
 {
     return(item.GetTipProces());
 }