Пример #1
0
        public string InsertJobDetials(Job job)
        {
            try
            {
                Business.ApplicationService.AppServiceClient appclient = new Business.ApplicationService.AppServiceClient();

                int CompID    = 1;
                int CatId     = 1;
                int stateId   = 1;
                int Expcodeid = 1;
                Expcodeid = Convert.ToInt32(CommonFunctions.MapExperiencetoID[job.Exp].ToString());

                string[] postypearray   = job.postype.Split(',');
                string   PositionTypeId = "";
                if (postypearray.Length > 0)
                {
                    foreach (string postype in postypearray)
                    {
                        if (PositionTypeId == "")
                        {
                            PositionTypeId = CommonFunctions.MapPositiontoID[postype].ToString();
                        }
                        else
                        {
                            PositionTypeId = PositionTypeId + "," + CommonFunctions.MapPositiontoID[postype].ToString();
                        }
                    }
                }
                job.StartDate    = DateTime.Now;
                job.ModifiedDate = DateTime.Now;

                string[] expdatearray = job.ExpDate.Split('/');


                string expdt = new DateTime(Convert.ToInt32(expdatearray[2]), Convert.ToInt32(expdatearray[0]), Convert.ToInt32(expdatearray[1])).ToString("yyyy-MM-dd HH:mm:ss");

                job.Publish = 1; //inhouse

                job.jobdata = Newtonsoft.Json.JsonConvert.SerializeObject(job);
                appclient.CreateJob("", "", job.JobName, job.JobDesc, job.PayRate, job.PrefSkills, PositionTypeId, job.City, job.StartDate.Day.ToString(), job.StartDate.Month.ToString(), job.StartDate.Year.ToString(), Convert.ToInt32(expdatearray[1]).ToString(), Convert.ToInt32(expdatearray[0]).ToString(), Convert.ToInt32(expdatearray[2]).ToString(), Expcodeid, (int)job.Publish, System.Web.HttpContext.Current.Session["companyid"].ToString(), "jobpost", job.Email, job.Phone, "", job.jobdata, job.additionaldetails);

                return(m_nJobId);
            }

            catch { throw; }
        } //with mv
Пример #2
0
        public string InsertJobDetials(Job job)
        {
            try
            {
                Business.ApplicationService.AppServiceClient appclient = new Business.ApplicationService.AppServiceClient();

                int CompID = 1;
                int CatId = 1;
                int stateId = 1;
                int Expcodeid = 1;
                Expcodeid = Convert.ToInt32(CommonFunctions.MapExperiencetoID[job.Exp].ToString());

                string[] postypearray = job.postype.Split(',');
                string PositionTypeId = "";
                if (postypearray.Length > 0)
                {
                    foreach (string postype in postypearray)
                    {
                        if (PositionTypeId == "")
                        { PositionTypeId = CommonFunctions.MapPositiontoID[postype].ToString(); }
                        else
                        {
                            PositionTypeId = PositionTypeId + "," + CommonFunctions.MapPositiontoID[postype].ToString();
                        }
                    }
                }
                job.StartDate = DateTime.Now;
                job.ModifiedDate = DateTime.Now;

                string[] expdatearray = job.ExpDate.Split('/');

                string expdt = new DateTime(Convert.ToInt32(expdatearray[2]), Convert.ToInt32(expdatearray[0]), Convert.ToInt32(expdatearray[1])).ToString("yyyy-MM-dd HH:mm:ss");

                job.Publish = 1; //inhouse

                job.jobdata = Newtonsoft.Json.JsonConvert.SerializeObject(job);
                appclient.CreateJob("", "", job.JobName, job.JobDesc, job.PayRate, job.PrefSkills, PositionTypeId, job.City, job.StartDate.Day.ToString(), job.StartDate.Month.ToString(), job.StartDate.Year.ToString(), Convert.ToInt32(expdatearray[1]).ToString(), Convert.ToInt32(expdatearray[0]).ToString(), Convert.ToInt32(expdatearray[2]).ToString(), Expcodeid, (int)job.Publish, System.Web.HttpContext.Current.Session["companyid"].ToString(), "jobpost", job.Email, job.Phone, "", job.jobdata, job.additionaldetails);

                return m_nJobId;
            }

            catch { throw; }
        }