三
asfs[script]alert('测试用一下, 我也需要做一个这样的编辑器,看一下CSDN是怎么替换的 ')[/script] --------------------编程问答-------------------- google asp.net ubb代码 --------------------编程问答--------------------
老大 我想问您以下 我是EF模版的
public partial class Order
{
public int o_id { get; set; }
public int o_clientId { get; set; }
public int o_source { get; set; }
public string o_contactPerson { get; set; }
public string o_phone { get; set; }
public string o_telePhone { get; set; }
public string o_email { get; set; }
public string o_qq { get; set; }
public string o_demand { get; set; }
public string o_demandImg { get; set; }
public Nullable<int> o_score { get; set; }
public Nullable<System.DateTime> o_handleTime { get; set; }
public string o_requirement { get; set; }
public Nullable<System.DateTime> o_createTime { get; set; }
public Nullable<int> o_createMan { get; set; }
public Nullable<int> o_urgent { get; set; }
public Nullable<bool> o_isAllocation { get; set; }
public Nullable<int> o_handleStatu { get; set; }
public string o_mentors { get; set; }
public Nullable<decimal> o_workHours { get; set; }
public string o_handlingMethod { get; set; }
public string o_Remarks { get; set; }
public Nullable<bool> o_isDel { get; set; }
public Nullable<System.DateTime> o_endTime { get; set; }
}
}
我想新增:
Models.DFManageSystemEntities db = new Models.DFManageSystemEntities();
try
{
Models.Order order = new Models.Order()
{
o_clientId = Convert.ToInt32(form["o_clientId"]),
o_source = Convert.ToInt32(form["o_source"]),
o_contactPerson = form["o_contactPerson"],
o_phone = form["o_phone"],
o_telePhone = form["o_telePhone"],
o_email = form["o_email"],
o_qq = form["o_qq"],
o_handleTime = Convert.ToDateTime(form["o_handleTime"]),
o_urgent = Convert.ToInt32(form["o_urgent"]),
o_requirement = form["o_requirement"],
o_createTime = DateTime.Now,
o_isAllocation = false
};
db.Orders.Add(order);
int v = db.SaveChanges();
}
因为有些列我没给给值 就报错了 新增不了 有什么能解决这个问题吗?
补充:.NET技术 , 非技术区