public static bool InsertProblemRecord(ProblemRecord entity) { return dal.InsertProblemRecord(entity); }
public bool InsertProblemRecord(ProblemRecord entity) { try { StringBuilder strSql = new StringBuilder(); strSql.Append(@" Insert Into [D_ProblemRecord](DriverName, Ucode, CustomerName, CustomerPhone, Record, Remark, State, QuestName, DisposeName, AddTime, RecordTitle, ProvinceId, CityId, IsDelete) Values('','',@CustomerName,@CustomerPhone, @Record, '',2, @QuestName, '',getdate(),@RecordTitle, @ProvinceId,@CityId,0)"); SqlParameter[] para = new SqlParameter[] { new SqlParameter("@CustomerName", entity.CustomerName), new SqlParameter("@CustomerPhone", entity.CustomerPhone), new SqlParameter("@Record", entity.Record), new SqlParameter("@QuestName", entity.QuestName), new SqlParameter("@RecordTitle", entity.RecordTitle), new SqlParameter("@ProvinceId", entity.CityId), new SqlParameter("@CityId", entity.CityId)}; var value = helper.ExecuteCommand(strSql.ToString(),para); return value > 0; } catch (Exception ex) { LogControl.WriteError(string.Format("插入历史记录失败|Error:{0}", ex.Message)); return false; } }