Ejemplo n.º 1
0
        public void CampaignsControllerTestsInitialize()
        {
            ApplicationSetUp.SetCurrentApplication(WebSite.LinkMe);
            CampaignsRoutes.RegisterRoutes(new AreaRegistrationContext("Campaigns", new RouteCollection()));

            Resolve <IDbConnectionFactory>().DeleteAllTestData();
        }
        public async Task BuildFromMode_uses_mode(ApplicationMode mode)
        {
            var expected = new ApplicationSetUp(mode, GetDummyUri());
            var res      = await _ApplicationSetUpBuilder.BuildFromMode(mode, CancellationToken.None);

            res.Should().BeEquivalentTo(expected);
        }
        public void BuildForProduction_creates_a_production_set_up()
        {
            var expected = new ApplicationSetUp(ApplicationMode.Production, _ProductionUri);
            var res      = _ApplicationSetUpBuilder.BuildForProduction();

            res.Should().BeEquivalentTo(expected);
        }
Ejemplo n.º 4
0
        public static void TestInitialize()
        {
            ApplicationSetUp.SetCurrentApplication(WebSite.LinkMe);

            _webSiteQuery = Container.Current.Resolve <IWebSiteQuery>();
            _rootPath     = _webSiteQuery.GetUrl((int)WebSite.LinkMe, null, false, "~/").AbsoluteUri.ToLower();
            MockEmailTestExtensions.RootPath = _rootPath;
        }
Ejemplo n.º 5
0
        protected void Application_Start(object sender, EventArgs e)
        {
            ApplicationSetUp.RegisterPath();
            ApplicationContext.SetupApplications(WebSite.Management);

            InitialiseContainer();
            InitialiseMvc();
        }
        public async Task BuildFromApplicationArguments_uses_port_from_runner(int port)
        {
            var expected = new ApplicationSetUp(ApplicationMode.Live, GetLiveUri(port));

            _NpmLiveRunner.GetPortAsync(Arg.Any <CancellationToken>()).Returns(Task.FromResult(port));

            var res = await _ApplicationSetUpBuilder.BuildFromApplicationArguments(new [] { "--mode=live" });

            res.Should().BeEquivalentTo(expected);
        }
        //Added by Ankush on 13/10/20016
        public ACS.Core.Domain.Master.ApplicationSetUp GetGenerateExcelPermissions()
        {
            ApplicationSetUp _objAppSetUp = _ApplicationSetUp.Table.Where(i => i.Deactivate == "N" && i.key.ToLower() == "GenerateExcel").SingleOrDefault();

            if (_objAppSetUp != null)
            {
                return(_objAppSetUp);
            }
            return(null);
        }
Ejemplo n.º 8
0
        public void TestInitialize()
        {
            ApplicationSetUp.SetCurrentApplication(WebSite.Management);

            // This callback is not required in PROD; necessary to run with Fiddler.
            ServicePointManager.ServerCertificateValidationCallback =
                (sender, cert, chain, error) => true;

            _channelManager = new WcfHttpChannelManager <IPublicVacancy>("https://ecsn.gov.au/employment/publicvacancylodgement.asmx", "JobSearchTest");
        }
Ejemplo n.º 9
0
        public static void SetupApplications(WebSite currentWebSite)
        {
            ApplicationSetUp.SetSourceRootPath(RuntimeEnvironment.GetSourceFolder());

            var details = new Dictionary <WebSite, WebSiteDetails>();

            foreach (WebSite webSite in Enum.GetValues(typeof(WebSite)))
            {
                details.Add(webSite, new WebSiteDetails("localhost", -1, null));
            }

            ApplicationSetUp.SetWebSites(details);
            ApplicationSetUp.SetCurrentApplication(currentWebSite);
        }
Ejemplo n.º 10
0
        public static void SetupApplications(WebSite currentWebSite)
        {
            ApplicationSetUp.SetSourceRootPath(RuntimeEnvironment.GetSourceFolder());

            var details = new Dictionary <WebSite, WebSiteDetails>();

            foreach (WebSite webSite in Enum.GetValues(typeof(WebSite)))
            {
                var host            = Instance.GetProperty(GetWebSitePrefix(webSite) + ".host", true);
                var port            = Instance.GetIntProperty(GetWebSitePrefix(webSite) + ".port", -1);
                var applicationPath = Instance.GetProperty(GetWebSitePrefix(webSite) + ".applicationpath", true);

                details.Add(webSite, new WebSiteDetails(host, port, applicationPath));
            }

            ApplicationSetUp.SetWebSites(details);
            ApplicationSetUp.SetCurrentApplication(currentWebSite);
        }
Ejemplo n.º 11
0
        public IHttpActionResult InsertPublishingCompany(PublishingCompanyMaster _publishingCompany)
        {
            string status = string.Empty;

            try
            {
                status = _publishingCompanyService.DuplicityCheck(_publishingCompany);
                if (status == "Y")
                {
                    if (_publishingCompany.Id == 0)
                    {
                        IList <ApplicationSetUp> _mobjApplicationSetUpList = _mobjApplicationSetUpRepository.Table.Where(x => x.key == "PublishingCompanyCode" && x.Deactivate == "N").ToList();
                        var PublishingCompanySuggesation = _mobjApplicationSetUpList.Select(P => new
                        {
                            PublishingCompanyCodeValue = P.keyValue,
                            Id = P.Id
                        });

                        _publishingCompany.PublishingCompanyCode = "PCM" + PublishingCompanySuggesation.FirstOrDefault().PublishingCompanyCodeValue;
                        _publishingCompany.PublishingCompanyCode = _publishingCompany.PublishingCompanyCode.ToString().ToUpper();
                        _publishingCompanyService.InsertPublishingCompany(_publishingCompany);

                        ApplicationSetUp mobjApplicationSetUp = new ApplicationSetUp();
                        mobjApplicationSetUp.Id = PublishingCompanySuggesation.FirstOrDefault().Id;
                        ApplicationSetUp _ApplicationSetUpUpdate = _mobjApplicationSetUpService.GetApplicationSetUpById(mobjApplicationSetUp);
                        _ApplicationSetUpUpdate.Id = PublishingCompanySuggesation.FirstOrDefault().Id;
                        int Value = Int32.Parse(PublishingCompanySuggesation.FirstOrDefault().PublishingCompanyCodeValue) + 1;
                        _ApplicationSetUpUpdate.keyValue     = Value.ToString().PadLeft(4, '0');
                        _ApplicationSetUpUpdate.ModifiedBy   = _publishingCompany.EnteredBy;
                        _ApplicationSetUpUpdate.ModifiedDate = DateTime.Now;
                        _mobjApplicationSetUpService.UpdateApplication(_ApplicationSetUpUpdate);
                    }
                    else
                    {
                        PublishingCompanyMaster objPublishingCompany = _publishingCompanyService.GetPublishingCompanyById(_publishingCompany);
                        objPublishingCompany.CompanyName   = _publishingCompany.CompanyName;
                        objPublishingCompany.ContactPerson = _publishingCompany.ContactPerson;
                        objPublishingCompany.Address       = _publishingCompany.Address;
                        objPublishingCompany.Email         = _publishingCompany.Email;
                        objPublishingCompany.Phone         = _publishingCompany.Phone;
                        objPublishingCompany.Mobile        = _publishingCompany.Mobile;
                        objPublishingCompany.Website       = _publishingCompany.Website;
                        objPublishingCompany.CountryId     = _publishingCompany.CountryId;
                        objPublishingCompany.OtherCountry  = _publishingCompany.OtherCountry;
                        objPublishingCompany.Stateid       = _publishingCompany.Stateid;
                        objPublishingCompany.OtherState    = _publishingCompany.OtherState;
                        objPublishingCompany.Cityid        = _publishingCompany.Cityid;
                        objPublishingCompany.OtherCity     = _publishingCompany.OtherCity;
                        objPublishingCompany.Pincode       = _publishingCompany.Pincode;

                        objPublishingCompany.ModifiedBy   = _publishingCompany.EnteredBy;
                        objPublishingCompany.ModifiedDate = System.DateTime.Now;

                        _publishingCompanyService.UpdatePublishingCompany(objPublishingCompany);
                    }
                    status = _localizationService.GetResource("Master.API.Success.Message");
                }
                else
                {
                    status = "Duplicate";
                }
            }
            catch (ACSException ex)
            {
                status = ex.InnerException.Message;
            }
            catch (Exception ex)
            {
                status = ex.InnerException.Message;
            }
            return(Json(status));
        }
Ejemplo n.º 12
0
        public IHttpActionResult InsertOtherContract(Contract_Signed_By_Executive OtherContract)
        {
            string status            = "";
            int    OtherContractIdId = 0;
            string OtherContactCode  = string.Empty;

            try
            {
                //if (status == "Y")
                //{
                if (OtherContract.Id == 0)
                {
                    IList <ApplicationSetUp> _ApplicationSetUpList = _ApplicationSetUp.Table.Where(x => x.key == "Other Contract" && x.Deactivate == "N").ToList();
                    var OtherContractSuggesation = _ApplicationSetUpList.Select(Au => new
                    {
                        OtherContractValue = Au.keyValue,
                        Id = Au.Id
                    });

                    IList <ContractType> _ContractTypeList = _ContractType.Table.Where(x => x.Id == OtherContract.Contracttypeid && x.Deactivate == "N").ToList();
                    var ContractType = _ContractTypeList.Select(CT => new
                    {
                        ContractName = CT.ContractName
                    });

                    OtherContractMaster _OtherContract = new OtherContractMaster();


                    string   stringTokens = ContractType.FirstOrDefault().ContractName;
                    string   strVlaue     = string.Empty;
                    string[] words;
                    if (stringTokens.Contains("-"))
                    {
                        words = stringTokens.Split('-');
                    }
                    else
                    {
                        words = stringTokens.Split(' ');
                    }


                    foreach (string word in words)
                    {
                        strVlaue += word.FirstOrDefault();
                    }

                    _OtherContract.othercontractcode = "OC" + strVlaue.ToString() + OtherContractSuggesation.FirstOrDefault().OtherContractValue;
                    _OtherContract.othercontractcode = _OtherContract.othercontractcode.ToString().ToUpper();
                    OtherContactCode = _OtherContract.othercontractcode.ToString().ToUpper();

                    _OtherContract.partyname            = OtherContract.partyname;
                    _OtherContract.natureofserviceid    = OtherContract.natureofserviceid;
                    _OtherContract.natureofsubserviceid = OtherContract.natureofsubserviceid;
                    _OtherContract.Address        = OtherContract.Address;
                    _OtherContract.CountryId      = OtherContract.CountryId;
                    _OtherContract.OtherCountry   = OtherContract.OtherCountry;
                    _OtherContract.Stateid        = OtherContract.Stateid;
                    _OtherContract.OtherState     = OtherContract.OtherState;
                    _OtherContract.Cityid         = OtherContract.Cityid;
                    _OtherContract.OtherCity      = OtherContract.OtherCity;
                    _OtherContract.Pincode        = OtherContract.Pincode;
                    _OtherContract.Mobile         = OtherContract.Mobile;
                    _OtherContract.Email          = OtherContract.Email;
                    _OtherContract.PANNo          = OtherContract.PANNo;
                    _OtherContract.Requestdate    = OtherContract.Requestdate;
                    _OtherContract.ProjectTitle   = OtherContract.ProjectTitle;
                    _OtherContract.ProjectISBN    = OtherContract.ProjectISBN;
                    _OtherContract.Contracttypeid = OtherContract.Contracttypeid;
                    // _OtherContract.ContractDate = OtherContract.ContractDate;
                    //  _OtherContract.Periodofagreement = OtherContract.Periodofagreement;
                    //  _OtherContract.Expirydate = OtherContract.Expirydate;
                    _OtherContract.Territoryrightsid = OtherContract.Territoryrightsid;
                    _OtherContract.Payment           = OtherContract.Payment;
                    _OtherContract.paymentperiodid   = OtherContract.paymentperiodid;
                    _OtherContract.NatureOfWork      = OtherContract.NatureOfWork;
                    // _OtherContract.divisionid = OtherContract.divisionid;
                    _OtherContract.ContractSignedByExecutiveid = OtherContract.ContractSignedByExecutiveid;
                    _OtherContract.Remarks          = OtherContract.Remarks;
                    _OtherContract.EnteredBy        = OtherContract.EnteredBy;
                    _OtherContract.PaymentAmount    = OtherContract.PaymentAmount;
                    _OtherContract.CurrencyMasterId = OtherContract.CurrencyMasterId;

                    OtherContractIdId = _OtherContractService.InsertOtherContract(_OtherContract);

                    if (OtherContractIdId != 0)
                    {
                        OtherContractDivisionLink DivisionLink = new OtherContractDivisionLink();
                        int k = 0;
                        foreach (var item in OtherContract.Division)
                        {
                            DivisionLink.othercontractid = OtherContractIdId;
                            DivisionLink.divisionid      = item;
                            DivisionLink.EnteredBy       = OtherContract.EnteredBy;
                            _OtherContractService.InsertOtherContractDivisionLink(DivisionLink);
                            k++;
                        }


                        OtherContractDocuments _OtherContractDoc = new OtherContractDocuments();

                        string[] docurl = OtherContract.documentfile.Split(',');
                        int      i      = 0;
                        foreach (string doc in OtherContract.Documentname)
                        {
                            OtherContractDocuments Link = new OtherContractDocuments();
                            Link.othercontractid = OtherContractIdId;
                            Link.Documentname    = doc;
                            Link.documentfile    = docurl[i];
                            Link.EnteredBy       = OtherContract.EnteredBy;
                            _OtherContractService.InsertOtherContractDocumentsLinking(Link);
                            i++;
                        }

                        if (OtherContract.ForImageBank == "1")
                        {
                            /* Added by dheeraj Kumar sharma */
                            OtherContractImageBank _OtherContractImageBank = new OtherContractImageBank();
                            IList <VideoImageBank> ImageBankList           = new List <VideoImageBank>();

                            if (OtherContract.VideoImageBank.Count > 0)
                            {
                                foreach (var obj in OtherContract.VideoImageBank)
                                {
                                    VideoImageBank obj_VideoImageBank = new VideoImageBank();
                                    obj_VideoImageBank.Type       = obj.Type;
                                    obj_VideoImageBank.ShortName  = obj.ShortName;
                                    obj_VideoImageBank.Fullname   = obj.Fullname;
                                    obj_VideoImageBank.CurrencyId = obj.CurrencyId;
                                    obj_VideoImageBank.Cost       = obj.Cost;
                                    obj_VideoImageBank.Deactivate = "N";
                                    obj_VideoImageBank.EnteredBy  = OtherContract.EnteredBy;
                                    obj_VideoImageBank.EntryDate  = DateTime.Now;
                                    ImageBankList.Add(obj_VideoImageBank);
                                }
                            }
                            _OtherContractImageBank.VideoImageBank = ImageBankList;
                            /*End by dheeraj*/
                            _OtherContractImageBank.Printrunquantity = OtherContract.Printrunquantity;
                            _OtherContractImageBank.PrintRights      = OtherContract.PrintRights;
                            _OtherContractImageBank.electronicrights = OtherContract.electronicrights;
                            _OtherContractImageBank.ebookrights      = OtherContract.ebookrights;
                            _OtherContractImageBank.cost             = OtherContract.cost;
                            _OtherContractImageBank.currencyid       = OtherContract.currencyid;
                            _OtherContractImageBank.restriction      = OtherContract.restriction;

                            _OtherContractImageBank.othercontractid = OtherContractIdId;
                            _OtherContractImageBank.EnteredBy       = OtherContract.EnteredBy;
                            _OtherContractService.InsertOtherContractImageBank(_OtherContractImageBank);
                        }
                    }


                    OtherContractLink _OtherContractLink1 = new OtherContractLink();
                    _OtherContractLink1.Contractstatus              = null;
                    _OtherContractLink1.SignedContractSentDate      = null;
                    _OtherContractLink1.SignedContractReceived_Date = null;
                    _OtherContractLink1.CancellationDate            = null;
                    _OtherContractLink1.Cancellation_Reason         = null;
                    _OtherContractLink1.othercontractid             = OtherContractIdId;
                    _OtherContractLink1.Status    = "Pending";
                    _OtherContractLink1.EnteredBy = OtherContract.EnteredBy;
                    _OtherContractLink1.Remarks   = OtherContract.PendingRemarks;

                    int OtherContractLinkIdId = _OtherContractService.InsertOtherContractLink(_OtherContractLink1);


                    ApplicationSetUp Mobj_ApplicationSetUp = new ApplicationSetUp();

                    Mobj_ApplicationSetUp.Id = OtherContractSuggesation.FirstOrDefault().Id;

                    ApplicationSetUp _ApplicationSetUpUpdate = _ApplicationSetUpService.GetApplicationSetUpById(Mobj_ApplicationSetUp);

                    _ApplicationSetUpUpdate.Id = OtherContractSuggesation.FirstOrDefault().Id;
                    int Value = Int32.Parse(OtherContractSuggesation.FirstOrDefault().OtherContractValue) + 1;

                    _ApplicationSetUpUpdate.keyValue = Value.ToString().PadLeft(4, '0');

                    _ApplicationSetUpUpdate.ModifiedBy   = OtherContract.EnteredBy;
                    _ApplicationSetUpUpdate.ModifiedDate = DateTime.Now;

                    _ApplicationSetUpService.UpdateApplication(_ApplicationSetUpUpdate);
                }
                else
                {
                    if (OtherContract.UpdateRight == "rt" || OtherContract.UpdateRight == "fc")
                    {
                        OtherContractLink mobj_OtherContractLink = _OtherContractLink.Table.Where(i => i.othercontractid == OtherContract.Id && i.Deactivate == "N").FirstOrDefault();

                        if (mobj_OtherContractLink != null)
                        {
                            mobj_OtherContractLink.Contractstatus              = OtherContract.Contractstatus;
                            mobj_OtherContractLink.SignedContractSentDate      = OtherContract.SignedContractSentDate;
                            mobj_OtherContractLink.SignedContractReceived_Date = OtherContract.SignedContractReceived_Date;
                            mobj_OtherContractLink.CancellationDate            = OtherContract.CancellationDate;
                            mobj_OtherContractLink.Cancellation_Reason         = OtherContract.Cancellation_Reason;
                            mobj_OtherContractLink.othercontractid             = OtherContract.Id;
                            mobj_OtherContractLink.ModifiedBy = OtherContract.EnteredBy;
                            mobj_OtherContractLink.Status     = OtherContract.Contractstatus;
                            mobj_OtherContractLink.Remarks    = OtherContract.PendingRemarks;

                            mobj_OtherContractLink.AgreementDate = OtherContract.AgreementDate;
                            mobj_OtherContractLink.Effectivedate = OtherContract.Effectivedate;
                            //mobj_OtherContractLink.Contractperiodinmonth = OtherContract.Contractperiodinmonth;

                            mobj_OtherContractLink.Expirydate = OtherContract.Expirydate;

                            _OtherContractService.UpdateOtherContractLink(mobj_OtherContractLink);


                            OtherContractLinkDocument _OtherContractDocLink = new OtherContractLinkDocument();

                            string[] docurl1 = OtherContract.documentfileLink.Split(',');
                            int      i       = 0;
                            foreach (string doc in OtherContract.DocumentnameLink)
                            {
                                OtherContractLinkDocument Link = new OtherContractLinkDocument();
                                Link.othercontractLinkid = mobj_OtherContractLink.Id;
                                Link.DocumentnameLink    = doc;
                                Link.documentfileLink    = docurl1[i];
                                Link.EnteredBy           = OtherContract.EnteredBy;
                                _OtherContractService.InsertOtherContractDocumentsLinkingLink(Link);
                                i++;
                            }
                        }
                    }
                    else if (OtherContract.UpdateRight == "ad" || OtherContract.UpdateRight == "sa")
                    {
                        OtherContractMaster mobj_OtherDocument = _OtherContractService.GetOtherContractMasterId(OtherContract.Id);

                        mobj_OtherDocument.partyname            = OtherContract.partyname;
                        mobj_OtherDocument.natureofserviceid    = OtherContract.natureofserviceid;
                        mobj_OtherDocument.natureofsubserviceid = OtherContract.natureofsubserviceid;
                        mobj_OtherDocument.Address        = OtherContract.Address;
                        mobj_OtherDocument.CountryId      = OtherContract.CountryId;
                        mobj_OtherDocument.OtherCountry   = OtherContract.OtherCountry;
                        mobj_OtherDocument.Stateid        = OtherContract.Stateid;
                        mobj_OtherDocument.OtherState     = OtherContract.OtherState;
                        mobj_OtherDocument.Cityid         = OtherContract.Cityid;
                        mobj_OtherDocument.OtherCity      = OtherContract.OtherCity;
                        mobj_OtherDocument.Pincode        = OtherContract.Pincode;
                        mobj_OtherDocument.Mobile         = OtherContract.Mobile;
                        mobj_OtherDocument.Email          = OtherContract.Email;
                        mobj_OtherDocument.PANNo          = OtherContract.PANNo;
                        mobj_OtherDocument.Requestdate    = OtherContract.Requestdate;
                        mobj_OtherDocument.ProjectTitle   = OtherContract.ProjectTitle;
                        mobj_OtherDocument.ProjectISBN    = OtherContract.ProjectISBN;
                        mobj_OtherDocument.Contracttypeid = OtherContract.Contracttypeid;
                        //  mobj_OtherDocument.ContractDate = OtherContract.ContractDate;
                        //  mobj_OtherDocument.Periodofagreement = OtherContract.Periodofagreement;
                        //  mobj_OtherDocument.Expirydate = OtherContract.Expirydate;
                        mobj_OtherDocument.Territoryrightsid = OtherContract.Territoryrightsid;
                        mobj_OtherDocument.Payment           = OtherContract.Payment;
                        mobj_OtherDocument.paymentperiodid   = OtherContract.paymentperiodid;
                        mobj_OtherDocument.NatureOfWork      = OtherContract.NatureOfWork;
                        //  mobj_OtherDocument.divisionid = OtherContract.divisionid;
                        mobj_OtherDocument.ContractSignedByExecutiveid = OtherContract.ContractSignedByExecutiveid;
                        mobj_OtherDocument.Remarks          = OtherContract.Remarks;
                        mobj_OtherDocument.ModifiedBy       = OtherContract.EnteredBy;
                        mobj_OtherDocument.PaymentAmount    = OtherContract.PaymentAmount;
                        mobj_OtherDocument.CurrencyMasterId = OtherContract.CurrencyMasterId;

                        _OtherContractService.UpdateOtherContractMaster(mobj_OtherDocument);

                        _OtherContractService.DeleteOtherContractDivisionLink(OtherContract.Id, OtherContract.EnteredBy);

                        OtherContractDivisionLink DivisionLink = new OtherContractDivisionLink();
                        int k = 0;
                        foreach (var item in OtherContract.Division)
                        {
                            DivisionLink.othercontractid = OtherContract.Id;
                            DivisionLink.divisionid      = item;
                            DivisionLink.EnteredBy       = OtherContract.EnteredBy;
                            _OtherContractService.InsertOtherContractDivisionLink(DivisionLink);
                            k++;
                        }


                        OtherContractImageBank mobj_OtherContractImageBank = _OtherContractImageBank.Table.Where(i => i.othercontractid == OtherContract.Id && i.Deactivate == "N").FirstOrDefault();

                        if (mobj_OtherContractImageBank != null)
                        {
                            _OtherContractService.DeleteVideoImageBankLink(mobj_OtherContractImageBank.Id, OtherContract.EnteredBy);

                            if (OtherContract.VideoImageBank.Count > 0)
                            {
                                int m = 0;



                                foreach (var obj in OtherContract.VideoImageBank)
                                {
                                    VideoImageBank obj_VideoImageBank = new VideoImageBank();
                                    obj_VideoImageBank.Type        = obj.Type;
                                    obj_VideoImageBank.ShortName   = obj.ShortName;
                                    obj_VideoImageBank.Fullname    = obj.Fullname;
                                    obj_VideoImageBank.CurrencyId  = obj.CurrencyId;
                                    obj_VideoImageBank.Cost        = obj.Cost;
                                    obj_VideoImageBank.ImageBankId = mobj_OtherContractImageBank.Id;
                                    obj_VideoImageBank.EnteredBy   = OtherContract.EnteredBy;
                                    obj_VideoImageBank.EntryDate   = DateTime.Now;
                                    obj_VideoImageBank.Deactivate  = "N";
                                    _OtherContractService.InsertVideoImageBankLink(obj_VideoImageBank);
                                    m++;
                                }
                            }

                            mobj_OtherContractImageBank.Printrunquantity = OtherContract.Printrunquantity;
                            mobj_OtherContractImageBank.PrintRights      = OtherContract.PrintRights;
                            mobj_OtherContractImageBank.electronicrights = OtherContract.electronicrights;
                            mobj_OtherContractImageBank.ebookrights      = OtherContract.ebookrights;
                            mobj_OtherContractImageBank.cost             = OtherContract.cost;
                            mobj_OtherContractImageBank.currencyid       = OtherContract.currencyid;
                            mobj_OtherContractImageBank.restriction      = OtherContract.restriction;

                            mobj_OtherContractImageBank.othercontractid = OtherContract.Id;
                            mobj_OtherContractImageBank.ModifiedBy      = OtherContract.EnteredBy;
                            _OtherContractService.UpdateOtherContractImageBank(mobj_OtherContractImageBank);
                        }

                        else if (OtherContract.ForImageBank == "1")
                        {
                            //OtherContractImageBank _OtherConImageBank = new OtherContractImageBank();
                            //_OtherConImageBank.Printrunquantity = OtherContract.Printrunquantity;
                            //_OtherConImageBank.PrintRights = OtherContract.PrintRights;
                            //_OtherConImageBank.electronicrights = OtherContract.electronicrights;
                            //_OtherConImageBank.ebookrights = OtherContract.ebookrights;
                            //_OtherConImageBank.cost = OtherContract.cost;
                            //_OtherConImageBank.currencyid = OtherContract.currencyid;
                            //_OtherConImageBank.restriction = OtherContract.restriction;

                            //_OtherConImageBank.othercontractid = OtherContract.Id;
                            //_OtherConImageBank.EnteredBy = OtherContract.EnteredBy;
                            //_OtherContractService.InsertOtherContractImageBank(_OtherConImageBank);

                            OtherContractImageBank _OtherConImageBank = new OtherContractImageBank();
                            IList <VideoImageBank> ImageBankList      = new List <VideoImageBank>();

                            if (OtherContract.VideoImageBank.Count > 0)
                            {
                                foreach (var obj in OtherContract.VideoImageBank)
                                {
                                    VideoImageBank obj_VideoImageBank = new VideoImageBank();
                                    obj_VideoImageBank.Type       = obj.Type;
                                    obj_VideoImageBank.ShortName  = obj.ShortName;
                                    obj_VideoImageBank.Fullname   = obj.Fullname;
                                    obj_VideoImageBank.CurrencyId = obj.CurrencyId;
                                    obj_VideoImageBank.Cost       = obj.Cost;
                                    obj_VideoImageBank.Deactivate = "N";
                                    obj_VideoImageBank.EnteredBy  = OtherContract.EnteredBy;
                                    obj_VideoImageBank.EntryDate  = DateTime.Now;
                                    ImageBankList.Add(obj_VideoImageBank);
                                }
                            }
                            _OtherConImageBank.VideoImageBank = ImageBankList;
                            /*End by dheeraj*/
                            _OtherConImageBank.Printrunquantity = OtherContract.Printrunquantity;
                            _OtherConImageBank.PrintRights      = OtherContract.PrintRights;
                            _OtherConImageBank.electronicrights = OtherContract.electronicrights;
                            _OtherConImageBank.ebookrights      = OtherContract.ebookrights;
                            _OtherConImageBank.cost             = OtherContract.cost;
                            _OtherConImageBank.currencyid       = OtherContract.currencyid;
                            _OtherConImageBank.restriction      = OtherContract.restriction;

                            _OtherConImageBank.othercontractid = OtherContract.Id;
                            _OtherConImageBank.EnteredBy       = OtherContract.EnteredBy;
                            _OtherContractService.InsertOtherContractImageBank(_OtherConImageBank);
                        }


                        OtherContractDocuments _OtherContractDoc = new OtherContractDocuments();

                        string[] docurl = OtherContract.documentfile.Split(',');
                        int      j      = 0;
                        foreach (string doc in OtherContract.Documentname)
                        {
                            OtherContractDocuments Link = new OtherContractDocuments();
                            Link.othercontractid = OtherContract.Id;
                            Link.Documentname    = doc;
                            Link.documentfile    = docurl[j];
                            Link.EnteredBy       = OtherContract.EnteredBy;
                            _OtherContractService.InsertOtherContractDocumentsLinking(Link);
                            j++;
                        }


                        OtherContractLink mobj_OtherContractLink = _OtherContractLink.Table.Where(i => i.othercontractid == OtherContract.Id && i.Deactivate == "N").FirstOrDefault();

                        if (mobj_OtherContractLink != null)
                        {
                            mobj_OtherContractLink.Contractstatus              = OtherContract.Contractstatus;
                            mobj_OtherContractLink.SignedContractSentDate      = OtherContract.SignedContractSentDate;
                            mobj_OtherContractLink.SignedContractReceived_Date = OtherContract.SignedContractReceived_Date;
                            mobj_OtherContractLink.CancellationDate            = OtherContract.CancellationDate;
                            mobj_OtherContractLink.Cancellation_Reason         = OtherContract.Cancellation_Reason;
                            mobj_OtherContractLink.othercontractid             = OtherContract.Id;
                            mobj_OtherContractLink.ModifiedBy = OtherContract.EnteredBy;
                            mobj_OtherContractLink.Status     = OtherContract.Contractstatus;
                            mobj_OtherContractLink.Remarks    = OtherContract.PendingRemarks;

                            mobj_OtherContractLink.AgreementDate = OtherContract.AgreementDate;
                            mobj_OtherContractLink.Effectivedate = OtherContract.Effectivedate;
                            //mobj_OtherContractLink.Contractperiodinmonth = OtherContract.Contractperiodinmonth;

                            mobj_OtherContractLink.Expirydate = OtherContract.Expirydate;

                            _OtherContractService.UpdateOtherContractLink(mobj_OtherContractLink);


                            OtherContractLinkDocument _OtherContractDocLink = new OtherContractLinkDocument();

                            string[] docurl1 = OtherContract.documentfileLink.Split(',');
                            int      i       = 0;
                            foreach (string doc in OtherContract.DocumentnameLink)
                            {
                                OtherContractLinkDocument Link = new OtherContractLinkDocument();
                                Link.othercontractLinkid = mobj_OtherContractLink.Id;
                                Link.DocumentnameLink    = doc;
                                Link.documentfileLink    = docurl1[i];
                                Link.EnteredBy           = OtherContract.EnteredBy;
                                _OtherContractService.InsertOtherContractDocumentsLinkingLink(Link);
                                i++;
                            }
                        }
                    }

                    //-------------------------------------------
                    OtherContractIdId = OtherContract.Id;
                    OtherContactCode  = _OtherContractMaster.Table.Where(a => a.Id == OtherContract.Id).Select(b => b.othercontractcode).SingleOrDefault();
                }
                status = _localizationService.GetResource("Master.API.Success.Message");
            }
            catch (ACSException ex)
            {
                status = ex.ToString();
            }
            catch (Exception ex)
            {
                status = ex.ToString();
            }
            return(Json(SerializeObj.SerializeObject(new { status, OtherContactCode, OtherContractIdId })));
        }
Ejemplo n.º 13
0
 public ApplicationSetUp GetApplicationSetUpById(ApplicationSetUp ApplicationSetUp)
 {
     return(_ApplicationSetUp.Table.Where(i => i.Id == ApplicationSetUp.Id).FirstOrDefault());
 }
Ejemplo n.º 14
0
 public void UpdateApplication(ApplicationSetUp ApplicationSetUp)
 {
     _ApplicationSetUp.Update(ApplicationSetUp);
 }
Ejemplo n.º 15
0
        protected void Application_Start(Object sender, EventArgs e)
        {
            const string method = "Application_Start";

            _eventSource.Raise(Event.Information, method, "Application_Start event fired.");

            try
            {
                ApplicationSetUp.RegisterPath();
                ApplicationContext.SetupApplications(WebSite.LinkMe);

                _eventSource.Raise(Event.Information, method, "Initializing container...");

                InitialiseContainer();

                var locationQuery   = Container.Current.Resolve <ILocationQuery>();
                var industriesQuery = Container.Current.Resolve <IIndustriesQuery>();
                var channelsQuery   = Container.Current.Resolve <IChannelsQuery>();

                InitialiseTraceListeners();
                InitialiseContext(locationQuery, channelsQuery);
                InitialiseReferences();

                ControllerBuilder.Current.SetControllerFactory(new UnityControllerFactory(Container.Current));

                var errorHandler = new StandardErrorHandler();

                ModelBinders.Binders.Add(typeof(Guid[]), new GuidArrayBinder());
                ModelBinders.Binders.Add(typeof(int[]), new IntArrayBinder());
                ModelBinders.Binders.Add(typeof(CheckBoxValue), new CheckBoxBinder());
                ModelBinders.Binders.Add(typeof(CreditCard), new CreditCardBinder());
                ModelBinders.Binders.Add(typeof(MemberSearchCriteria), new ModelBinder(new MemberSearchCriteriaConverter(locationQuery, industriesQuery), errorHandler));
                ModelBinders.Binders.Add(typeof(MemberSearchSortCriteria), new ModelBinder(new MemberSearchSortCriteriaConverter(), errorHandler));
                ModelBinders.Binders.Add(typeof(JobAdSearchCriteria), new ModelBinder(new JobAdSearchCriteriaConverter(locationQuery, industriesQuery), errorHandler));
                ModelBinders.Binders.Add(typeof(JobAdSearchSortCriteria), new ModelBinder(new JobAdSearchSortCriteriaConverter(), errorHandler));
                ModelBinders.Binders.Add(typeof(OrganisationEmployerSearchCriteria), new ModelBinder(new EmployerSearchCriteriaConverter(), errorHandler));
                ModelBinders.Binders.Add(typeof(CandidatesPresentationModel), new ModelBinder(new CandidatesPresentationModelConverter(), errorHandler));
                ModelBinders.Binders.Add(typeof(JobAdsPresentationModel), new ModelBinder(new JobAdsPresentationModelConverter(), errorHandler));
                ModelBinders.Binders.Add(typeof(PersonalDetailsMemberModel), new ModelBinder(new PersonalDetailsMemberModelConverter(), errorHandler));
                ModelBinders.Binders.Add(typeof(JobDetailsMemberModel), new ModelBinder(new JobDetailsMemberModelConverter(), errorHandler));
                ModelBinders.Binders.Add(typeof(ContactDetailsMemberModel), new ModelBinder(new ContactDetailsMemberModelConverter(), errorHandler));
                ModelBinders.Binders.Add(typeof(DesiredJobMemberModel), new ModelBinder(new DesiredJobMemberModelConverter(), errorHandler));
                ModelBinders.Binders.Add(typeof(CareerObjectivesMemberModel), new ModelBinder(new CareerObjectivesMemberModelConverter(), errorHandler));
                ModelBinders.Binders.Add(typeof(SchoolModel), new ModelBinder(new EducationUpdateModelConverter(), errorHandler));
                ModelBinders.Binders.Add(typeof(OtherMemberModel), new ModelBinder(new OtherMemberModelConverter(), errorHandler));
                ModelBinders.Binders.Add(typeof(VisibilityModel), new ModelBinder(new VisibilityModelConverter(), errorHandler));
                ModelBinders.Binders.Add(typeof(EmploymentHistoryUpdateModel), new ModelBinder(new EmploymentHistoryUpdateModelConverter(), errorHandler));
                ModelBinders.Binders.Add(typeof(EducationUpdateModel), new ModelBinder(new EducationUpdateModelConverter(), errorHandler));
                ModelBinders.Binders.Add(typeof(ResourceSearchCriteria), new ModelBinder(new ResourceSearchCriteriaConverter(), errorHandler));
                ModelBinders.Binders.Add(typeof(ResourceSearchSortCriteria), new ModelBinder(new ResourceSearchSortCriteriaConverter(), errorHandler));
                ModelBinders.Binders.Add(typeof(ResourcesPresentationModel), new ModelBinder(new ResourcesPresentationModelConverter(), errorHandler));
                ModelBinders.Binders.Add(typeof(SearchModel), new ModelBinder(new SearchModelConverter(), errorHandler));
                ModelBinders.Binders.Add(typeof(JobAdModel), new ModelBinder(new JobAdModelConverter(locationQuery), errorHandler));

                // This effectively turns off the ASP.NET MVC built-in validation.  May re-consider at a later time on best way to use it.

                ModelValidatorProviders.Providers.Clear();
                ModelValidatorProviders.Providers.Add(new NullModelValidatorProvider());

                ValueProviderFactories.Factories.Add(new JsonValueProviderFactory());

                RegisterRoutes(RouteTable.Routes);
                RegisterBundles(BundleTable.Bundles);

                DisplayModeProvider.Instance.Modes.Insert(0, new DefaultDisplayMode("iPhone")
                {
                    ContextCondition = c =>
                    {
                        var userAgent = c.GetOverriddenUserAgent();
                        return(!string.IsNullOrEmpty(userAgent) && userAgent.IndexOf("iPhone", StringComparison.OrdinalIgnoreCase) >= 0);
                    }
                });

                var verticalsQuery = Container.Current.Resolve <IVerticalsQuery>();
                var viewEngine     = new VerticalViewEngine(Container.Current, verticalsQuery);         // new DeviceViewEngine(Container.Current, verticalsQuery);
                ViewEngines.Engines.Clear();
                ViewEngines.Engines.Add(viewEngine);

                _eventSource.Raise(Event.Information, method, "Application_Start completed.");
                //RouteDebug.RouteDebugger.RewriteRoutesForTesting(RouteTable.Routes);
            }
            catch (Exception ex)
            {
                _eventSource.Raise(Event.Error, method, "An exception was thrown in Application_Start.", ex, new StandardErrorHandler());
                ExceptionManager.HandleException(ex, new StandardErrorHandler());
                throw;
            }
        }
        public async Task BuildFromApplicationArguments_parses_arguments(string[] parameters, ApplicationSetUp expectedApplicationSetUp)
        {
            var res = await _ApplicationSetUpBuilder.BuildFromApplicationArguments(parameters);

            res.Should().BeEquivalentTo(expectedApplicationSetUp);
        }
Ejemplo n.º 17
0
        /// <summary>
        /// Api method to insert PubCenterMaster
        /// </summary>
        /// <param name="mobjPubCenter">accepts PubCenterMaster object as paramater </param>
        /// <returns></returns>
        public IHttpActionResult InsertPubCenter(PubCenterMaster mobjPubCenter)
        {
            string message = "";

            try
            {
                message = _mobjPubCenterService.DuplicateCheck(mobjPubCenter);
                if (message == "Y")
                {
                    if (mobjPubCenter.Id == 0)
                    {
                        IList <ApplicationSetUp> _mobjApplicationSetUpList = _mobjApplicationSetUpRepository.Table.Where(x => x.key == "PubCenterCode" && x.Deactivate == "N").ToList();
                        var PubCenterSuggesation = _mobjApplicationSetUpList.Select(P => new
                        {
                            PubCenterCodeValue = P.keyValue,
                            Id = P.Id
                        });

                        mobjPubCenter.PubcenterCode = "PCC" + PubCenterSuggesation.FirstOrDefault().PubCenterCodeValue;
                        mobjPubCenter.PubcenterCode = mobjPubCenter.PubcenterCode.ToString().ToUpper();
                        _mobjPubCenterService.InsertPubCenter(mobjPubCenter);

                        ApplicationSetUp mobjApplicationSetUp = new ApplicationSetUp();
                        mobjApplicationSetUp.Id = PubCenterSuggesation.FirstOrDefault().Id;
                        ApplicationSetUp _ApplicationSetUpUpdate = _mobjApplicationSetUpService.GetApplicationSetUpById(mobjApplicationSetUp);
                        _ApplicationSetUpUpdate.Id = PubCenterSuggesation.FirstOrDefault().Id;
                        int Value = Int32.Parse(PubCenterSuggesation.FirstOrDefault().PubCenterCodeValue) + 1;
                        _ApplicationSetUpUpdate.keyValue     = Value.ToString().PadLeft(4, '0');
                        _ApplicationSetUpUpdate.ModifiedBy   = mobjPubCenter.EnteredBy;
                        _ApplicationSetUpUpdate.ModifiedDate = DateTime.Now;
                        _mobjApplicationSetUpService.UpdateApplication(_ApplicationSetUpUpdate);

                        message = _mobjLocalizationService.GetResource("Master.API.Success.Message");
                    }
                    else
                    {
                        PubCenterMaster _PubCenter = _mobjPubCenterService.GetPubCenterById(mobjPubCenter);
                        _PubCenter.PublishingCompanyid       = mobjPubCenter.PublishingCompanyid;
                        _PubCenter.CenterName                = mobjPubCenter.CenterName;
                        _PubCenter.ContactPerson             = mobjPubCenter.ContactPerson;
                        _PubCenter.PublishingCompanyDivision = mobjPubCenter.PublishingCompanyDivision;
                        _PubCenter.Address      = mobjPubCenter.Address;
                        _PubCenter.CountryId    = mobjPubCenter.CountryId;
                        _PubCenter.Stateid      = mobjPubCenter.Stateid;
                        _PubCenter.Cityid       = mobjPubCenter.Cityid;
                        _PubCenter.Pincode      = mobjPubCenter.Pincode;
                        _PubCenter.Phone        = mobjPubCenter.Phone;
                        _PubCenter.Mobile       = mobjPubCenter.Mobile;
                        _PubCenter.Email        = mobjPubCenter.Email;
                        _PubCenter.Fax          = mobjPubCenter.Fax;
                        _PubCenter.ModifiedBy   = mobjPubCenter.EnteredBy;
                        _PubCenter.ModifiedDate = DateTime.Now;
                        _mobjPubCenterService.UpdatePubCenter(_PubCenter);
                        message = _mobjLocalizationService.GetResource("Master.API.Success.Message");
                    }
                }
                else
                {
                    message = "Duplicate";
                }
            }
            catch (ACSException ex)
            {
                //message = ex.InnerException.Message;
                _mobjLoggerService.Error(ex.InnerException.Message, ex);
                message = _mobjLocalizationService.GetResource("Common.API.Exception.Message");
            }
            catch (Exception ex)
            {
                //message = ex.InnerException.Message;
                _mobjLoggerService.Error(ex.InnerException.Message, ex);
                message = _mobjLocalizationService.GetResource("Common.API.Exception.Message");
            }

            return(Json(message));
        }
Ejemplo n.º 18
0
        /// <summary>
        /// Api method to insert CopyRightHolderMaster
        /// </summary>
        /// <param name="mobjCopyrightHolder">accepts CopyRightHolderMaster object as paramater </param>
        /// <returns></returns>
        public IHttpActionResult InsertCopyrightHolder(CopyRightHolderMaster mobjCopyrightHolder)
        {
            string message = "";

            try
            {
                message = _mobjCopyrightHolderService.DuplicateCheck(mobjCopyrightHolder);
                if (message == "Y")
                {
                    if (mobjCopyrightHolder.Id == 0)
                    {
                        IList <ApplicationSetUp> _mobjApplicationSetUpList = _mobjApplicationSetUpRepository.Table.Where(x => x.key == "CopyrightHolderCode" && x.Deactivate == "N").ToList();
                        var CopyrightHolderSuggesation = _mobjApplicationSetUpList.Select(P => new
                        {
                            CopyrightHolderCodeValue = P.keyValue,
                            Id = P.Id
                        });

                        mobjCopyrightHolder.CopyRightHolderCode = "CR" + mobjCopyrightHolder.CopyRightHolderName.Substring(0, 1).ToString() + CopyrightHolderSuggesation.FirstOrDefault().CopyrightHolderCodeValue;
                        mobjCopyrightHolder.CopyRightHolderCode = mobjCopyrightHolder.CopyRightHolderCode.ToString().ToUpper();
                        _mobjCopyrightHolderService.InsertCopyrightHolder(mobjCopyrightHolder);

                        ApplicationSetUp mobjApplicationSetUp = new ApplicationSetUp();
                        mobjApplicationSetUp.Id = CopyrightHolderSuggesation.FirstOrDefault().Id;
                        ApplicationSetUp _ApplicationSetUpUpdate = _mobjApplicationSetUpService.GetApplicationSetUpById(mobjApplicationSetUp);
                        _ApplicationSetUpUpdate.Id = CopyrightHolderSuggesation.FirstOrDefault().Id;
                        int Value = Int32.Parse(CopyrightHolderSuggesation.FirstOrDefault().CopyrightHolderCodeValue) + 1;
                        _ApplicationSetUpUpdate.keyValue     = Value.ToString().PadLeft(4, '0');
                        _ApplicationSetUpUpdate.ModifiedBy   = mobjCopyrightHolder.EnteredBy;
                        _ApplicationSetUpUpdate.ModifiedDate = DateTime.Now;
                        _mobjApplicationSetUpService.UpdateApplication(_ApplicationSetUpUpdate);

                        message = _mobjLocalizationService.GetResource("Master.API.Success.Message");
                    }
                    else
                    {
                        CopyRightHolderMaster _CopyrightHolder = _mobjCopyrightHolderService.GetCopyrightHolderById(mobjCopyrightHolder);
                        _CopyrightHolder.CopyRightHolderName = mobjCopyrightHolder.CopyRightHolderName;
                        _CopyrightHolder.ContactPerson       = mobjCopyrightHolder.ContactPerson;
                        _CopyrightHolder.Address             = mobjCopyrightHolder.Address;
                        _CopyrightHolder.CountryId           = mobjCopyrightHolder.CountryId;
                        _CopyrightHolder.Stateid             = mobjCopyrightHolder.Stateid;
                        _CopyrightHolder.Cityid       = mobjCopyrightHolder.Cityid;
                        _CopyrightHolder.Pincode      = mobjCopyrightHolder.Pincode;
                        _CopyrightHolder.Mobile       = mobjCopyrightHolder.Mobile;
                        _CopyrightHolder.Email        = mobjCopyrightHolder.Email;
                        _CopyrightHolder.URL          = mobjCopyrightHolder.URL;
                        _CopyrightHolder.BankName     = mobjCopyrightHolder.BankName;
                        _CopyrightHolder.AccountNo    = mobjCopyrightHolder.AccountNo;
                        _CopyrightHolder.BankAddress  = mobjCopyrightHolder.BankAddress;
                        _CopyrightHolder.IFSCCode     = mobjCopyrightHolder.IFSCCode;
                        _CopyrightHolder.PANNo        = mobjCopyrightHolder.PANNo;
                        _CopyrightHolder.VendorCOde   = mobjCopyrightHolder.VendorCOde;
                        _CopyrightHolder.ModifiedBy   = mobjCopyrightHolder.EnteredBy;
                        _CopyrightHolder.ModifiedDate = DateTime.Now;
                        _mobjCopyrightHolderService.UpdateCopyrightHolder(_CopyrightHolder);
                        message = _mobjLocalizationService.GetResource("Master.API.Success.Message");
                    }
                }
                else
                {
                    message = "Duplicate";
                }
            }
            catch (ACSException ex)
            {
                //message = ex.InnerException.Message;
                _mobjLoggerService.Error(ex.InnerException.Message, ex);
                message = _mobjLocalizationService.GetResource("Common.API.Exception.Message");
            }
            catch (Exception ex)
            {
                //message = ex.InnerException.Message;
                _mobjLoggerService.Error(ex.InnerException.Message, ex);
                message = _mobjLocalizationService.GetResource("Common.API.Exception.Message");
            }

            return(Json(message));
        }
Ejemplo n.º 19
0
 public void TestInitialize()
 {
     ApplicationSetUp.SetCurrentApplication(WebSite.LinkMe);
 }
        public ACS.Core.Domain.Master.ApplicationSetUp GetFileUploadURL()
        {
            ApplicationSetUp ApplicationSetUp = _ApplicationSetUp.Table.Where(a => a.Deactivate == "N" && a.key == "FileUploadURL").FirstOrDefault();

            return(ApplicationSetUp);
        }
Ejemplo n.º 21
0
        /// <summary>
        /// Api method to insert LicenseeMaster
        /// </summary>
        /// <param name="mobjLicensee">accepts LicenseeMaster object as paramater </param>
        /// <returns></returns>
        public IHttpActionResult InsertLicensee(LicenseeMaster mobjLicensee)
        {
            string message = "";

            try
            {
                message = _mobjLicenseeService.DuplicateCheck(mobjLicensee);
                if (message == "Y")
                {
                    if (mobjLicensee.Id == 0)
                    {
                        IList <ApplicationSetUp> _mobjApplicationSetUpList = _mobjApplicationSetUpRepository.Table.Where(x => x.key == "LicenseeCode" && x.Deactivate == "N").ToList();
                        var LicenseeSuggesation = _mobjApplicationSetUpList.Select(P => new
                        {
                            LicenseeCodeValue = P.keyValue,
                            Id = P.Id
                        });

                        mobjLicensee.Licenseecode = "LC" + mobjLicensee.OrganizationName.Substring(0, 1).ToString() + LicenseeSuggesation.FirstOrDefault().LicenseeCodeValue;
                        mobjLicensee.Licenseecode = mobjLicensee.Licenseecode.ToString().ToUpper();
                        _mobjLicenseeService.InsertLicensee(mobjLicensee);

                        ApplicationSetUp mobjApplicationSetUp = new ApplicationSetUp();
                        mobjApplicationSetUp.Id = LicenseeSuggesation.FirstOrDefault().Id;
                        ApplicationSetUp _ApplicationSetUpUpdate = _mobjApplicationSetUpService.GetApplicationSetUpById(mobjApplicationSetUp);
                        _ApplicationSetUpUpdate.Id = LicenseeSuggesation.FirstOrDefault().Id;
                        int Value = Int32.Parse(LicenseeSuggesation.FirstOrDefault().LicenseeCodeValue) + 1;
                        _ApplicationSetUpUpdate.keyValue     = Value.ToString().PadLeft(4, '0');
                        _ApplicationSetUpUpdate.ModifiedBy   = mobjLicensee.EnteredBy;
                        _ApplicationSetUpUpdate.ModifiedDate = DateTime.Now;
                        _mobjApplicationSetUpService.UpdateApplication(_ApplicationSetUpUpdate);

                        message = _mobjLocalizationService.GetResource("Master.API.Success.Message");
                    }
                    else
                    {
                        LicenseeMaster _Licensee = _mobjLicenseeService.GetLicenseeById(mobjLicensee);
                        _Licensee.OrganizationName = mobjLicensee.OrganizationName;
                        _Licensee.ContactPerson    = mobjLicensee.ContactPerson;
                        _Licensee.Address          = mobjLicensee.Address;
                        _Licensee.CountryId        = mobjLicensee.CountryId;
                        _Licensee.Stateid          = mobjLicensee.Stateid;
                        _Licensee.Cityid           = mobjLicensee.Cityid;
                        _Licensee.Pincode          = mobjLicensee.Pincode;
                        _Licensee.Mobile           = mobjLicensee.Mobile;
                        _Licensee.Email            = mobjLicensee.Email;
                        _Licensee.URL          = mobjLicensee.URL;
                        _Licensee.ModifiedBy   = mobjLicensee.EnteredBy;
                        _Licensee.ModifiedDate = DateTime.Now;
                        _mobjLicenseeService.UpdateLicensee(_Licensee);
                        message = _mobjLocalizationService.GetResource("Master.API.Success.Message");
                    }
                }
                else
                {
                    message = "Duplicate";
                }
            }
            catch (ACSException ex)
            {
                //message = ex.InnerException.Message;
                _mobjLoggerService.Error(ex.InnerException.Message, ex);
                message = _mobjLocalizationService.GetResource("Common.API.Exception.Message");
            }
            catch (Exception ex)
            {
                //message = ex.InnerException.Message;
                _mobjLoggerService.Error(ex.InnerException.Message, ex);
                message = _mobjLocalizationService.GetResource("Common.API.Exception.Message");
            }

            return(Json(message));
        }