本文整理汇总了C#中Voodoo.Basement.DataEntities.AddToJobResumeInfo方法的典型用法代码示例。如果您正苦于以下问题:C# DataEntities.AddToJobResumeInfo方法的具体用法?C# DataEntities.AddToJobResumeInfo怎么用?C# DataEntities.AddToJobResumeInfo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Voodoo.Basement.DataEntities
的用法示例。
在下文中一共展示了DataEntities.AddToJobResumeInfo方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadInfo
protected void LoadInfo()
{
User u = UserAction.opuser;
if (u.ID < 0)
{
Js.AlertAndChangUrl("您还没有登录,请登录或注册后进入简历管理!", "/");
}
DataEntities ent = new DataEntities();
JobResumeInfo r = new JobResumeInfo();
try
{
r = (from l in ent.JobResumeInfo where l.UserID == u.ID select l).First();
}
catch
{
r.UserID = u.ID;
r.IsResumeOpen = true;
r.Image = "/u/ResumeFace/0.jpg";
r.Title = u.UserName + "的简历";
ent.AddToJobResumeInfo(r);
ent.SaveChanges();
}
var file = u.DefaultResumeFile();
if (u.ID > 0)
{
file_resume = string.Format("<a href='{0}' target='_blank'>{1}</a>", file.FilePath, file.FileName);
}
else
{
file_resume = "还没有上传简历";
}
txt_ChineseName.Text = r.ChineseName;
txt_Sex.Text=r.IsMale==true?"男":"女";
txt_LivePlace.Text=JobAction.GetProviceName(r.Province.ToInt32())+"-"+JobAction.GetCityName(r.City.ToInt32());
txt_Mobile.Text = r.Mobile;
txt_Email.Text = r.Email;
txt_WorkPlace.Text = JobAction.GetCityName(r.WorkPlace.ToInt32());
txt_Birth.Text = r.Birthday.ToDateTime().ToString("yyyy年MM月dd日");
ResumeOpen = r.IsResumeOpen == true ? "简历完全开放" : "简历关闭";
Image = r.Image;
}
示例2: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (u.ID < 0)
{
Js.AlertAndChangUrl("您还没有登录,请登录或注册后进入简历管理!", "/");
}
DataEntities ent = new DataEntities();
JobResumeInfo r = new JobResumeInfo();
try
{
r = (from l in ent.JobResumeInfo where l.UserID == u.ID select l).First();
}
catch
{
r.UserID = u.ID;
r.IsResumeOpen = true;
r.Image = "/u/ResumeFace/0.jpg";
r.Title = u.UserName + "的简历";
ent.AddToJobResumeInfo(r);
ent.SaveChanges();
}
ResumeOpen = r.IsResumeOpen == true ? "简历完全开放" : "简历关闭";
Image = r.Image;
var list = from l in ent.JobApplicationRecord
from com in ent.JobCompany
from p in ent.JobPost
where
l.UserID == u.ID
&& l.CompanyID == com.ID
&& l.PostID == p.ID
select new {
l.ID,
l.CompanyID,
com.CompanyName,
Pid=p.ID,
p.Title,
l.ApplicationTime
};
pager.RecordCount = list.Count();
count = pager.RecordCount.ToS();
int page=WS.RequestInt("page",1);
rp_lis.DataSource = list.OrderByDescending(p => p.ApplicationTime).Skip((page - 1) * pager.PageSize).Take(pager.PageSize);
rp_lis.DataBind();
}
示例3: btn_Save_Click
protected void btn_Save_Click(object sender, EventArgs e)
{
DataEntities ent = new DataEntities();
long id = WS.RequestLong("id");
JobResumeInfo
r = (from l in ent.JobResumeInfo where l.UserID == UserAction.opuser.ID select l).FirstOrDefault();
r.ChineseName = txt_ChineseName.Text;
r.Birthday = new DateTime(ddl_Year.SelectedValue.ToInt32(),
ddl_Month.SelectedValue.ToInt32(),
ddl_Day.SelectedValue.ToInt32());
r.IsMale = ckl_sex.SelectedValue == "1";
r.Province = ddl_Province.SelectedValue.ToInt32();
r.City = ddl_City.SelectedValue.ToInt32();
r.WorkPlace = ddl_CityWork.SelectedValue.ToInt32();
r.Mobile = txt_Mobile.Text;
r.Email = txt_Email.Text;
r.IsResumeOpen = ckl_Enable.SelectedValue == "1";
r.Keywords = txt_Keywords.Text;
if (r.ID <= 0)
{
ent.AddToJobResumeInfo(r);
}
ent.SaveChanges();
if (file_Face.HasFile)
{
string path = string.Format("/u/ResumeFace/{0}.jpg", r.ID.ToS());
var result = BasePage.UpLoadImage(file_Face.PostedFile, path, 96, 96);
if (result.Success)
{
r.Image = path;
}
ent.SaveChanges();
}
ent.Dispose();
Js.AlertAndChangUrl("保存成功!", "Home.aspx");
}
示例4: LoadInfo
protected void LoadInfo()
{
User u = UserAction.opuser;
if (u.ID < 0)
{
Js.AlertAndChangUrl("您还没有登录,请登录或注册后进入简历管理!", "/");
}
DataEntities ent = new DataEntities();
JobResumeInfo r = new JobResumeInfo();
try
{
r = (from l in ent.JobResumeInfo where l.UserID == u.ID select l).First();
}
catch
{
r.UserID = u.ID;
r.IsResumeOpen = true;
r.Image = "/u/ResumeFace/0.jpg";
r.Title = u.UserName + "的简历";
ent.AddToJobResumeInfo(r);
ent.SaveChanges();
}
ResumeOpen = r.IsResumeOpen == true ? "简历完全开放" : "简历关闭";
Image = r.Image;
//var list = from l in ent.ViewHistory
// from com in ent.JobCompany
// from p in ent.JobPost
// where
// l.ItemID == p.ID
// && p.CompanyID == com.ID
// && l.ModelID == 5
// && l.UserID == u.ID
// orderby l.ViewTime descending
// select new
// {
// p.ID,
// CompanyID = com.ID,
// com.CompanyName,
// Pid = p.ID,
// p.Title,
// l.ViewTime
// };
//var list = from l in ent.JobApplicationRecord
// from re in ent.JobResumeInfo
// from com in ent.JobCompany
// from p in ent.JobPost
// where
// l.UserID == u.ID
// && l.CompanyID == com.ID
// && p.CompanyID == com.ID
// && re.UserID==u.ID
// && re.WorkPlace==p.City
// select new
// {
// l.ID,
// l.CompanyID,
// com.CompanyName,
// Pid = p.ID,
// p.Title,
// l.ApplicationTime
// };
var list = from l in ent.JobPost
from re in ent.JobResumeInfo
from com in ent.JobCompany
where
l.CompanyID == com.ID
&& re.UserID == u.ID
&& re.WorkPlace == l.City
select new
{
l.ID,
l.CompanyID,
l.Title,
l.Intro,
l.PostTime,
com.CompanyName
};
var keywords = r.Keywords.ToS().Split(',', ',', ' ').ToList();
foreach (var keyword in keywords)
{
list = from l in list where l.Title.Contains(keyword) || l.Intro.Contains(keyword) select l;
}
rp_lis.DataSource = list.OrderByDescending(p => p.ID).Take(10);
rp_lis.DataBind();
var list2 = from l in ent.ViewHistory
from com in ent.JobCompany
from p in ent.JobPost
where
l.ItemID == p.ID
&& p.CompanyID == com.ID
&& l.ModelID == 5
&& l.UserID == u.ID
orderby l.ViewTime descending
//.........这里部分代码省略.........
示例5: LoadInfo
protected void LoadInfo()
{
User u = UserAction.opuser;
if (u.ID < 0)
{
Js.AlertAndChangUrl("您还没有登录,请登录或注册后进入简历管理!", "/");
}
DataEntities ent = new DataEntities();
JobResumeInfo r = new JobResumeInfo();
try
{
r = (from l in ent.JobResumeInfo where l.UserID == u.ID select l).First();
}
catch
{
r.UserID = u.ID;
r.IsResumeOpen = true;
r.Image = "/u/ResumeFace/0.jpg";
r.Title = u.UserName + "的简历";
ent.AddToJobResumeInfo(r);
ent.SaveChanges();
}
var file = u.DefaultResumeFile();
if (u.ID > 0 && file != null && file.ID > 0)
{
file_resume = string.Format("<a href='{0}' target='_blank'>{1}</a>", file.FilePath, file.FileName);
}
else
{
file_resume = "还没有上传简历";
}
txt_ChineseName.Text = r.ChineseName;
ckl_sex.SetValue(r.IsMale == true ? "1" : "0");
ddl_Province.SetValue(r.Province.ToS());
ddl_City.SetValue(r.City.ToS());
txt_Mobile.Text = r.Mobile;
txt_Email.Text = r.Email;
ddl_CityWork.ForceSetValue(r.WorkPlace.ToS(), "");
ckl_Enable.SetValue(r.IsResumeOpen == true ? "1" : "0");
ddl_Year.SetValue(r.Birthday.ToDateTime().Year.ToString());
ddl_Month.SetValue(r.Birthday.ToDateTime().Month.ToString());
ddl_Day.SetValue(r.Birthday.ToDateTime().Day.ToString());
txt_Keywords.Text = r.Keywords;
ResumeOpen = r.IsResumeOpen == true ? "简历完全开放" : "简历关闭";
Image = r.Image;
}
示例6: SaveResume
/// <summary>
/// 上传简历
/// </summary>
/// <param name="file">简历文件</param>
/// <param name="id">用户id,不输入的话则自动创建新用户</param>
public static void SaveResume(HttpPostedFile file, int id = 0)
{
DataEntities ent = new DataEntities();
string extName = Path.GetExtension(file.FileName).ToLower();
string fileName = string.Format("/u/Resume/{0}{1}", DateTime.Now.ToString("yyyyMMddHHmmssfff"), extName);
BasePage.UpLoadFile(file, fileName);
Aspose.Words.Document doc = new Aspose.Words.Document(System.Web.HttpContext.Current.Server.MapPath(fileName));
string Context = doc.GetText();
User u = new User();
if (id <= 0)
{
u.UserName = @int.GetRandomNumber(1000, 999999).ToS();
u.UserPass = Voodoo.Security.Encrypt.Md5("1");
u.RegTime = DateTime.Now;
u.RegIP = WS.GetIP();
u.LoginCount = 0;
u.LastLoginTime = DateTime.Now;
u.LastLoginIP = WS.GetIP();
u.Cent = 0;
u.Enable = true;
u.Group = 1;
ent.AddToUser(u);
ent.SaveChanges();
}
else
{
u = (from l in ent.User where l.ID == id select l).First();
}
JobResumeInfo r = new JobResumeInfo();
var userResume = from l in ent.JobResumeInfo where l.UserID == u.ID select l;
if (userResume.Count() > 0)
{
r = userResume.First();
}
else
{
r.UserID = u.ID;
r.Title = string.Format("{0}的临时简历", u.UserName);
ent.AddToJobResumeInfo(r);
ent.SaveChanges();
}
#region 文件处理
var files = from l in ent.JobResumeFile where l.UserID == u.ID select l;
var resumeFile = new JobResumeFile();
if (files.Count() == 0)
{
resumeFile.UserID = u.ID;
resumeFile.ResumeID = r.ID;
resumeFile.FilePath = fileName;
resumeFile.FileName = Path.GetFileName(file.FileName);
ent.AddToJobResumeFile(resumeFile);
}
else
{
resumeFile = files.First();
resumeFile.FilePath = fileName;
resumeFile.FileName = file.FileName;
}
ent.SaveChanges();
Match match = new Regex("男|女").Match(Context);
string str_r = "";
if (match.Success)
{
str_r = match.Groups[0].Value;
if (str_r == "男")
{
r.IsMale = true;
}
else
{
r.IsMale = false;
}
}
match = new Regex("[a-zA-Z\\._]*[email protected]*?\\.(com|net|org|cn|edu|gov)").Match(Context);
if (match.Success)
{
if (id <= 0)
{
u.Email = match.Groups[0].Value;
}
r.Email = match.Groups[0].Value;
}
match = new Regex("姓名.{1,3}[^ ;,\\r]*").Match(Context);
if (match.Success)
//.........这里部分代码省略.........