예제 #1
0
        public JsonResult EditStatus(int id)
        {
            string NowState;
            bool   isupdate = HumanResourceManager.UpdateStatus(id);

            return(Json(isupdate));
        }
예제 #2
0
        public ActionResult Index(HumanResource record)
        {
            ViewBag.ProcessMessage = HumanResourceManager.EditHumanResource(record);


            return(View());
        }
예제 #3
0
        //
        // GET: /Admin/HumanResource/

        public ActionResult Index()
        {
            var vision_info = HumanResourceManager.GetHRList();

            vision_info = vision_info.OrderBy(x => x.SortOrder).ToList();
            return(View(vision_info));
        }
예제 #4
0
        public ActionResult EditHumanResourcePosition(HumanResource HumanResourcePositionmodel)
        {
            if (ModelState.IsValid)
            {
                if (RouteData.Values["id"] != null)
                {
                    int  nid      = 0;
                    bool isnumber = int.TryParse(RouteData.Values["id"].ToString(), out nid);
                    if (isnumber)
                    {
                        HumanResourcePositionmodel.Id = nid;

                        ViewBag.ProcessMessage = HumanResourceManager.EditHumanResourcePosition(HumanResourcePositionmodel);
                        return(View(HumanResourcePositionmodel));
                    }
                    else
                    {
                        ViewBag.ProcessMessage = false;
                        return(View(HumanResourcePositionmodel));
                    }
                }
                else
                {
                    return(View());
                }
            }
            else
            {
                return(View());
            }

            return(View());
        }
예제 #5
0
        public JsonResult DeleteHumanPositionCv(int id)
        {
            bool isdelete = HumanResourceManager.DeleteCV(id);

            //if (isdelete)
            return(Json(isdelete));
            //  else return false;
        }
예제 #6
0
        public JsonResult SortRecords(string list)
        {
            JsonList psl = (new JavaScriptSerializer()).Deserialize <JsonList>(list);

            string[] idsList  = psl.list;
            bool     issorted = HumanResourceManager.SortRecords(idsList);

            return(Json(issorted));
        }
예제 #7
0
        public ActionResult Index(HttpPostedFileBase uploadfile, string positionname, int positionId)
        {
            Random random       = new Random();
            int    rand         = random.Next(1000, 99999999);
            string targetFolder = Server.MapPath("~/Content/images/userfiles/humanresources");
            string targetPath   = Path.Combine(targetFolder, rand + "_" + uploadfile.FileName);

            uploadfile.SaveAs(targetPath);

            HumanResourceCv hrcv = new HumanResourceCv();

            hrcv.FileUrl = "/Content/images/userfiles/humanresources/" + rand + "_" + uploadfile.FileName;
            hrcv.HumanResourcePositionId = positionId;
            HumanResourceManager.AddHumanResourceCv(hrcv);

            var mset  = MailManager.GetMailSettings();
            var msend = MailManager.GetMailUsersList(0);

            using (var client = new SmtpClient(mset.ServerHost, mset.Port))
            {
                client.EnableSsl = mset.Security;//true;//burası düzeltilecek
                //client.DeliveryMethod = SmtpDeliveryMethod.Network;
                client.UseDefaultCredentials = false;
                client.Credentials           = new NetworkCredential(mset.ServerMail, mset.Password);

                var mail = new MailMessage();
                mail.From = new MailAddress(mset.ServerMail, "Zeynel Yayla");

                mail.Attachments.Add(new Attachment(@targetFolder + "/" + rand + "_" + uploadfile.FileName));

                foreach (var item in msend)
                {
                    mail.To.Add(item.MailAddress);
                }
                mail.Subject    = "Yeni CV";
                mail.IsBodyHtml = true;
                mail.Body       = "<p> Merhaba \"Zeynel Yayla\" üzerinden " + positionname + " pozisyonu için yeni bir CV gönderildi. <br> CV'yi mail ekinde bulabilirsiniz..</p>";
                //ServicePointManager.ServerCertificateValidationCallback = delegate(object s, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) { return true; };
                if (mail.To.Count > 0)
                {
                    client.Send(mail);
                }
            }
            TempData["sent"] = "true";

            var model = HumanResourceManager.GetHumanResourcePositionList();

            return(View(model));
        }
예제 #8
0
 public ActionResult AddHumanResourcePosition(HumanResource newmodel)
 {
     if (ModelState.IsValid)
     {
         newmodel.SortOrder     = 9999;
         newmodel.TimeCreated   = DateTime.Now;
         ViewBag.ProcessMessage = HumanResourceManager.AddHumanResourcePosition(newmodel);
         ModelState.Clear();
         // Response.Redirect("/yonetim/haberduzenle/" + newsmodel.NewsId);
         return(View());
     }
     else
     {
         return(View());
     }
 }
예제 #9
0
        //
        // GET: /Kariyer/

        public ActionResult Index()
        {
            MainContext db   = new MainContext();
            Tags        stag = db.Tags.Where(x => x.PageId == 13 && x.Lang == lang).FirstOrDefault();

            if (stag != null)
            {
                ViewBag.Title       = stag.Title;
                ViewBag.Description = stag.Description;
                ViewBag.Keywords    = stag.Keyword;
            }

            var content = HumanResourceManager.GetHRByLanguage(lang);

            return(View(content));
        }
예제 #10
0
 public ActionResult ListCV()
 {
     if (RouteData.Values["id"] != null)
     {
         int posId = Convert.ToInt32(RouteData.Values["id"].ToString());
         List <HumanResource>  positionList = HumanResourceManager.GetHumanResourcePositionList();
         List <SelectListItem> obj          = new List <SelectListItem>();
         obj.Add(new SelectListItem {
             Text = "Tümü", Value = "0"
         });
         foreach (var item in positionList)
         {
             if (posId != item.Id)
             {
                 obj.Add(new SelectListItem {
                     Text = item.PositionName, Value = Convert.ToString(item.Id)
                 });
             }
             else
             {
                 obj.Add(new SelectListItem {
                     Text = item.PositionName, Value = Convert.ToString(item.Id), Selected = true
                 });
             }
         }
         ViewData["position"] = obj;
         return(View(HumanResourceManager.GetHumanResourceCV(posId)));
     }
     else
     {
         List <HumanResource>  positionList = HumanResourceManager.GetHumanResourcePositionList();
         List <SelectListItem> obj          = new List <SelectListItem>();
         obj.Add(new SelectListItem {
             Text = "Tümü", Value = "0"
         });
         foreach (var item in positionList)
         {
             obj.Add(new SelectListItem {
                 Text = item.PositionName, Value = Convert.ToString(item.Id)
             });
         }
         ViewData["position"] = obj;
         return(View(HumanResourceManager.GetHumanResourceCV()));
     }
 }
예제 #11
0
 public ActionResult EditHumanResourcePosition()
 {
     if (RouteData.Values["id"] != null)
     {
         int  nid      = 0;
         bool isnumber = int.TryParse(RouteData.Values["id"].ToString(), out nid);
         if (isnumber)
         {
             HumanResource editHumanResourcePosition = HumanResourceManager.GetHumanResourcePositionById(nid);
             return(View(editHumanResourcePosition));
         }
         else
         {
             return(View());
         }
     }
     else
     {
         return(View());
     }
     return(View());
 }
예제 #12
0
        public ActionResult HumanResourcePositions()
        {
            var referncelist = HumanResourceManager.GetHumanResourcePositionList("tr");

            return(View(referncelist));
        }
예제 #13
0
        public ActionResult Index()
        {
            var model = HumanResourceManager.GetHumanResourcePositionList();

            return(View(model));
        }
예제 #14
0
        public ActionResult Positions()
        {
            var content = HumanResourceManager.GetHumanResourcePositionListForFront(lang);

            return(View(content));
        }