/// <summary> /// 更新一条数据 /// </summary> public int Update(Entities.CustCustomTableMapping model) { SqlParameter[] parameters = { new SqlParameter("@RecID", SqlDbType.BigInt, 8), new SqlParameter("@CustID", SqlDbType.VarChar, 20), new SqlParameter("@ConsultID", SqlDbType.Int, 4), new SqlParameter("@CreateTime", SqlDbType.DateTime), new SqlParameter("@CreateUserID", SqlDbType.Int, 4) }; parameters[0].Value = model.RecID; parameters[1].Value = model.CustID; parameters[2].Value = model.ConsultID; parameters[3].Value = model.CreateTime; parameters[4].Value = model.CreateUserID; return(SqlHelper.ExecuteNonQuery(CONNECTIONSTRINGS, CommandType.StoredProcedure, P_CUSTCUSTOMTABLEMAPPING_UPDATE, parameters)); }
/// <summary> /// 增加一条数据 /// </summary> public int Insert(Entities.CustCustomTableMapping model) { SqlParameter[] parameters = { new SqlParameter("@RecID", SqlDbType.BigInt, 8), new SqlParameter("@CustID", SqlDbType.VarChar, 20), new SqlParameter("@ConsultID", SqlDbType.Int, 4), new SqlParameter("@CreateTime", SqlDbType.DateTime), new SqlParameter("@CreateUserID", SqlDbType.Int, 4) }; parameters[0].Direction = ParameterDirection.Output; parameters[1].Value = model.CustID; parameters[2].Value = model.ConsultID; parameters[3].Value = model.CreateTime; parameters[4].Value = model.CreateUserID; SqlHelper.ExecuteNonQuery(CONNECTIONSTRINGS, CommandType.StoredProcedure, P_CUSTCUSTOMTABLEMAPPING_INSERT, parameters); return((int)parameters[0].Value); }
private Entities.CustCustomTableMapping LoadSingleCustCustomTableMapping(DataRow row) { Entities.CustCustomTableMapping model = new Entities.CustCustomTableMapping(); if (row["RecID"].ToString() != "") { model.RecID = long.Parse(row["RecID"].ToString()); } model.CustID = row["CustID"].ToString(); if (row["ConsultID"].ToString() != "") { model.ConsultID = int.Parse(row["ConsultID"].ToString()); } if (row["CreateTime"].ToString() != "") { model.CreateTime = DateTime.Parse(row["CreateTime"].ToString()); } if (row["CreateUserID"].ToString() != "") { model.CreateUserID = int.Parse(row["CreateUserID"].ToString()); } return(model); }
/// <summary> /// 更新一条数据 /// </summary> public int Update(Entities.CustCustomTableMapping model) { return(Dal.CustCustomTableMapping.Instance.Update(model)); }
/// <summary> /// 增加一条数据 /// </summary> public int Insert(Entities.CustCustomTableMapping model) { return(Dal.CustCustomTableMapping.Instance.Insert(model)); }