t_e_import_errorinfo errInfo = new t_e_import_errorinfo(); errInfo.error_id = Guid.NewGuid().ToString("N"); errInfo.cooperate_code = cooperate; errInfo.company_code = company; errInfo.table_name = table_name; errInfo.return_value = info.IsSuccess.ToString()+":"+info .Message; errInfo.exec_time = DateTime.Now; vContext.t_e_import_errorinfo.AddObject(errInfo); vContext.SaveChanges();
$.post("/Message/GetSaleman", function (data) { SalemanData = eval("(" + data + ")"); if(SalemanData!=null && SalemanData.length>0){ $("#id").val(SalemanData[0].Id); id = SalemanData[0].Id; $("#txtName").val(SalemanData[0].MemberName); name = SalemanData[0].MemberName; } });
public ContentResult GetMemberInfo(string txtname) { ContentResult vResult = new ContentResult(); List<t_a_member> lst = ub.GetMemberList(txtname); var lst2 = lst.Select(l => new MemberItem { Id = l.id, Type = l.t_s_customer.type, Name = l.name }).ToList(); vResult.Content = lst2.ToJson(); return vResult; } public class MemberItem { public long Id { get; set; } public int Type { get; set; } public string Name { get; set; } }
public List<t_a_member> GetMemberList(string txtname) { List<t_a_member> lst = null; if (string.IsNullOrEmpty(txtname)) lst = vContext.t_a_member.Where(l => l.t_s_customer.type == 12 && l.status == 1).ToList(); else lst = vContext.t_a_member.Where(l => l.name.Contains(txtname)).Where(l => l.t_s_customer.type == 12 && l.status == 1).ToList(); return lst; }
public List<t_s_service_qq> GetModelList(string qq, int start, int pagesize, out int count) { count = vContext.t_s_service_qq.Where(m => m.qq.Contains(qq)).Count(); List<t_s_service_qq> lst = vContext.t_s_service_qq.Where(m => m.qq.Contains(qq)).OrderBy(m => m.qq).Skip(start).Take(pagesize > 0 ? pagesize : int.MaxValue).ToList(); return lst; }