public void InsertSendArea(SendAreaInfo send) { SqlHelper objSqlHelper = new SqlHelper(); SqlParameter[] objParams = new SqlParameter[5]; objParams[0] = new SqlParameter("@Name", send.Name); objParams[1] = new SqlParameter("@Code", send.Code); objParams[2] = new SqlParameter("@ParentID", send.ParentID); objParams[3] = new SqlParameter("@Dec", StringHelper.convertStr(send.Dec)); objParams[4] = new SqlParameter("@IsSended", send.IsSended); objSqlHelper.ExecuteNonQuery("je_Area_InsertArea", objParams); }
public int UpdateSendArea(SendAreaInfo send) { SqlHelper objSqlHelper = new SqlHelper(); SqlParameter[] objParams = new SqlParameter[6]; objParams[0] = new SqlParameter("@Name", send.Name); objParams[1] = new SqlParameter("@Code", send.Code); objParams[2] = new SqlParameter("@ParentID", send.ParentID); objParams[3] = new SqlParameter("@Dec", StringHelper.convertStr(send.Dec)); objParams[4] = new SqlParameter("@IsSended", send.IsSended); objParams[5] = new SqlParameter("@AreaID", send.AreaID); return objSqlHelper.ExecuteNonQuery("je_Area_UpdateArea", objParams); }
public SendAreaInfo GetSendAreaByID(int sendAreaID) { SqlHelper objSqlHelper = new SqlHelper(); SqlParameter[] objParams = new SqlParameter[1]; objParams[0] = new SqlParameter("@sendAreaID", SqlDbType.Int, 4); objParams[0].Value = sendAreaID; SqlDataReader reader = objSqlHelper.ExecuteReader("je_Area_GetAreaByID", objParams); SendAreaInfo item = new SendAreaInfo(); while (reader.Read()) { item.AreaID = reader.GetInt32(reader.GetOrdinal("AreaID")); item.Name = reader.GetString(reader.GetOrdinal("Name")); item.Code = reader.GetString(reader.GetOrdinal("Code")); item.Dec = reader.GetString(reader.GetOrdinal("Dec")); item.ParentID = reader.GetInt32(reader.GetOrdinal("ParentID")); item.IsSended = reader.GetBoolean(reader.GetOrdinal("IsSended")); } reader.Close(); return item; }
/// <summary> /// 更新配送地址信息 /// </summary> /// <param name="link"></param> /// <returns></returns> public static int UpdateSendArea(SendAreaInfo send) { return sendAreas.UpdateSendArea(send); }
/// <summary> /// 添加配送地址信息 /// </summary> /// <param name="link"></param> public static void InsertSendArea(SendAreaInfo send) { sendAreas.InsertSendArea(send); }