Ejemplo n.º 1
0
        public bool AcceptPartnership(WcfCommon.Data.HiringCompany hc, WcfCommon.Data.OutsourcingCompany oc)
        {
            Log.Info("AddPartnershipToDB...");
            HiringCompanyData.HiringCompany      hc_data = new HiringCompanyData.HiringCompany();
            HiringCompanyData.OutsourcingCompany oc_data = new HiringCompanyData.OutsourcingCompany();

            hc_data = HiringCompanyDB.Instance.GetCompany(hc.IdFromHiringCompanyDB);
            oc_data = OCompanyDB.Instance.GetOutsourcingCompany(oc.Name);

            return(PartnershipDB.Instance.AddPartnership(hc_data, oc_data));
        }
Ejemplo n.º 2
0
        /// <summary>
        ///     Methods that call ServiceProxy to outsourcing company service
        /// </summary>

        public bool SendPartnershipRequest(int outsourcingCompanyId, HiringCompanyData.HiringCompany hiringCompany)
        {
            WcfCommon.Data.HiringCompany hc_data = new WcfCommon.Data.HiringCompany();

            hc_data.Ceo = hiringCompany.Ceo;
            hc_data.IdFromHiringCompanyDB = hiringCompany.IDHc;
            hc_data.Name = hiringCompany.Name;

            bool ret = false;

            try
            {
                ret = ServiceProxy.Instance.SendOcRequest(outsourcingCompanyId, hc_data);
            }
            catch (CommunicationException ce)
            {
                ServiceProxy.Instance = null;
                Log.Error("Connection to Outsourcing company service failed.");
            }
            catch (Exception e)
            {
                ServiceProxy.Instance = null;
                Log.Error("Connection to Outsourcing company service failed.");
            }

            if (ret)
            {
                Log.Info("SUCCESSFULLY SENT PARTNERSHIP REQUEST!");
            }
            else
            {
                Log.Warn("Failed to sent partnership request.");
            }

            return(ret);
        }
Ejemplo n.º 3
0
 public bool AddHiringCompany(HiringCompanyData.HiringCompany company)
 {
     Log.Debug("AddHiringCompany Servisni poziv");
     Console.WriteLine("AddHiringCompany...");
     return(HiringCompanyDB.Instance.AddCompany(company));
 }
Ejemplo n.º 4
0
        //public List<HiringCompanyData.UserStory> GetUserStoryes(string projectName)
        //{
        //    log.Info("Successfully returned User storyes for defined project name");
        //    return UserStoryDB.Instance.GetUserStory(projectName);
        //}

        public bool AddPartnershipToDB(HiringCompanyData.HiringCompany hc, HiringCompanyData.OutsourcingCompany oc)
        {
            Log.Info("AddPartnershipToDB...");
            return(PartnershipDB.Instance.AddPartnership(hc, oc));
        }