本文整理汇总了C#中Voodoo.Basement.DataEntities.AddToJobCompany方法的典型用法代码示例。如果您正苦于以下问题:C# DataEntities.AddToJobCompany方法的具体用法?C# DataEntities.AddToJobCompany怎么用?C# DataEntities.AddToJobCompany使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Voodoo.Basement.DataEntities
的用法示例。
在下文中一共展示了DataEntities.AddToJobCompany方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: btn_Save_Click
protected void btn_Save_Click(object sender, EventArgs e)
{
int id = WS.RequestInt("id");
//int userid = WS.RequestInt("uid");
DataEntities ent = new DataEntities();
JobCompany com = new JobCompany();
if (id > 0)
{
com = (from l in ent.JobCompany where l.ID == id select l).FirstOrDefault();
}
com.CompanyName = txt_CompanyName.Text;
com.CompanyType = ddl_CompanyType.SelectedValue.ToInt32();
com.EmployeeCount = ddl_EmployeeCount.SelectedValue.ToInt32();
com.Industry = txt_Industry.Text;
com.Intro = txt_Intro.Text;
com.UserID = ddl_User.SelectedValue.ToInt32();
com.DayClick = txt_DayClick.Text.ToInt32(0);
com.IsSetTop = chk_Settop.Checked;
com.SetTopTime = DateTime.Now;
com.MailAddress = txt_MailAddress.Text;
if (id > 0 && com != null)
{
}
else
{
ent.AddToJobCompany(com);
}
ent.SaveChanges();
ent.Dispose();
Js.AlertAndChangUrl("保存成功!","List.aspx");
}