コード例 #1
0
        public ActionResult AddApplicant(JObApplicationdata jobapplication, HttpPostedFileBase file)
        {
            string applicationid = "";
            string candidateid = Guid.NewGuid().ToString().Replace("-", "");

            Business.ApplicationService.AppServiceClient bd = new Business.ApplicationService.AppServiceClient();
            Business.CoreService.MyFile fileuploaded = new Business.CoreService.MyFile();
            Business.CoreService.IobjectServicesWebappVer2Client coreclient = new Business.CoreService.IobjectServicesWebappVer2Client();

            string customtoken = coreclient.Login("*****@*****.**", "password", "");
            AmazonFile af = new AmazonFile();
            fileuploaded = af.WriteFile(Request.Files[0].FileName, Request.Files[0].InputStream, candidateid, customtoken);
            coreclient.AddRelation(candidateid, fileuploaded.Id, "resume", customtoken);

            IList document = af.GetResourceTokens(null, candidateid, "resume", customtoken);

            string contentid = "";

            contentid = ((Business.CoreService.ResourceToken)document[0]).ContentId;

            string fileurl = af.GetFileUrl(contentid, customtoken);

            Business.ApplicantActions objApplicantActions = new ApplicantActions();
            try
            {
                applicationid = objApplicantActions.AddApplicant(Session["userid"].ToString(), Session["companyid"].ToString(),
                jobapplication.jobid, candidateid, "", contentid, "", jobapplication.data);
            }
            catch
            {
                applicationid = objApplicantActions.AddApplicant(candidateid, jobapplication.companyid,
                               jobapplication.jobid, candidateid, "", contentid, "", jobapplication.data);
            }
            return Redirect(Request.UrlReferrer.ToString());
        }
コード例 #2
0
        public ActionResult Add(ExternalInvoice einv, HttpPostedFileBase file)
        {
            Business.ApplicationService.AppServiceClient bd = new Business.ApplicationService.AppServiceClient();
            Business.CoreService.MyFile fileuploaded = new Business.CoreService.MyFile();
            Business.CoreService.IobjectServicesWebappVer2Client coreclient = new Business.CoreService.IobjectServicesWebappVer2Client();
            AmazonFile af = new AmazonFile();
            fileuploaded = af.WriteFile(Request.Files[0].FileName, Request.Files[0].InputStream, Session["companyid"].ToString(), Session["usertoken"].ToString());
            coreclient.AddRelation(einv.invoiceid, fileuploaded.Id, "extinv", Session["usertoken"].ToString());

            IList document = af.GetResourceTokens(null, einv.invoiceid, "extinv", Session["usertoken"].ToString());
               string fileurl = "";
               foreach (Business.CoreService.ResourceToken li in document)
               {

               fileurl = af.GetFileUrl(li.ContentId, Session["usertoken"].ToString());

               }

            return RedirectToAction("inbound");
        }
コード例 #3
0
        public ActionResult Add(ExternalInvoice einv, HttpPostedFileBase file)
        {
            Business.ApplicationService.AppServiceClient bd = new Business.ApplicationService.AppServiceClient();
            Business.CoreService.MyFile fileuploaded        = new Business.CoreService.MyFile();
            Business.CoreService.IobjectServicesWebappVer2Client coreclient = new Business.CoreService.IobjectServicesWebappVer2Client();
            AmazonFile af = new AmazonFile();

            fileuploaded = af.WriteFile(Request.Files[0].FileName, Request.Files[0].InputStream, Session["companyid"].ToString(), Session["usertoken"].ToString());
            coreclient.AddRelation(einv.invoiceid, fileuploaded.Id, "extinv", Session["usertoken"].ToString());

            IList  document = af.GetResourceTokens(null, einv.invoiceid, "extinv", Session["usertoken"].ToString());
            string fileurl  = "";

            foreach (Business.CoreService.ResourceToken li in document)
            {
                fileurl = af.GetFileUrl(li.ContentId, Session["usertoken"].ToString());
            }

            return(RedirectToAction("inbound"));
        }
コード例 #4
0
        public ActionResult AddCandidate(JObApplicationdata jobapplication, HttpPostedFileBase file)
        {
            string applicationid = "";
            string candidateid   = Guid.NewGuid().ToString().Replace("-", "");

            Business.ApplicationService.AppServiceClient bd = new Business.ApplicationService.AppServiceClient();
            Business.CoreService.MyFile fileuploaded        = new Business.CoreService.MyFile();
            Business.CoreService.IobjectServicesWebappVer2Client coreclient = new Business.CoreService.IobjectServicesWebappVer2Client();

            string     customtoken = coreclient.Login("*****@*****.**", "password", "");
            AmazonFile af          = new AmazonFile();

            fileuploaded = af.WriteFile(Request.Files[0].FileName, Request.Files[0].InputStream, candidateid, customtoken);
            coreclient.AddRelation(candidateid, fileuploaded.Id, "resume", customtoken);

            IList document = af.GetResourceTokens(null, candidateid, "resume", customtoken);

            string contentid = "";

            contentid = ((Business.CoreService.ResourceToken)document[0]).ContentId;

            string fileurl = af.GetFileUrl(contentid, customtoken);

            Business.ApplicantActions objApplicantActions = new ApplicantActions();
            try
            {
                applicationid = objApplicantActions.AddCandidate(Session["userid"].ToString(), Session["companyid"].ToString(),
                                                                 jobapplication.jobid, candidateid, "", contentid, "", jobapplication.data);
            }
            catch
            {
                applicationid = objApplicantActions.AddCandidate(candidateid, jobapplication.companyid,
                                                                 jobapplication.jobid, candidateid, "", contentid, "", jobapplication.data);
            }
            return(Redirect(Request.UrlReferrer.ToString()));
        }